anthropics / anthropics/claude-code

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

Abierto
#91,091 1 comentario 0 reacciones 0 asignados Ver en GitHub
api:bedrock area:model bug platform:macos
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, python
Área
cli, cloud
Tipo de issue
Error
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.