anthropics / anthropics/claude-code
[BUG] Claude Code degraded in AWS GovCloud (no more Haiku models available)
- Vorherrschende Sprache
- Python
- Sterne
- 145k
- Forks
- 23.1k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
### 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_
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, python
- Bereich
- cli, cloud
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100