Repository navigation
Report vision support for natively served Claude models - #331396
Closed
Ryan Ewen (RyanEwen) wants to merge 2 commits into
Closed
Ryan Ewen (RyanEwen) wants to merge 2 commits into
Ryan Ewen (RyanEwen) wants to merge 2 commits into
Conversation
A pasted image was attached, sent and understood, while the UI labelled it
unsupported: the attachment rendered with a warning and "{model} does not
support images".
fromSdkModelInfo hardcoded supportsVision to false. The SDK's ModelInfo has no
vision field, so that was standing in for "unknown", but nothing downstream
treats it that way: the language model provider collapses the value to a
boolean and the attachment widget takes it as authoritative, turning unknown
into a claim that images are rejected.
Every model this transport offers is a Claude model with image input, so that
is what it now reports. The CAPI projection alongside it still reads the real
capability.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Claude model capability reporting so SDK-derived model rows are treated as vision-capable, preventing downstream UI from labeling received image attachments as unsupported.
Changes:
- Set
supportsVisiontotruefor models produced viafromSdkModelInfoand document the rationale. - Update the ClaudeAgent test fixture to expect vision support and add explanatory comments.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vs/platform/agentHost/test/node/claudeAgent.test.ts | Adjusts expected model metadata to mark Sonnet 4.5 as vision-capable and documents why. |
| src/vs/platform/agentHost/node/claude/claudeAgent.ts | Changes SDK-model mapping to report supportsVision: true with detailed justification to avoid misleading downstream behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: TylerLeonhardtMatched files:
|
The guidelines allow 1-2 short sentences of JSDoc and at most one line inline. The reasoning belongs in the commit message and the pull request, which is where it already is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #331347.
A pasted image in a Claude session on the native (BYO-Anthropic) transport is attached, sent, and understood by the model, but the UI marks it unsupported: the attachment renders with a warning icon and the hover reads "{model} does not support images." Users conclude the attachment was dropped and stop pasting images.
fromSdkModelInfohardcoded the capability:while the CAPI projection directly above it reads the real one (
supportsVision: !!supports?.vision), so the two transports disagreed about the same underlying models.ModelInfoin@anthropic-ai/claude-agent-sdkhas no vision field at all. It carriessupportsEffort,supportedEffortLevels,supportsAdaptiveThinking,supportsFastModeandsupportsAutoMode, and nothing about image input. Sofalsewas standing in for "the SDK does not say", but it does not read that way downstream:agentHostLanguageModelProvidercollapses the value to a boolean (vision: m.supportsVision ?? false) andchatAttachmentWidgetstreats it as authoritative, so "unknown" became a positive claim that the model cannot accept images.Leaving the field unset changes nothing for the same reason, which makes
truethe accurate answer for this transport: every row it offers is a Claude model, and image input is available across them. The comment says so at the seam, so whoever adds a real capability toModelInfocan replace it with the actual signal.The existing projection test asserted the old value and now asserts the new one, with a note about why.
AI disclosure: this description and the code it proposes were written with the assistance of AI.
Public patches and patcher scripts
Source patch and installed-bundle workaround mapping. The public collection includes the maintained patchers, rollback instructions, regression scripts, and historical snapshots. Build restrictions and exact installer coverage are documented there.