Skip to content

fix: match Claude model ids in vision capability overrides - #764

Open
chiruu12 wants to merge 1 commit into
HKUDS:devfrom
chiruu12:fix/claude-model-vision-overrides
Open

fix: match Claude model ids in vision capability overrides#764
chiruu12 wants to merge 1 commit into
HKUDS:devfrom
chiruu12:fix/claude-model-vision-overrides

Conversation

@chiruu12

@chiruu12 chiruu12 commented Aug 4, 2026

Copy link
Copy Markdown

Summary

MODEL_OVERRIDES keyed vision support on claude-3 and claude-4. Anthropic moved to claude-<family>-<version> after Claude 3, so nothing is named claude-4-* and that entry matched no model id.

Every Claude model from Sonnet 4 onward therefore fell through to the binding default. On binding="custom" that default is supports_vision: False, with the comment "Per-model; set True via MODEL_OVERRIDES", so image input was reported unsupported for all of them, including AnthropicProvider.default_model (claude-sonnet-4-20250514).

Before:

claude-sonnet-4-20250514    False   (no prefix matched)
claude-opus-4-6             False   (none)
claude-opus-5               False   (none)
claude-haiku-4-5-20251001   False   (none)
claude-3-5-sonnet-20241022  True    (claude-3)

Only the legacy Claude 3 naming still matched.

Fix

Replace both version-keyed entries with a single claude- prefix. Enumerating versions is what drifted here, and every Claude model from 3 onward is multimodal. A future text-only model can be excluded with a longer, more specific key, since get_capability sorts patterns by length and the most specific one wins.

Tests

test_claude_model_ids_are_vision_capable covers the current ids across Claude 3, 4, 4.6 and 5. test_claude_override_does_not_leak_to_other_vendors pins that the broader prefix doesn't affect gpt-3.5 or gemma. The first fails on dev and passes with the change.

Ruff check, ruff format and mypy are clean on both files.

Copilot AI lite review requested due to automatic review settings August 4, 2026 09:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants