English
Set Up Claude Fable

Use Claude Fable in OpenCode

Anthropic's model overview (opens in a new tab) lists Claude Fable 5.1 with the native API ID claude-fable-5-1. A newer model does not automatically become available in every gateway or account.

Before you configure it

Confirm the model you are entitled to use in the provider's console or model list. If maintaining an older Fable 5 integration, consult the provider's supported-model and retirement information instead of silently changing the ID. The official Fable page (opens in a new tab) links the model announcements.

OpenCode is the client; inference is provided and billed by the connected service. A Claude chat subscription is not an API key. Check the billing method and spending controls for the account you will connect.

Connect through Anthropic

  1. Open your project and start opencode.
  2. Use /connect, select Anthropic, and enter a valid Anthropic API key. Do not put a key into a shared prompt or a committed file.
  3. Use /models to check the models exposed by your OpenCode provider catalog. Select the required Fable model if it is present and available to your account.
  4. Send a small, non-sensitive request. A response and the provider's usage record are the useful checks; a model appearing in a menu alone is not an integration test.

If the model is missing, check the installed OpenCode version and official provider instructions.

Connect through a gateway

First obtain the gateway's exact endpoint, protocol, key and model ID. Native Anthropic IDs and gateway aliases are not interchangeable by assumption. A Chat Completions-compatible gateway needs a different adapter from a native Anthropic endpoint or a Responses-only endpoint.

Use the complete third-party API template, which keeps endpoint and key in environment variables and marks the model ID for replacement. Confirm that your gateway supports the required Fable model before configuring it.

Save the native model selection

After connecting Anthropic, this project configuration selects Fable 5.1 with its native provider ID:

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-fable-5-1"
}

For an existing Fable 5 setup, keep the exact supported ID of that integration until you have tested the replacement. The page URL is not a reason to substitute a different model silently. Check the model settings and account access, then make the model change explicitly.

Use Fable through Zen

Zen's model and endpoint tables include Fable entries under its own model namespace. Connect OpenCode Zen with /connect, then select an available Fable model with /models. A Zen model uses opencode/<model-id> in client configuration; it does not use the anthropic/ prefix from the native example.

Review Zen's price and data terms before changing the provider. A matching model name does not transfer credentials, balances or usage allowances between services. For other gateways, the provider reference explains the relationship between a custom provider ID, adapter and model key.

Try one coding task

Start from a known repository state and ask for a small change with an observable result. Use project rules to state the test command and files in scope. Set permissions appropriate to the tools needed by the task, then review both the patch and executed checks.

If you compare Fable with another model, preserve the task and configuration and record manual corrections as well as model charges. Agents can have their own model settings, so confirm which agent handled the request. The coding workflow guide provides a complete trial sequence.

For editor use, follow the IDE guide. For timeouts or certificate failures, check network settings before treating the problem as a model capability issue.

Verify and troubleshoot

For authentication errors, check the key's provider and account permissions. For an unknown-model error, compare the exact ID with the provider's catalog. For timeouts, check proxy and certificate settings. For rate limits, inspect quota and billing rather than repeatedly changing the model name. The connection checklist covers these stages.

After connecting, test a bounded coding change in a reviewable checkout. Define the expected behavior, run the project's checks and inspect the diff. Model-provider claims about capability are not a substitute for your own acceptance criteria.

Compare another workflow

If you are choosing a client rather than fixing model access, compare OpenCode and Claude Code using the same model where possible. The broader coding-agent guide helps separate interface preferences from provider and model choices.

Related references