Skip to content
RU

Roo Code

Connect Roo Code to Mixen — pay from your balance in roubles, with a catalog of 105+ models.

Roo Code is an agentic extension for VS Code (a fork of Cline). Install it from the VS Code Marketplace: Extensions → search for “Roo Code” → Install.

  1. Open Roo Code in the VS Code sidebar, then open the settings — the gear icon.
  2. In the API Provider field, select OpenAI Compatible.
  3. Fill in the connection fields:
Base URL: https://api.mixen.ai/v1
API Key: your-api-key
Model: anthropic/claude-opus-5
  1. In Model Configuration, you can set the Context Window, Max Output Tokens, and Input/Output prices — Roo Code will then track spend itself; use the model’s card in the catalog as a reference.

Unlike Cline, Roo Code has no XML fallback for tools: the model must support native tool calling (the OpenAI tools API). Mixen supports it on /v1/chat/completions, so any tool-calling model from the catalog works.

Before setting up the provider, you can check the key and balance with a minimal generating request:

curl https://api.mixen.ai/v1/chat/completions \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"z-ai/glm-5.3-flash","messages":[{"role":"user","content":"ping"}],"max_tokens":5}'

200 with a response — the key and balance work; 401 invalid api key — the key was copied incompletely or isn’t a Mixen API key; 402 — no funds on the balance.

GET /v1/models does not verify the key — it responds without one; use it only to check that the API is reachable.

Roo Code runs long agent cycles of “read → think → edit”, and the input price matters more than the output price. Prices below are per 1M tokens, input/output; full tables with cache columns — in the catalog.

Task Model Input / output
Ask and Architect modes: questions, plans, review GLM 5.3 Flash (z-ai/glm-5.3-flash) 8.4 / 27.9 ₽
Everyday edits in Code GLM 5.3 (z-ai/glm-5.3) 156 / 490.2 ₽
Complex multi-step tasks in Code GPT-5.6 Sol (openai/gpt-5.6-sol), Claude Sonnet 5 (anthropic/claude-sonnet-5) 213.9 / 1069.5 ₽

Roo Code modes each remember their last-used model — assign a cheap one to Ask/Architect and a strong one to Code once, and from then on switching modes switches the model automatically.

Mode What it does Model
Ask code questions, read-only z-ai/glm-5.3-flash
Architect plans and design, edits markdown only z-ai/glm-5.3-flash
Code file edits and terminal commands z-ai/glm-5.3, openai/gpt-5.6-sol
Debug systematic diagnostics of tricky bugs openai/gpt-5.6-sol
Orchestrator breaks a task into subtasks and delegates to other modes openai/gpt-5.6-sol

Every Roo Code step sends the accumulated context in full — system prompt, rules, history, read files. Mixen caches that repeating prefix on its own; nothing to enable.

  • Cached input is ~10% of the regular price: for GPT-5.6 Sol, input is 213.9 ₽ per 1M tokens and 21.4 ₽ from cache; for GLM 5.3 Flash — 8.4 and 1.7 ₽.
  • The cache lives 5 minutes, and every hit extends that window. In a continuous session the cache doesn’t expire from the first turn to the last.
  • A pause over 5 minutes — the first turn after it pays the full input price; that’s expected behavior, not a double charge.

What follows in practice:

  • Plan on a cheap model, edit on an expensive one — both warm the same cache, because the context is shared.
  • Don’t stretch a task with pauses: the same ten turns in a row cost noticeably less than the same ten turns scattered across the evening.
  • Responses stream as real per-symbol deltas; this doesn’t affect the price.

Let’s price a working day in Code on GLM 5.3 (input 156 ₽ per 1M, from cache — 29 ₽): 30 turns, each sending ~50K tokens of context.

Scenario Session input
Without cache 1.5M tokens × 156 ₽ ≈ 234 ₽
With cache first turn in full, then the prefix at 29 ₽ ≈ 68 ₽

