Roo Code:実測トークン倍率&BYOK コスト最適化ガイド
Multi-mode VS Code agent (Architect, Code, Debug, Ask) with per-mode system prompt pruning and model profiles.
Context & Token Overhead Mechanics
In a 15-turn refactor with 5 tool calls, stripping unused tool schemas in Architect/Ask modes trims the multiplier to 1.7x–2.6x (~15% cheaper than Cline).
Baseline instructions & tool schema weight per turn
Per-mode stripped system prompts (Ask/Architect exclude edit tools) + sliding window condense
Separating Ask/Architect from Code trims base prompt overhead by ~25% vs single-mode extensions while preserving cache stability.
Model Compatibility Matrix & 15-Turn Cost
Estimated on 30k raw input + 4.5k output scaled by 2.0x multiplier at 70% cache hit rate
| Model | Tool Calling | Prompt Caching | Vision | Streaming | Est. 15-Turn Cost |
|---|---|---|---|---|---|
| DeepSeek: DeepSeek V4.1 FlashCode Mode Budget | Native | Full | Supported | Stable | $0.002 |
| Qwen: Qwen3 Coder 480B A35BSpecialized Open Coder | Native | Full | N/A | Stable | $0.016 |
| Anthropic: Claude Sonnet 5.5Orchestrator / Architect | Native | Full | Supported | Stable | $0.105 |
| Google: Gemini 4 Neon1M Context Architect | Native | Full | Supported | Stable | $0.158 |
Production BYOK & DeepSeek / OpenRouter Config
Supports multiple saved API Configuration Profiles and binds different models + Base URLs to Architect, Code, Ask, and Orchestrator modes.
{
"Code": {
"apiProvider": "openai",
"openAiBaseUrl": "https://api.deepseek.com/v1",
"openAiApiKey": "${DEEPSEEK_API_KEY}",
"openAiModelId": "deepseek-chat"
},
"Architect": {
"apiProvider": "openrouter",
"openRouterApiKey": "${OPENROUTER_API_KEY}",
"openRouterModelId": "google/gemini-4-neon"
}
}