anthropics / anthropics/claude-code

[BUG] Claude Code degraded in AWS GovCloud (no more Haiku models available)

オープン
#91,091 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
api:bedrock area:model bug platform:macos
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

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

AWS GovCloud will soon remove its only Haiku model ([Claude 3 Haiku](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-3-haiku.html)) and thus Claude Code will need to use Sonnet 4.5 or Sonnet 5 when it expects Haiku. I was told by an Anthropic rep that we can simply remove any mention of Haiku in our Claude Code settings and it should simply try to use Sonnet thereafter. I removed these 3 environment variables from my settings.json file:
- `ANTHROPIC_DEFAULT_HAIKU_MODEL`
- `ANTHROPIC_SMALL_FAST_MODEL`
- `DISABLE_PROMPT_CACHING_HAIKU`

I'm using Sonnet 5 as my default model.

Then I had the following session:

```sh
❯ what background tasks in claude code use the haiku model?

⏺ claude-code-guide(Find Claude Code background tasks using Haiku)
⎿ Backgrounded agent (↓ to manage · ctrl+o to expand)

⏺ I've kicked off a lookup on this — will report back shortly with the specific list.

✻ Waiting for 1 background agent to finish

⏺ Agent "Find Claude Code background tasks using Haiku" failed: Agent terminated early due to an API error: API Error: 400 400: {'error': 'anthropic_messages: Invalid model name passed in model=claude-haiku-4-5-20251001. Call `/v1/models` to view available models for your key.'}

⏺ The lookup agent failed — it tried to call claude-haiku-4-5-20251001 and got a 400 error ("Invalid model name... Call /v1/models to view available models for your key"). That's notable given this is your 3-haiku-eol branch — it looks like Haiku is no longer available on this GovCloud API key, which matches whatever you're working on removing.

Want me to retry the research with a different approach (e.g., web docs directly instead of a Haiku-based agent), or is that failure itself the answer you needed?
```

Since this didn't work, I tried setting
```json
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "us-gov.anthropic.claude-sonnet-5",
```
in my Claude Code settings.json file.

This appears to not fail, but it's slow, likely because it's using its default effort of `high` I'm guessing

### What Should Happen?

In this situation:
- if no Haiku model is available, it should utilize the Sonnet model
- if it's using an adaptive-thinking model (such as Sonnet 5, and possibly via `ANTHROPIC_DEFAULT_HAIKU_MODEL`), it should either:
- utilize a "low" effort, or
- have an effort value that's configurable via environment variables, or
- just disable thinking https://platform.claude.com/docs/en/build-with-claude/thinking#turning-thinking-off

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. Connect Claude Code to AWS GovCloud
2. Ensure you can't access any 3 Haiku model (either because it's past end-of-life, or it's only on extended public access and you don't have access to it, or it's hidden behind an LLM gateway like LiteLLM, etc.)
3. Prompt `what background tasks in claude code use the haiku model?`
4. Notice the response that mentions the error

### Claude Model

Sonnet (default)

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.1.232

### Platform

AWS Bedrock

### Operating System

macOS

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

_No response_

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with settings.json and trace how ANTHROPIC_DEFAULT_HAIKU_MODEL, ANTHROPIC_SMALL_FAST_MODEL, and DISABLE_PROMPT_CACHING_HAIKU affect background-agent model selection. Reproduce on AWS GovCloud with the listed prompt and unavailable Haiku models. Done means the agent no longer sends requests to an unavailable Haiku model and the requested adaptive-thinking behavior is defined and verified.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, python
領域
cli, cloud
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。