---
title: "Roo Code integration"
description: "Settings for using Roo Code with MiniRouter."
canonical_url: "https://minirouter.sh/docs/integrations/roo-code"
markdown_url: "https://minirouter.sh/docs/integrations/roo-code.md"
last_updated: "2026-09-26"
---

# Roo Code

Keep an existing Roo Code install running on the MiniRouter catalog.

[Get a key](https://minirouter.sh/key)

Roo Code is a VS Code agent with modes such as Code, Architect and Ask. Add MiniRouter as an OpenAI Compatible provider to run each mode on any tool-capable model in the [catalog](https://minirouter.sh/models), with one balance and per-key [spend limits](https://minirouter.sh/docs/rate-limits).

> **Warning:** Roo Code was archived upstream on 2026-05-15 and gets no updates. For a maintained agent, use [Kilo Code](https://minirouter.sh/docs/integrations/kilo-code) or [Cline](https://minirouter.sh/docs/integrations/cline).

## Quick start

### 1. Create a key

[Create a key](https://minirouter.sh/key) for Roo Code.

> **Tip:** Give Roo its own key, so its spend shows separately in [Usage](https://minirouter.sh/dashboard/usage) and a limit stops only Roo.

### 2. Check the key

Export the key as `MINIROUTER_KEY`, then send one request. A JSON reply means the key and balance work.

```sh
curl https://api.minirouter.sh/v1/chat/completions \
  -H "Authorization: Bearer $MINIROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"zai/glm-5.3-flash","messages":[{"role":"user","content":"ping"}]}'
```

### 3. Add the provider

Open Roo Code sidebar → ⚙ Settings → Providers and fill in:

| Setting | Value |
| --- | --- |
| `API Provider` | OpenAI Compatible |
| `Base URL` | `https://api.minirouter.sh/v1`. The bare host also works. Never append /chat/completions. |
| `API Key` | `mr-live-… (your key)` |
| `Model` | `zai/glm-5.3-flash`. Any catalog id. Save one config profile per model. |

### 4. Send a prompt

Ask Roo anything, then open [Activity](https://minirouter.sh/dashboard/activity). The request lists its model, tokens and exact cost.

## A profile per mode

Roo saves a model per config profile and remembers the last profile used in each mode.

1. In Settings → Providers, press + for each model.
2. Name it after the model, for example MiniRouter Sol.
3. Use the same base URL and key; change only Model.
4. Switch to a mode and pick its profile from the dropdown in chat.

| Mode | Model ID |
| --- | --- |
| Architect | `openai/gpt-5.6-sol`. Stronger reasoning for plans. |
| Code | `zai/glm-5.3-flash`. Cheaper model for edits. |

## Pick a model that calls tools

> **Note:** Roo only runs models with native tool calling.

| Model ID | Uses |
| --- | --- |
| `zai/glm-5.3-flash` | Strong agentic model at low cost. See [GLM 5.3 Flash](https://minirouter.sh/models/zai/glm-5.3-flash). |
| `minirouter/auto:code` | Picks a model with reliable tool calling. See [Auto router](https://minirouter.sh/docs/auto-router). |
| `@preset/your-slug` | Your saved models and instructions. See [Presets](https://minirouter.sh/docs/presets). |

A [preset](https://minirouter.sh/docs/presets) lets you change a profile's model from the dashboard without opening Roo.

## Keep spend in check

- **Profile rate limit**: Seconds between requests, set per profile.
- [Key spend cap](https://minirouter.sh/docs/rate-limits): Daily or monthly cap on the key.
- [Activity](https://minirouter.sh/dashboard/activity): Every request and its cost.

Restrict models or filter content with [Guardrails](https://minirouter.sh/docs/guardrails).

## Recommended models

| Model | Why |
| --- | --- |
| [`zai/glm-5.3-flash`](https://minirouter.sh/models/zai/glm-5.3-flash) | Best current balance of coding ability, agentic performance, context and cost. |
| [`openai/gpt-5.6-sol`](https://minirouter.sh/models/openai/gpt-5.6-sol) | Higher-intelligence option when task quality matters more than spend. |
| [`spacexai/grok-4.6`](https://minirouter.sh/models/spacexai/grok-4.6) | Strong agentic alternative with a 500K-token window. |
| [`google/gemini-3.8-flash`](https://minirouter.sh/models/google/gemini-3.8-flash) | Multimodal coding alternative with a 1M-token window. |

Browse every model in the [catalog](https://minirouter.sh/models).

## Troubleshooting

### 404, HTML, or a parse error on every request

Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself.

Error: [400 `invalid_request`](https://minirouter.sh/docs/errors#invalid_request).

### 401 on every request

Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.

Error: [401 `invalid_api_key`](https://minirouter.sh/docs/errors#invalid_api_key).

### 402 before any tokens arrive

Balance below the estimated cost of the request. Top up (from $0.50 with direct Solana payments) — and watch the x-minirouter-balance-usd header, the low-balance signal every response carries.

Error: [402 `insufficient_credits`](https://minirouter.sh/docs/errors#insufficient_credits).

### Different modes hit different models than expected

Roo remembers a config profile per mode (Code, Architect, Ask…), and each profile holds its own model. Check which profile the current mode uses.

Every error code, with its fix: [Errors](https://minirouter.sh/docs/errors).

## Next steps

- [Presets](https://minirouter.sh/docs/presets): Save a model and its settings under one name.
- [Guardrails](https://minirouter.sh/docs/guardrails): Budgets and model lists per key.
- [Auto router](https://minirouter.sh/docs/auto-router): Let MiniRouter pick the model.
