What is Roo Code?
Roo Code is an open-source autonomous coding agent for VS Code — a whole dev team of AI personas in one extension. It ships several modes — Code, Architect, Ask, Debug and custom ones you define — each with its own prompt and tool permissions, so you can match the model and behaviour to the task.
- Switch between modes (Architect to plan, Code to implement, Debug to diagnose) — each can use a different model.
- Reads and edits files, runs commands, and browses, with approval gates you control.
- Connects to any OpenAI-compatible endpoint and supports MCP tools.
- Per-mode model assignment means you can reserve the expensive model for the mode that needs it.
Why route Roo Code through Tokonomix?
Roo Code’s modes map cleanly onto Tokonomix’s strengths: a cheap fast model for Code, a frontier model for Architect, and consensus for the decisions that are expensive to get wrong — all on one key.
- Assign a different Tokonomix model per mode — e.g. a fast model for Code,
tokonomix-consensusfor Architect. - Call
tokonomix_consensus_askvia MCP when a plan or migration needs a second and third opinion. - One key unlocks 130+ models from every major family — no per-provider setup.
- Cap spend per call and pin models by
hosting_region/origin_countryfor compliance.
Connect Tokonomix to Roo Code
Add Tokonomix as an OpenAI-compatible provider, then (optionally) the MCP server for consensus. You can assign the provider per mode in Roo Code’s settings.
Route A — Tokonomix as the model
Roo Code → Settings → Providers → OpenAI Compatible:
Base URL : https://tokonomix.ai/api/v1
API Key : tok_live_your-key
Model : anthropic/claude-sonnet-4-6
# or any slug from GET /api/v1/models
# Opt-in (planning/review only, no tool-calling): tokonomix-consensusRoute B — consensus via MCP
Roo Code → MCP Servers → Edit configuration:
{
"mcpServers": {
"tokonomix": {
"command": "npx",
"args": ["-y", "tokonomix-mcp"],
"env": { "TOKONOMIX_API_KEY": "tok_live_..." }
}
}
}Assign tokonomix-consensus to Architect mode and a fast direct slug to Code mode, so you only pay consensus latency where the design decisions are made.
What Tokonomix powers in Roo Code
| Roo Code mode | Recommended model | Why |
|---|---|---|
| Code | anthropic/claude-sonnet-4-6 | High-frequency edits — fast and cheap per turn |
| Architect | tokonomix-consensus | Plans and migrations benefit from multiple perspectives + a judge |
| Debug | a frontier reasoning slug | Root-causing rewards strong single-model reasoning |
| Ask | any fast model | Q&A about the codebase — low stakes, low latency |
Verify it works
- Set an OpenAI-compatible Tokonomix provider and pick a slug in any mode.
- Run a small task in Code mode and confirm the edit applies.
- Check the call and token usage appear in your Tokonomix dashboard; add the MCP server to expose the consensus tool to the Agent.

