Skip to content

Integrations / Roo Code

Use Roo Code with any model

Set up Roo Code with a Yunshu Router key: OpenAI Compatible provider, base URL, model ID, per-mode models, checks and fixes.

Get an API key

Roo Code is a coding agent for VS Code with modes such as Code, Architect and Debug. Its OpenAI Compatible provider works with Yunshu Router, so each mode can run on the model you choose, billed per token to your prepaid balance.

What you need

  • The Roo Code extension installed.
  • A Yunshu Router account with credit on the balance.
  • An API key from the console. Use a separate key for Roo Code.

Set it up

  1. Create a key in the console (API keys → Create key) and copy it.

  2. Open the Roo Code panel and click the settings (gear) icon.

  3. Set API Provider to OpenAI Compatible.

  4. Fill in:

    Base URL:  https://api.yunshurouter.com/v1
    API Key:   YOUR_YUNSHU_KEY
    Model:     deepseek-v4-pro
  5. Under Model Configuration, set Context Window and Max Output Tokens from the model page, Image Support only if the model takes images, and Input Price / Output Price to our prices so Roo’s estimate is close.

  6. Save.

Check it works

  1. In Code mode, ask: “Read package.json and tell me the scripts.”
  2. Approve the read. A correct answer means requests and tool calls work.
  3. Open Usage in the console: the requests show under the Roo Code key.
Model ID Use it for
kimi-k3 Architect mode, planning long tasks
deepseek-v4-pro Code mode, everyday edits
glm-5.3 Ask and quick Debug questions

Set a budget on the key

In the console, open API keys, pick the Roo Code key and set a monthly budget, a model allow-list and a budget alert. A request that would pass the budget is refused with 402 budget_exceeded.

Known limitations

  • Roo Code uses native tool calling only, with no XML fallback. The model must support tool calls; all suggested models do.
  • Roo’s cost display uses the prices you enter, not our bill.

Troubleshooting

What you see Likely cause Fix
“Invalid API Key” / 401 Key mistyped or revoked Paste the key again.
“Model Not Found” Model ID typo Copy it from the models page.
404 on every request Base URL without /v1 Use https://api.yunshurouter.com/v1.
403 naming the model Not on the key’s allow-list Add it to the key.
402 Budget or balance used up Raise the budget or top up.
Tool-calling errors Model doesn’t support native tool calls Use a suggested model.

Questions

Can each Roo Code mode use a different model?

Yes. Save one configuration profile per model and assign profiles to modes.

Do I need the “OpenAI” provider instead?

No. Use OpenAI Compatible so you can set the base URL.

Does Roo Code work with Claude models through Yunshu Router?

Not yet. Claude models can’t be called today. Use the DeepSeek, GLM and Kimi models on the models page.