anthropics / anthropics/claude-code

[BUG] Sending unsupported image to third-party API permanently breaks the conversation

Aperta
#87,566 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
area:providers bug platform:vscode platform:windows reproduced stale
Lingua principale
Python
Stelle
145k
Fork
23.1k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

## Bug Description

When using a third-party API provider (non-Anthropic), sending an image that the model doesn't support causes a permanent error in the conversation. All subsequent messages in the same conversation also fail, even plain text. The user must start a new conversation to recover.

## Steps to Reproduce

1. Configure Claude Code to use a third-party API endpoint (e.g. `ANTHROPIC_BASE_URL` set to a custom provider)
2. Use a model that doesn't support vision/multimodal input
3. Send a screenshot/image in the conversation
4. An error appears: "There's an issue with the selected model. It may not exist or you may not have access to it."
5. Try sending a plain text message in the same conversation — it also fails with the same error
6. Starting a new conversation fixes the issue; the old one remains permanently broken

## Expected Behavior

- The image should be ignored or the error should be shown as a warning, allowing the user to continue the conversation with text only
- At minimum, the conversation should recover after the failed request — subsequent text-only messages should work

## Actual Behavior

- The entire conversation is permanently broken after one failed image request
- Closing and reopening the conversation doesn't help — the error state persists
- Only creating a new conversation resolves the issue

## Environment

- VS Code Claude Code extension
- Third-party API provider via `ANTHROPIC_BASE_URL`
- Model: mimo-v2.5-pro (does not support image input)

### What Should Happen?

When an image is sent to a model that doesn't support it, the error should be non-fatal — either ignore the image and process the text, or show a warning and let the user continue the conversation
- At minimum, the conversation should recover after the failed request so subsequent text-only messages work normally
- The error message should be more specific (e.g. "This model does not support image input") rather than the generic "model may not exist or you may not have access"

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. Set up Claude Code with a third-party API:
ANTHROPIC_BASE_URL=https://api.example.com/anthropic
ANTHROPIC_MODEL=some-model-without-vision

2. Open a new conversation in VS Code Claude Code extension
3. Send a screenshot or paste an image into the chat
4. See error: "There's an issue with the selected model. It may not exist or you may not have access to it."
5. Try sending a plain text message in the same conversation
6. Same error appears — conversation is permanently broken
7. Open a new conversation → works fine immediately

### Claude Model

None

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.234

### Platform

Other

### Operating System

Windows

### Terminal/Shell

VS Code integrated terminal

### Additional Information

This issue only affects the specific conversation where the image was sent. Other conversations and new conversations continue to work normally.
- The error message is misleading — the model exists and is accessible for text requests, it simply doesn't support image input.
- The third-party API (api.xiaomimimo.com) works correctly for all text-based requests. The failure is isolated to image/multimodal requests.
- No restart or reopen of the same conversation recovers it — the broken state persists across VS Code sessions.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Reproduce in the VS Code Claude Code extension using ANTHROPIC_BASE_URL and a model without image support, then trace how the failed image request affects the conversation before a later text request. Done means the same conversation recovers for text-only messages and reports a specific unsupported-image error instead of the generic model-access message.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, vscode
Ambito
api, desktop
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.