OpenCode / Continue: 실제 토큰 배수 측정 및 BYOK 비용 절감 가이드
Vendor-neutral open-source agent ecosystem (OpenCode TUI + Continue VS Code/JetBrains) via declarative config.yaml/json.
Context & Token Overhead Mechanics
In a 15-turn refactor with 5 tool calls, explicit @-file scoping and a slim 1.85k system prompt keep overhead at 1.5x–2.3x.
Baseline instructions & tool schema weight per turn
Explicit @-context providers + OpenCode /compact session pruning + minimal 1.8k system prompt
Supports prompt caching natively on Anthropic, DeepSeek, and OpenRouter endpoints when `cache: true` / `promptCaching` is enabled.
Model Compatibility Matrix & 15-Turn Cost
Estimated on 30k raw input + 4.5k output scaled by 1.9x multiplier at 70% cache hit rate
| Model | Tool Calling | Prompt Caching | Vision | Streaming | Est. 15-Turn Cost |
|---|---|---|---|---|---|
| DeepSeek-V3 (deepseek-chat)Primary Open-Source | Native | Full | N/A | Stable | $0.014 |
| DeepSeek: DeepSeek V4.1 FlashUltra-Low Cost | Native | Full | Supported | Stable | $0.002 |
| Llama 3.3 70B Versatile420 t/s Autocomplete & Fast Chat | Native | Full | N/A | Stable | $0.026 |
| Google: Gemini 4 NeonFrontier 1M Agent | Native | Full | Supported | Stable | $0.146 |
Production BYOK & DeepSeek / OpenRouter Config
Zero vendor lock-in: configure OpenRouter, DeepSeek, Groq LPU, LiteLLM, vLLM, or Ollama declaratively in `opencode.json` or `~/.continue/config.yaml`.
{
"$schema": "https://opencode.ai/config.json",
"model": "deepseek/deepseek-chat",
"small_model": "openrouter/deepseek/deepseek-v4.1-flash",
"provider": {
"deepseek": { "options": { "apiKey": "{env:DEEPSEEK_API_KEY}" } },
"openrouter": { "options": { "apiKey": "{env:OPENROUTER_API_KEY}" } }
}
}