Overview
OpenCode is an open source coding agent that supports 75+ LLM providers. In Blocks, OpenCode currently supports Anthropic (Claude models) and OpenAI (GPT models), with additional provider support planned. With over 650,000 monthly users, OpenCode offers a privacy-focused approach where no code is stored on external servers.Latest Models
OpenCode provides access to multiple providers through its curated “Zen” model service. In Blocks, the following providers are currently supported:- OpenAI: GPT-5, GPT-4o, GPT-4 Turbo
- Anthropic: Claude 4.5 Opus, Claude 4.5 Sonnet
While OpenCode supports 75+ providers including Google, AWS Bedrock, Groq, OpenRouter, and Azure, Blocks currently only supports Anthropic and OpenAI API keys. Additional provider support is coming soon.
Authentication
OpenCode supports multiple authentication methods depending on your provider:- Anthropic API Key
- OpenAI API Key
- Other Providers
Use Anthropic models (Claude 4.5 Opus, Sonnet)
- Get an API key at Anthropic Console
- Set the environment variable:
ANTHROPIC_API_KEY=sk-ant-... - In Blocks Dashboard, go to Dashboard → Agents
- Select OpenCode and choose “Anthropic”
- Paste your API key
Setting as Default
To use OpenCode automatically for all requests:- Go to Dashboard → Agents
- Select “Set as default agent” from OpenCode’s dropdown menu
Using OpenCode
Once configured, OpenCode is used automatically if it’s your default agent:/opencode slash command to use it specifically:
Best For
- Flexibility between OpenAI and Anthropic models
- Privacy-focused development (no code storage)
- Open source transparency
- Cost optimization (switch between providers based on task complexity)
- Experimentation with different models from major providers
- Teams wanting to avoid vendor lock-in
Cost
OpenCode costs vary by provider. Currently supported in Blocks:- Anthropic: Check Anthropic Pricing for Claude models
- OpenAI: Check OpenAI Pricing for GPT models
You can switch between Anthropic and OpenAI to optimize costs based on task complexity. Use the provider that best fits your needs and budget for each task.

