anthropics / anthropics/claude-code

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

Đang mở
#87,566 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:providers bug platform:vscode platform:windows reproduced stale
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, vscode
Lĩnh vực
api, desktop
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
52/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.