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

Offen
#88,861 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
api:anthropic area:model bug
Vorherrschende Sprache
Python
Sterne
145k
Forks
23.1k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

**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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api, cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
50/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.