Skip to content
Roo Code logo

Roo Code via Tokonomix

Run Roo Code’s multi-mode agent team on 130+ models behind one key — and add a cross-family consensus check to its Architect and Code modes.

OpenAI-compatible base URLMCP-capableMulti-mode VS Code agentApache-2.0 · open sourceVS Code · all platforms
Roo Code — an AI dev team in your editor, via Tokonomix

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-consensus for Architect.
  • Call tokonomix_consensus_ask via 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_country for 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-consensus

Route B — consensus via MCP

Roo Code → MCP Servers → Edit configuration:

{
  "mcpServers": {
    "tokonomix": {
      "command": "npx",
      "args": ["-y", "tokonomix-mcp"],
      "env": { "TOKONOMIX_API_KEY": "tok_live_..." }
    }
  }
}
Tip — model per mode

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 modeRecommended modelWhy
Codeanthropic/claude-sonnet-4-6High-frequency edits — fast and cheap per turn
Architecttokonomix-consensusPlans and migrations benefit from multiple perspectives + a judge
Debuga frontier reasoning slugRoot-causing rewards strong single-model reasoning
Askany fast modelQ&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.

Model selection

Which model and endpoint should my agent use?

Pick by what your agent does, then swap the model id any time — every model in the catalog works through the same key.

What your agent doesUse this
Edits files / calls tools and streams responses (most coding agents)An Anthropic model via the Anthropic endpoint (tools + streaming both work)
Calls tools but does not need streaming (any model)The OpenAI-compatible endpoint with a single model id
Wants tools and streaming on a non-Anthropic modelRun non-streaming for now — streaming tool-calls on other providers is not enabled yet
Plain chat, no toolsEither endpoint; streaming is fine
Wants a cross-model verdict (consensus) on a high-stakes answerSet model to tokonomix-consensus on the OpenAI-compatible endpoint — note: consensus rejects tool requests (no tool-calling)
Endpoint & API reference (technical)

anthropic-messages → https://tokonomix.ai/api/anthropic — tools ✓, streaming ✓ (use an Anthropic model). openai-completions → https://tokonomix.ai/api/v1 — tools ✓ (single-model passthrough), streaming with tools not yet enabled. Plain chat: streaming works on both. Consensus: openai-completions, model tokonomix-consensus, no tools. Swap the model id to any slug returned by GET /api/v1/models.

Browse all models →

Related agents