Image attachments (PNG, JPEG, WebP, GIF) skip the document parser and go to a vision-capable Ollama model (OLLAMA_MODEL_VISION, default gemma4:latest).
The image is stored on the prompt. PromptSerializer returns file_type and base64 image so history can redraw it.
Unsupported image types and files over 8 MB return a websocket error and are not saved.
A later text turn does not reuse a previous image as a spreadsheet.
Pairs with chat_web_appfeat/128-vision-image-prompt (#128).
Test plan
manage.py test chat_backend.tests.test_vision chat_backend.tests.test_consumers.GraphNodeTestCase
Send a prompt plus PNG over ws/chat_again/ and confirm the vision model is called.
GET conversation_details includes image and file_type for that turn.
CSV upload still follows the document path.
## Summary
- Image attachments (PNG, JPEG, WebP, GIF) skip the document parser and go to a vision-capable Ollama model (`OLLAMA_MODEL_VISION`, default `gemma4:latest`).
- The image is stored on the prompt. `PromptSerializer` returns `file_type` and base64 `image` so history can redraw it.
- Unsupported image types and files over 8 MB return a websocket error and are not saved.
- A later text turn does not reuse a previous image as a spreadsheet.
Pairs with `chat_web_app` `feat/128-vision-image-prompt` ([#128](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/128)).
## Test plan
- [ ] `manage.py test chat_backend.tests.test_vision chat_backend.tests.test_consumers.GraphNodeTestCase`
- [ ] Send a prompt plus PNG over `ws/chat_again/` and confirm the vision model is called.
- [ ] `GET conversation_details` includes `image` and `file_type` for that turn.
- [ ] CSV upload still follows the document path.
Image uploads were treated as unknown documents and never shown to the model. PNG, JPEG, WebP, and GIF now go to Ollama vision, and history returns the image bytes.
Co-authored-by: Cursor <cursoragent@cursor.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
OLLAMA_MODEL_VISION, defaultgemma4:latest).PromptSerializerreturnsfile_typeand base64imageso history can redraw it.Pairs with
chat_web_appfeat/128-vision-image-prompt(#128).Test plan
manage.py test chat_backend.tests.test_vision chat_backend.tests.test_consumers.GraphNodeTestCasews/chat_again/and confirm the vision model is called.GET conversation_detailsincludesimageandfile_typefor that turn.