Skip to content

Report vision support for natively served Claude models - #331396

Closed
Ryan Ewen (RyanEwen) wants to merge 2 commits into
microsoft:mainfrom
RyanEwen:fix/native-claude-models-report-vision
Closed

Ryan Ewen (RyanEwen) wants to merge 2 commits into
microsoft:mainfrom
RyanEwen:fix/native-claude-models-report-vision

Conversation

@RyanEwen

@RyanEwen Ryan Ewen (RyanEwen) commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

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.

fromSdkModelInfo hardcoded the capability:

supportsVision: false,

while the CAPI projection directly above it reads the real one (supportsVision: !!supports?.vision), so the two transports disagreed about the same underlying models.

ModelInfo in @anthropic-ai/claude-agent-sdk has no vision field at all. It carries supportsEffort, supportedEffortLevels, supportsAdaptiveThinking, supportsFastMode and supportsAutoMode, and nothing about image input. So false was standing in for "the SDK does not say", but it does not read that way downstream: agentHostLanguageModelProvider collapses the value to a boolean (vision: m.supportsVision ?? false) and chatAttachmentWidgets treats 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 true the 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 to ModelInfo can 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.

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.

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.

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 supportsVision to true for models produced via fromSdkModelInfo and 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.

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

TylerLeonhardt

Matched files:

  • src/vs/platform/agentHost/node/claude/claudeAgent.ts

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.
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.

Pasted images are labelled unsupported in Claude sessions even though the model receives them

3 participants