scanning providers... 75+ detected
opencode zen: online, 6 free models
OpenCode is a terminal-native, MIT-licensed coding agent with 188,000 GitHub stars, 7.5M monthly developers, and 75+ LLM providers. Through OpenCode Zen, six models — including DeepSeek V4 Pro — are completely free. Here's the full setup.
OpenCode is a free, open-source, terminal-native AI coding agent connecting to 75+ LLM providers. OpenCode Zen's free tier gives you DeepSeek V4 Pro (80.6% SWE-bench), Kimi K2.5 (best frontend), Big Pickle, and more — all at $0/month, no API key required. No code leaves your machine unless you pick a cloud provider. LSP integration catches errors in real time. Two built-in agents: Build (full-access) and Plan (read-only). The whole stack costs less than one month of Cursor Pro.
What Is OpenCode?
OpenCode is a terminal-native AI coding agent built by Anomaly (the team behind SST). It launched June 2025 and reached 188,000 GitHub stars by July 2026 — the most popular open-source AI coding agent by a wide margin, with 900+ contributors and 846 releases (latest v1.18.4).
The core philosophy is model agnosticism. Unlike Claude Code (Anthropic-only) or Cursor (a limited model menu), OpenCode treats the agent harness, tool registry, and model provider as independent layers. Start a session with Gemini 3.1 Pro for planning, switch to Kimi K2.5 for implementation, finish with DeepSeek V4 Pro for review — without leaving the terminal. The agent is MIT-licensed TypeScript; the model registry runs on models.dev, a community-maintained catalog of 75+ providers.
OpenCode runs as a local client-server architecture: the agent server handles tool execution, LSP integration, and model communication, while the TUI, desktop app, or IDE extension connects as a client — same session, driven from your terminal, VS Code, or a CI/CD pipeline.
OpenCode Zen: Free Models, Zero API Keys
Zen is Anomaly's curated model gateway — models tested, benchmarked, and verified specifically for coding agents, with correct serving configs confirmed before recommendation. As of July 2026, Zen offers six completely free models, no API key required: DeepSeek V4 Flash Free, Big Pickle, MiMo-V2.5 Free, Laguna S 2.1 Free, North Mini Code Free, and Nemotron 3 Ultra Free. Paid Zen models run at or near provider list price plus a 4.4% + $0.30 fee. Zen Pro ($9.99/mo) unlocks unlimited requests and priority access.
# 1. Install OpenCode
❯ curl -fsSL https://opencode.ai/install | bash
# 2. Launch and connect Zen
❯ opencode
❯ /connect
# 3. Select a free model
❯ /models
# pick: opencode/deepseek-v4-flash-free
The Free Model Lineup — Ranked
Tested across full-stack apps, API refactors, bug hunts, and code reviews. Ranked best overall to situational specialist.
opencode/kimi-k2.5 at $0.60/M input.opencode/minimax-m2.5.opencode/gpt-5-nano.opencode/big-pickle.OpenCode vs Cursor vs Copilot vs Claude Code
| Feature | OpenCode | Cursor Pro | Copilot | Claude Code |
|---|---|---|---|---|
| Monthly price | $0 | $20/mo | $10/mo+credits | $20–200/mo |
| Open source | MIT ✓ | ✕ | ✕ | ✕ |
| Model flexibility | 75+ providers | limited menu | Copilot menu | Anthropic only |
| LSP integration | 18+ languages | partial | ✕ | ✕ |
| Max privacy | 100% local (Ollama) | sent to Cursor | sent to GitHub | sent to Anthropic |
| Multi-session | parallel agents | Composer 2 | limited | v4.7+ |
| CI/CD support | native | ✕ | Actions | limited |
| Free models included | 6+ via Zen | ✕ | limited free tier | ✕ |
How to Set Up DeepSeek V4 Pro
Two paths: via Zen (simpler, unified billing) or the direct DeepSeek API (cheaper, $0.435/M input with the permanent 75% discount).
Path A — via OpenCode Zen
# in the OpenCode TUI:
❯ /connect
# select "OpenCode Zen", sign in, paste API key
# switch to DeepSeek V4 Pro:
❯ /model opencode/deepseek-v4-pro
Path B — direct DeepSeek API (cheapest)
// get an API key from platform.deepseek.com, then:
{
"model": "deepseek/deepseek-v4-pro",
"providers": {
"deepseek": {
"baseURL": "https://api.deepseek.com/v1",
"apiKey": "${DEEPSEEK_API_KEY}"
}
}
}
Connect Local Models via Ollama
For HIPAA, PCI DSS, air-gapped environments, or just full control, OpenCode connects directly to Ollama — your code never leaves the machine. You'll want a 70B+ class model for reliable tool-calling; smaller models hallucinate function arguments.
# 1. pull and run a model
❯ ollama pull qwen3:72b
# 2. configure OpenCode
{
"model": "ollama/qwen3:72b",
"providers": {
"ollama": {
"type": "openai-compatible",
"baseURL": "http://localhost:11434/v1",
"apiKey": "ollama"
}
}
}
# ⚠ critical: raise Ollama's default 4K context — too small for tool calls
❯ ollama run qwen3:72b
❯ /set parameter num_ctx 32768
❯ /save qwen3:72b-32k
The Model Chaining Workflow
OpenCode's model-agnostic architecture enables what no other agent matches: different models for different phases, each optimized for its task.
No single model is best at everything: Gemini's 1M context wins for reading whole codebases, Kimi's frontend specialization beats models costing 10× more, DeepSeek's 80.6% SWE-bench catches bugs others miss, and MiniMax at $0.30/M is cheap enough to run on every commit.
Build vs Plan: Two Agents, Zero Risk
Toggle with Tab. Plan mode is read-only — reads files, searches the codebase, proposes changes, but can't edit or run commands without permission. Start every session here. Build mode is full-access — file edits, shell commands, MCP tools. Workflow: Plan first, read the proposal, press Tab, let it build.
There's also a general subagent (@general) for complex multi-step searches, and an explore subagent — cheap, read-only, for fanning out file searches without burning expensive tokens. Custom subagents live in .opencode/agents/ with their own model, tools, and prompt.
LSP Integration
OpenCode spawns Language Server Protocol servers and feeds real compiler diagnostics back to the model after every edit — when it introduces a type error, it sees the error and self-corrects. Claude Code doesn't have this; Cursor has partial support. OpenCode covers 18+ languages out of the box.
Builder.io's testing found OpenCode produced more thorough output than Claude Code (94 tests vs 73) — the LSP loop adds overhead but catches more errors, a tradeoff worth it for production work.
{
"lsp": {
"typescript": { "command": ["typescript-language-server", "--stdio"] },
"go": { "command": ["gopls"] },
"rust": { "command": ["rust-analyzer"] }
}
}
// or enable all 25+ built-in servers:
{ "lsp": true }
Your Code Stays Yours
OpenCode never proxies your code — requests go directly from your machine to the LLM provider you choose. No OpenCode server sits in the middle. Session history lives locally in SQLite. No telemetry, no training on your code, no account required for the core tool.
Pair OpenCode with Ollama for maximum privacy — suitable for HIPAA, PCI DSS, defense, and air-gapped work. For cloud models, you choose which provider sees which code: GPT-5 Nano for sensitive projects, DeepSeek V4 Pro for everything else.
Pros & Cons
Pros
- $0/month — agent free, 6+ free models via Zen
- 75+ providers — no vendor lock-in, switch mid-session
- MIT license — inspect, modify, self-host
- LSP integration — real-time self-correcting edits
- 100% local option — Ollama + air-gapped, zero data leaves
- Model chaining across plan/implement/review/ship
- Native CI/CD mode for automated workflows
- Git-based undo — every change snapshotted
Cons
- Free models are rate-limited — ~100–200 req/day on Zen free
- No native sandbox — runs in your shell, not an isolated VM
- Single agent loop — no parallel fan-out like Composer 2
- Terminal-first — IDE extensions exist but TUI leads
- No inline completions — pair with Copilot/Cursor for that
- Some free models may train on data — check per-model policy
- Not all free models match Claude Opus on hard architecture
- Ollama's default 4K context must be raised manually
The $0 Stack vs the Competition
A solo dev running Cursor Pro ($20) + Copilot ($10) + occasional Claude API (~$15) spends roughly $45/month — $540/year, before model API costs. The OpenCode stack: $0 for the agent, $0 for free Zen models, and even a heavy month on DeepSeek V4 Pro's direct API (~10M input tokens) runs about $4.35.
Frequently Asked Questions
/connect. Note Copilot now bills metered AI Credits, and agentic terminal sessions burn them faster than editor chat.Bottom Line
OpenCode + free models is the most compelling value proposition in AI coding tools in 2026. For $0/month you get a production-grade coding agent with LSP integration, 75+ provider support, and models that rival $20/month subscriptions on benchmarks. The model-chaining workflow — Gemini for planning, Kimi for implementation, DeepSeek for review — is something no commercial tool replicates. If you're paying for Cursor or Copilot and haven't tried OpenCode, you're leaving money and capability on the table.
You scroll through the agent stack, already sketching the architecture on a notepad beside your keyboard.
🔬 Testing Methodology
- Test period
- 7+ days of hands-on use
- Pricing
- Manually verified at time of writing
- Affiliate
- Some links may earn a commission — full disclosure