claude-code - 💡(How to fix) Fix [BUG] VS Code extension: image/file attachments silently dropped when using custom model backend (ANTHROPIC_BASE_URL) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56310Fetched 2026-05-06 06:31:29
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

When using Claude Code VS Code extension with a custom model backend (via ANTHROPIC_BASE_URL pointing to a third-party proxy such as z.ai / GLM 5.1), file and image attachments dragged into the chat are silently dropped — the model receives the image URLs as opaque metadata in tool result blocks, but cannot "see" or render them as actual image content.

Root Cause

When using Claude Code VS Code extension with a custom model backend (via ANTHROPIC_BASE_URL pointing to a third-party proxy such as z.ai / GLM 5.1), file and image attachments dragged into the chat are silently dropped — the model receives the image URLs as opaque metadata in tool result blocks, but cannot "see" or render them as actual image content.

RAW_BUFFERClick to expand / collapse

Summary

When using Claude Code VS Code extension with a custom model backend (via ANTHROPIC_BASE_URL pointing to a third-party proxy such as z.ai / GLM 5.1), file and image attachments dragged into the chat are silently dropped — the model receives the image URLs as opaque metadata in tool result blocks, but cannot "see" or render them as actual image content.

Repro

  1. Configure ANTHROPIC_BASE_URL to point to a third-party model proxy (e.g., z.ai for GLM 5.1)
  2. Open Claude Code in VS Code extension
  3. Drag a file or image into the chat input
  4. Send a message asking about the attached file

Expected

The model should be able to see and process the attached image/file, same as when using the default Anthropic API backend.

Actual

The image URL appears in the conversation context as a raw URL (e.g., maas-log-prod.cn-wlcb.ufileos.com/...) appended to tool results, but:

  • The model does not receive it as a renderable image content block
  • The model is unaware the user sent anything and responds as if no attachment exists
  • The user has to explicitly tell the model to look at the URL and use analyze_image to read it

Environment

  • Platform: macOS (Darwin 25.4.0)
  • Claude Code: VS Code extension
  • Model backend: GLM 5.1 via z.ai proxy (ANTHROPIC_BASE_URL)
  • Date: 2026-05-05

Notes

This appears to be a difference in how the VS Code extension handles image attachment rendering between the native Anthropic API and third-party proxy backends. With native Claude models, image attachments are presumably converted to proper image content blocks in the API request. With custom backends, they seem to be passed as raw URLs that the model cannot interpret.

Related: #55070 (similar silent attachment drop on Android), #52647 (image paste support request for VS Code)

extent analysis

TL;DR

Modify the VS Code extension to convert image attachments to proper image content blocks when using a third-party proxy backend.

Guidance

  • Investigate the difference in how the VS Code extension handles image attachment rendering between native Anthropic API and third-party proxy backends.
  • Check if the ANTHROPIC_BASE_URL configuration affects the attachment rendering process.
  • Consider adding a custom processing step to convert image URLs to image content blocks before sending the request to the third-party proxy backend.
  • Verify if the issue is specific to the GLM 5.1 model or if it affects other third-party proxy backends.

Example

No code snippet is provided as the issue requires further investigation into the VS Code extension's internal workings.

Notes

The issue may be related to how the VS Code extension handles attachment rendering, and modifying the extension to handle third-party proxy backends correctly may resolve the issue. However, without more information about the extension's internal workings, it's difficult to provide a definitive solution.

Recommendation

Apply a workaround by modifying the VS Code extension to handle image attachments correctly when using a third-party proxy backend, as the root cause of the issue appears to be related to the extension's handling of attachment rendering.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] VS Code extension: image/file attachments silently dropped when using custom model backend (ANTHROPIC_BASE_URL) [1 participants]