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
- 主要言語
- Python
- スター
- 145k
- フォーク
- 23.1k
- PR マージ指標
- PR 指標を取得中
説明
**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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api, cli
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 50/100