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

Ouverte
#88,861 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
api:anthropic area:model bug
Langage dominant
Python
Étoiles
145k
Forks
23.1k
Métriques de merge des PR
Métriques de PR en attente

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
api, cli
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
50/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.