Verified July 27, 2026

Claude Fable 5 in OpenCode

The configuration that looks most thorough is the one that breaks it.

The short answer

Supported on OpenCode 1.17.0 and later — set model to anthropic/claude-fable-5 in opencode.json and you are done. The important instruction is negative: do not add a provider.anthropic.models.claude-fable-5 block to customise name, limits or thinking. Custom-defined entries miss the Fable reasoning path and produce empty responses with no error.

Support status

Supported with one significant trap, verified July 27, 2026. Fable reasoning support landed in a commit titled fix(opencode): support Claude Fable reasoning on June 9, 2026, touching the provider transform layer, and shipped in 1.17.0. Model selection is standard: the full ID is provider_id/model_id, so anthropic/claude-fable-5. The trap is documented in issue #31738: when claude-fable-5 is not resolved from the models.dev catalog — either because it has to be added as a manual provider model, or because your opencode.json overrides the catalog entry with custom name, limit or variants — OpenCode treats it as a generic Anthropic model and skips the adaptive-reasoning handling. The result is a stream that runs for ten to twenty seconds, exits the agent loop cleanly, logs nothing at any level, and renders nothing.

Setup

Three steps to run it, and a fourth to keep it running.

  1. 1

    Upgrade to 1.17.0 or later

    Fable reasoning handling was added in the 1.17.0 release, building on the adaptive reasoning controls for Opus 4.7 and later introduced in 1.15.12 and 1.16.0. Older versions can still send requests, but they will not process the model's reasoning output correctly.

  2. 2

    Authenticate the Anthropic provider

    Run opencode auth login --provider anthropic and supply your API key. This stores credentials outside your project config, which is what you want — the model ID belongs in a committed opencode.json, the key does not.

  3. 3

    Set the model in opencode.json

    Add the model key with the value anthropic/claude-fable-5, alongside the $schema line pointing at https://opencode.ai/config.json. For one-off escalation, pass -m anthropic/claude-fable-5 on the command line — the flag takes priority over the config file, which itself takes priority over the last-used model.

  4. 4

    Leave the catalog definition alone

    Resist the urge to add a provider block for this model. The docs show provider.anthropic.models entries with a thinking object for older Claude models, and copying that pattern to Fable 5 is exactly what triggers the silent-failure path — as well as sending a budget the model rejects.

Gotchas

The first one costs you an afternoon because it does not look like an error.

  • Empty response, zero tokens, no error

    Issue #31738 describes the signature precisely: the stream starts, runs eight to seventeen seconds, the loop exits cleanly, and the stored message has finish unknown, zero tokens in every category, a null error, and no thinking or text parts at all. It is intermittent within a session — trivial prompts often render fine while long ones die — which makes it easy to blame the network. Remove your model override and it stops.

  • Subscription access needs a plugin, and it changes refusal behaviour

    To use a Claude Pro or Max subscription rather than an API key, community plugins register an OAuth-backed provider using the credentials Claude Code stores. One widely used plugin enables Anthropic's server-side refusal fallback by default, so a Fable 5 refusal is answered by Opus 4.8 in the same round trip. That is convenient, and it also means some of your turns are silently billed and reasoned as Opus.

  • The thinking example in the docs is not for this model

    OpenCode's model configuration docs show an Anthropic entry with thinking type enabled and a budgetTokens value. That shape belongs to the Sonnet-era models. Fable 5 removed budget_tokens and rejects both enabled and disabled thinking types with a 400, so copying the example gives you an error instead of deeper reasoning.

Cost notes

OpenCode's model resolution order — command-line flag, then config, then last-used — makes per-task escalation cheap to adopt: keep a mid-tier model as the default in opencode.json and reach for -m anthropic/claude-fable-5 only on the tasks that justify it. Two cost items are easy to miss. Refusal fallback to Opus 4.8, if your setup enables it, bills as Opus. And the silent-failure mode from issue #31738 can consume real time and produce nothing, so verify your first few turns actually render before starting a long session.

Compare terminal agents before you commit

OpenCode, Aider and Claude Code all run Fable 5 from a terminal, and all three fail differently. The integrations hub lays out what each one actually does with the model.

FAQ