Skip to content

Remove hardcoded vision-model allowlist in OllamaModel#28

Merged
rcjackson merged 1 commit into
ARM-Development:mainfrom
rcjackson:fix-ollama-vision-images
Jul 10, 2026
Merged

Remove hardcoded vision-model allowlist in OllamaModel#28
rcjackson merged 1 commit into
ARM-Development:mainfrom
rcjackson:fix-ollama-vision-images

Conversation

@rcjackson

Copy link
Copy Markdown
Collaborator

Summary

OllamaModel.chat() gated image sending on supports_vision(), which matched model_name against a hardcoded allowlist (llava, bakllava, moondream, minicpm-v, llava-llama2, llava-llama3, llama4:scout).

Any vision-capable model not on that list — e.g. llama3.2-vision — had its images silently dropped and was routed to the text-only /api/chat endpoint, producing labels generated with no image input and no error.

Changes

  • Send images to the /api/generate endpoint whenever they are provided, regardless of model name.
  • Remove the now-unused supports_vision() method and its allowlist.

Notes

Ollama already errors clearly if a model genuinely cannot accept images, so the client-side allowlist added no safety — only false negatives for newer vision models.

🤖 Generated with Claude Code

The OllamaModel.chat() method gated image sending on supports_vision(),
which matched model_name against a hardcoded allowlist (llava, bakllava,
etc.). Vision-capable models not on the list (e.g. llama3.2-vision) had
their images silently dropped and were routed to the text-only chat
endpoint, producing labels with no image input.

Send images whenever they are provided and remove the unused
supports_vision() method and its allowlist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rcjackson rcjackson merged commit f6accce into ARM-Development:main Jul 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant