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
-
Create a key in the console (API keys → Create key) and copy it.
-
Open the Roo Code panel and click the settings (gear) icon.
-
Set API Provider to OpenAI Compatible.
-
Fill in:
Base URL: https://api.yunshurouter.com/v1 API Key: YOUR_YUNSHU_KEY Model: deepseek-v4-pro -
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.
-
Save.
Check it works
- In Code mode, ask: “Read package.json and tell me the scripts.”
- Approve the read. A correct answer means requests and tool calls work.
- Open Usage in the console: the requests show under the Roo Code key.
Recommended models
| 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 / |
Use https:/. |
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. |