anthropics / anthropics/claude-code

[BUG] `best` alias never falls back to Opus when Fable 5 is not usable — hard error at top level, silent Sonnet 5 as a subagent model

Abierto
#88,861 0 comentarios 0 reacciones 0 asignados Ver en GitHub
api:anthropic area:model bug
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

**Version:** 2.1.240 · **Plan:** Pro, usage credits turned **off** · **Provider:** Anthropic API

`best` is documented as "Uses Fable 5 where your organization has access to it, otherwise the latest Opus model". On an account where Fable 5 can't actually run — Pro with usage credits switched off — `best` still resolves to Fable 5 and never reaches the Opus fallback. It fails differently depending on where it's used.

**1. Top level — hard error instead of Opus**

```
$ claude --model best -p "Respond with only the word: ok" --output-format json
result: Fable 5 requires usage credits. Switch to another model, or manage usage
credits at claude.ai/settings/usage, to continue.
modelUsage: {}
```

Expected: the request runs on the latest Opus. Actual: nothing runs.

**2. Subagent frontmatter — silent downgrade to Sonnet 5**

An agent with `model: best`, spawned through the `Agent` tool with no per-invocation `model`, ran all 108 of its assistant turns on `claude-sonnet-5`. The parent session was on `claude-opus-5` (`"model": "opus"` in settings), `CLAUDE_CODE_SUBAGENT_MODEL` was unset in the environment and in every settings file, and no warning appeared in either transcript. Control, same session and same agent with only the frontmatter changed to `model: opus`: the transcript shows `claude-opus-5`.

So neither documented outcome happens: not the latest Opus that `best` promises, and not the inherited model that a blocked value is documented to fall back to, with an interactive warning naming both models.

Before the credits were switched off, the same `model: best` agent failed with `You're out of usage credits. Run /usage-credits to keep using Fable 5` — confirming `best` resolves to Fable 5 whenever the account is anywhere near it, and only ever misses the Opus fallback.

**Related:** #82960 covers the silent Sonnet 5 fallback for subagent dispatch. This report is about the `best` alias itself skipping its documented Opus fallback; the silent Sonnet is how that surfaces through the path in #82960.

Guía de contribución

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

Línea de trabajo

Start by reproducing both paths described: `claude --model best` with usage credits off, and an Agent tool subagent using `model: best` without per-invocation or environment overrides. Trace `best` resolution and fallback behavior from top-level model selection through Agent frontmatter dispatch; done means unavailable Fable 5 uses the latest Opus as documented, with the documented warning or inheritance behavior preserved.

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

Evaluación

Stack tecnológico
python
Área
api, cli
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
50/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.