ANT for OpenCode
Stop overpaying for every terminal AI request. ANT routes each coding task to the optimal model automatically — frontier models for hard problems, fast models for quick answers, free models for experiments.
Setup in 30 seconds
{
"provider": "openai-compatible",
"baseUrl": "https://antbase.ai/v1",
"apiKey": "your-ant-api-key",
"model": "ant:coder"
}Pick an intent, not a model
ANT virtual models route to the best underlying model for each task type.
Routes to the best code model available — Claude Opus, GPT-5, DeepSeek Coder
Chain-of-thought for architecture decisions, complex debugging, algorithm design
Sub-second completions for quick questions and inline suggestions
Zero cost with Llama, Gemma, Qwen — perfect for experimentation
Maximum quality regardless of cost — for critical code reviews
Let ANT decide — simple questions get fast models, hard ones get frontier
How it works in practice
Different tasks → different models → different costs. Automatically.
| Task | Model | Time | Cost |
|---|---|---|---|
Quick question "What does this flag do?" | ant:fast | ~0.2s | $0 |
Code generation "Write a retry wrapper with exponential backoff" | ant:coder | ~1s | $0.002 |
Refactoring "Refactor this module for testability" | ant:coder | ~3s | $0.01 |
Architecture "Review this module structure for scaling issues" | ant:reasoning | ~5s | $0.03 |
Debugging "Why does this deadlock under load?" | ant:reasoning | ~8s | $0.05 |
Experimenting "Try 5 different approaches to this problem" | ant:free | ~1s | $0 |
Make OpenCode smarter
One config file. 20,000+ models. Intelligent routing for every coding task.