anthropics / anthropics/claude-code

[BUG][bedrock] /model picker's Haiku 4.5 quick-pick writes bare alias "claude-haiku-4-5" -> 400 invalid model identifier

Đang mở
#89,501 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
api:bedrock area:model bug has repro platform:macos
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 searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code

### What's wrong

On a Bedrock-backed setup (`CLAUDE_CODE_USE_BEDROCK=1`), selecting "Haiku 4.5" from the `/model` picker fails every request with:

```
API Error (claude-haiku-4-5): 400 The provided model identifier is invalid.
```

The picker persists the bare catalog alias `claude-haiku-4-5` instead of resolving it to the region-prefixed, dated Bedrock inference-profile ID. Note this is missing both the region prefix (`eu.anthropic.` / `us.anthropic.`) and the date suffix (`-20251001-v1:0`) - worse than the Opus 4.8 case in #68005, which is only missing the region prefix.

Every other Haiku-selection path in the same setup works correctly, because each of them already uses the full ID:

- `settings.json` top-level `"model": "eu.anthropic.claude-haiku-4-5-20251001-v1:0"` - works
- `CLAUDE_CODE_SUBAGENT_MODEL=eu.anthropic.claude-haiku-4-5-20251001-v1:0` - works
- Agent tool `model: "haiku"` shorthand for subagents - works (resolves correctly there)

So this looks isolated to the interactive `/model` picker's built-in "Haiku 4.5" quick-pick entry for the main session model specifically.

### What should happen

`/model` should persist the Bedrock-qualified model ID when the active provider is Bedrock, same as every other selection path already does.

### Workaround

Type the full ID directly instead of using the picker's quick-pick row:

```
/model eu.anthropic.claude-haiku-4-5-20251001-v1:0
```

### Prior art

This looks like the same underlying bug class as #68005 (Opus 4.8 `[1m]`, missing region prefix only) and the earlier Opus 4.6/4.7 regressions referenced there (#23499 closed, #61495 open). Each new model release seems to re-introduce this because the picker's ID resolution doesn't account for the Bedrock prefix/date-suffix requirements. Filing separately since it's the Haiku 4.5 entry and the failure mode is slightly different (missing both prefix and suffix, not just prefix).

### Error messages/logs

```
API Error (claude-haiku-4-5): 400 The provided model identifier is invalid.
```

### Claude model

Haiku 4.5

### Is this a regression

Unclear - haven't confirmed a prior working version for this specific picker entry.

### Claude Code version

2.1.209

### Platform

AWS Bedrock

### Operating system

macOS

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

Start at the interactive /model picker and compare its Haiku 4.5 quick-pick resolution with the working settings.json, CLAUDE_CODE_SUBAGENT_MODEL, and Agent tool shorthand paths. Done means selecting Haiku 4.5 on Bedrock persists and uses the full region-prefixed, dated inference-profile ID rather than the bare alias.

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

Đánh giá

Công nghệ
aws, python
Lĩnh vực
cli, cloud
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 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
55/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.