The cache discount depth differs per model: for GLM 5.3 repeated input costs ~19% of full price, for GPT-5.6 Sol ~10% of an already higher full price. The exact “full/cache” pair for each model — in the catalog. The numbers are indicative: real volumes depend on the project and the number of open files.

The cache share of a response is visible in usage.prompt_tokens_details.cached_tokens. And since you enter the prices in Model Configuration manually, take them from the catalog too — then Roo Code’s built-in spend tracker will show plausible roubles, cache discount included.

The OpenAI Compatible provider in Roo Code’s settings has a Reasoning Effort selector — the chosen value goes into our reasoning_effort parameter. Mixen accepts off, low, medium, high, xhigh, and max — which of these a given model supports is listed in GET /v1/modelscapabilities.reasoning_efforts (the can_disable_reasoning flag shows whether it accepts off).

Keep in mind:

  • Reasoning is billed as output tokens and eats the response-length limit — long edits need headroom on Max Output Tokens, or generation stops mid-way.
  • High depth pays off in Debug and on unfamiliar code; for simple edits low/medium is enough.
  • Modes per turn type. Code — edits and commands; Ask — code questions (read-only, doesn’t touch files); Architect — plans and design (edits markdown files only); Debug — systematic diagnostics; Orchestrator (Boomerang) — breaks a large task into subtasks and delegates them to other modes. Switch via the dropdown next to the input field or slash commands /code, /ask, /architect, /debug, /orchestrator.
  • A model per mode. Roo remembers each mode’s last-used model and selects it on switching; the active mode also persists between sessions. The saving scheme: Ask/Architect — GLM 5.3 Flash, Code — GLM 5.3 or GPT-5.6 Sol.
  • Rules live in .roo/rules/. A .roo/rules/ directory at the project root (or a single .roorules file if the directory doesn’t exist); mode-specific rules — .roo/rules-code/ and so on; global — ~/.roo/rules/. Files are read recursively and alphabetically; AGENTS.md at the root is picked up automatically. Project rules override global ones.

A typical project rules layout:

.roo/
rules/ # rules for all modes
01-style.md
02-tests.md
rules-code/ # Code mode only
hotfixes.md
rules-architect/ # Architect only
adr-template.md
  • Tools are native. Roo works only with the OpenAI tools API, and Mixen supports tools and tool_choice on /v1/chat/completions — including multi-turn scenarios with role: 'tool'. The single limitation: the model itself must support tool calling.
  • Ask and Architect — on GLM 5.3 Flash, Code and Debug — on GLM 5.3 or GPT-5.6 Sol; modes remember their models.
  • Do reconnaissance in Ask — read turns are cheap and warm the shared cache.
  • Reasoning Effort — low/medium for routine edits, high+ for Debug and unfamiliar code.
  • Prices in Model Configuration — from the model’s card in the catalog.
  • A new task means a fresh session in the right mode, not a continuation of a bloated history.
Model ID
GPT-5.6 Sol openai/gpt-5.6-sol
Claude Opus 5 anthropic/claude-opus-5
GLM 5.3 z-ai/glm-5.3
DeepSeek V4 Pro deepseek/deepseek-v4-pro
Kimi K3 moonshotai/kimi-k3

Full list — in the catalog.

  • “Invalid API Key” / 401 — the key must be from Mixen (starts with mxn-) and copied in full; check that the OpenAI Compatible provider is selected.
  • “Model Not Found” / 404 — the Model ID is entered manually and must exactly match the catalog, including the provider prefix.
  • Errors when calling tools — Roo Code works with native tool calling only; if a model misbehaves on tools, switch to another one from the catalog.
  • The mode uses a different model than the one you picked — modes remember their models: you switched to Ask and found last week’s cheap model there — by design. Change the model while in that mode.
  • The first turn after a pause costs more than the rest — the cache went stale after 5+ minutes of idle time, so the turn paid the full input. The next turns get cheap again.