Skip to main content
AI coding agents

OpenCode

Open-source coding agent that runs in the terminal. It connects to model providers through a /connect command or a config file, and supports local runtimes such as Ollama, LM Studio and vLLM.

Pricing model
Free tier and paid plans
Free tier
Yes
Self-hostable
Yes
Open source
Yes (MIT)

OpenCode works with 12 of the LLM providers we track

Each is documented in OpenCode's own docs, shown with its lowest current rate from the prices we track, per 1M input tokens. OpenCode may support providers we don't track; its documentation (opens in a new tab) has the full list.

LLM providers that OpenCode works with
ProviderLive price
Amazon AWSSetup docs ↗ for Amazon AWS (opens in a new tab)from $0.018/1M input53 models
AnthropicSetup docs ↗ for Anthropic (opens in a new tab)from $0.100/1M input15 models
CerebrasSetup docs ↗ for Cerebras (opens in a new tab)from $0.990/1M input1 model
DeepSeekSetup docs ↗ for DeepSeek (opens in a new tab)from $0.300/1M input2 models
Fireworks AISetup docs ↗ for Fireworks AI (opens in a new tab)from $0.150/1M input5 models
Google CloudSetup docs ↗ for Google Cloud (opens in a new tab)from $0.037/1M input15 models
GroqSetup docs ↗ for Groq (opens in a new tab)from $0.075/1M input3 models
Microsoft AzureSetup docs ↗ for Microsoft Azure (opens in a new tab)from $0.150/1M input9 models
OpenAISetup docs ↗ for OpenAI (opens in a new tab)from $0.025/1M input22 models
OpenRouterSetup docs ↗ for OpenRouter (opens in a new tab)from $0.015/1M input213 models
Together AISetup docs ↗ for Together AI (opens in a new tab)from $0.050/1M input53 models
xAISetup docs ↗ for xAI (opens in a new tab)from $1.00/1M input5 models