Skip to main content

Anthropic

WednesdayAI uses Anthropic’s Claude models for its default AI. There are three ways to authenticate, and several Claude-specific options: thinking, prompt caching, and the 1M context window.

Authentication

Create a key in the Anthropic Console, then onboard:
Or set the key on the gateway host so the daemon can read it:

Option B — OAuth token env var

For scripted or containerised setups where you already hold an Anthropic OAuth token (sk-ant-oat-...):
ANTHROPIC_OAUTH_TOKEN is checked before ANTHROPIC_API_KEY — if both are set, the OAuth token wins. It bypasses the auth-profile store; openclaw models status shows it as OAuth (env).

Option C — Claude setup-token (subscription)

Setup-tokens are created by the Claude Code CLI on any machine:
Paste it on the gateway host:
Anthropic has restricted subscription credential use outside Claude Code in the past. Setup-token support is technical compatibility only — verify Anthropic’s current terms before relying on it. API key auth is the safer, recommended path.

Selecting a model

Common Claude model references:

Thinking

Claude 4.6 models default to adaptive thinking when no explicit level is set. Override per message with /think:<level>, or pin it in model params:

Prompt caching

Prompt caching reuses the cache for repeated system-prompt prefixes, cutting cost and latency. It is API-only — subscription/OAuth auth does not honour cache settings. With an API key, WednesdayAI applies cacheRetention: "short" automatically; override it via model params:
You can set a model-level baseline and override per agent via agents.list[].params — for example one agent on long and a bursty alerts agent on none to avoid cache-write costs.

1M context window (beta)

Anthropic’s 1M context window is beta-gated. Enable it per model with params.context1m: true for supported Opus/Sonnet models:
The 1M context requires Anthropic to allow long-context usage on that credential (typically API-key billing). Anthropic rejects the context-1m beta on OAuth/subscription tokens, so WednesdayAI skips the beta header for OAuth auth automatically.

Environment variables

Troubleshooting

Subscription auth can expire or be revoked. Re-run claude setup-token and paste it on the gateway host with openclaw models auth paste-token --provider anthropic. For long-lived deployments, switch to an API key.
Anthropic blocked the subscription credential for non-Claude-Code use. Use an API key instead.
Auth is per agent — new agents do not inherit the main agent’s keys. Re-run onboarding for that agent, or paste a token/key on the gateway host, then verify with openclaw models status.
Check openclaw models status --json for auth.unusableProfiles. Add another Anthropic profile or wait for the cooldown to clear.