Roo Code on AtmoRouter: a custom provider setup that survives long tasks
Roo Code only speaks native tool calling, so a custom gateway has to be configured precisely. This AtmoRouter-authored guide walks through the base URL, exact model IDs, the Model Configuration fields, and per-task cost math for a 12-request refactor.
Why it matters
Setup takes four fields: API provider set to an OpenAI-compatible provider, base URL ending at the version path, an API key, and an exact catalogue model ID such as zai/glm-5.3. The extension appends the request path itself, so pasting the full chat completions endpoint produces a doubled path and a 404.
The part that decides whether tasks finish is Model Configuration. Roo cannot infer an alias's limits, so context window, max output tokens and prices are typed by hand. Put the real window in: too small truncates conversations early, too large ends tasks on upstream context errors. Context condensing also costs money, because it is itself a model call.
For pricing, the guide works one illustrative 12-request task at 216,000 input tokens, 9,000 output and a 60 percent cache hit. At from-prices of 0.043125 and 0.1725 dollars per million input and output tokens, that lands near 0.006 dollars per task, against roughly 0.00045 on the cheapest model listed and 0.039 on a code-specialised one. These are from-prices, the lowest listed tier, so treat them as a floor; rates change and the model page stays authoritative.