OpenCode

OpenCode manages each provider directly, so override the connection per provider in ~/.config/opencode/opencode.json. Deep-merge the block below under providers. This example configures Anthropic. Repeat the provider block for each provider you use, ending the URL with that provider's Sleev provider ID. OpenCode's openai provider uses /sleev/opencode/openai, both with an API key and with "Sign in with ChatGPT", which is now the way to use a ChatGPT subscription. Only the older "Codex (legacy)" sign-ins use /sleev/opencode/codex.

This sends the Anthropic provider through the local Sleev gateway.

OpenCode 1 uses an older config shape. Use provider instead of providers and put baseURL under options .