Docs

Roo Code

Roo Code's OpenAI Compatible provider is three fields plus a model-capability block. The capability block is not optional decoration — it is what Roo Code budgets context against.

Pick the OpenAI Compatible provider, paste the base URL and key, and set the model's context window and max output so Roo Code's own budgeting is right.

Roo Code settings panel
API Provider   OpenAI Compatible
Base URL       https://api.kunavo.com/v1
API Key        sk-kn-...
Model          claude-sonnet-5

Model Configuration
  Context Window     200000
  Max Output Tokens  64000
  Image Support      on
Roo Code uses native tool calling with no fallback, so the model you pick must support OpenAI-compatible tool calls. Every id in the table below does; a text-only or media model configured here will fail on the first tool the agent tries to use, not at setup time.
Fill in Context Window and Max Output Tokens rather than leaving the defaults. Roo Code decides when to condense the conversation from those numbers, so a context window set too low makes it truncate history it did not need to, and one set too high produces upstream 400s instead of a clean condense.

Step by step

  1. Create a key at /app/keys and copy it — it is shown once.
  2. Open the Roo Code settings panel and set API Provider to OpenAI Compatible.
  3. Enter the Base URL https://api.kunavo.com/v1 and your key. The /v1 suffix belongs in the base URL — Roo Code appends only the route.
  4. Pick or type the model id, then open Model Configuration and set the context window, max output tokens, image support and the input/output prices from the table below.
  5. Send a message in Code mode. Prices entered here are what Roo Code's own per-task cost readout uses, so they are worth getting right.

Checked against Roo Code's OpenAI Compatible provider page on September 6, 2026. Third-party settings move; if a field name here no longer matches what you see, that page is the authority, not this one.

This is the short version. The full walkthrough — model choice, what a real session costs, and the failure modes — is in the Roo Code + Claude walkthrough.

Verify before you debug the client

One request settles whether a failure is the endpoint, the key, or the configuration file. If this returns JSON, the same base URL and key work in Roo Code.

# Settles whether a failure is the endpoint, the key, or the client.
curl -sS https://api.kunavo.com/v1/models \
  -H "Authorization: Bearer sk-kn-..."

Which model id to put in the field

Every text model is reachable as a model id — the live list is GET /v1/models, and the catalog with prices is on the models page. Rates are USD per 1M tokens, input / output.

Model idKunavo in / outWhere it fits in Roo Code
claude-sonnet-5$2.00 / $10.00Code mode — the default, and what the cost readout is calibrated on
claude-opus-5$2.00 / $10.00Architect mode, where a wrong plan costs more than the tokens
claude-haiku-4-5$0.40 / $2.00Ask mode and repeated file reads
gemini-3-1-pro$0.70 / $4.20long-context passes over a big repository
Billing is per token from a prepaid balance with no monthly fee — see billing. On repeated context — which is most of what an editor or a chat client sends — prompt caching moves the bill more than the model choice does.

FAQ

How do I point Roo Code at a custom OpenAI-compatible endpoint?

In the Roo Code settings panel set API Provider to "OpenAI Compatible", then fill in the Base URL and API Key for that endpoint and choose a model. The base URL is the /v1 root of the service, because Roo Code appends only the route to it. Roo Code's own documentation calls the Base URL field crucial — it is the field that decides where every request goes.

Which models work with Roo Code through a custom endpoint?

Any model the endpoint serves that supports OpenAI-compatible native tool calling. Roo Code uses native tool calls exclusively and has no fallback mode, so a model without tool support will connect and then fail as soon as the agent tries to read or write a file. Claude, GPT and Gemini text models all qualify; image, video and audio models do not.

What should I put in Roo Code's Context Window and Max Output Tokens?

The real limits of the model you selected, not the defaults. Roo Code uses those two numbers to decide when to condense the conversation, so a value below the model's true context makes it discard history unnecessarily, and a value above it produces upstream 400 errors instead of a clean condense. The per-model figures are on the endpoint's model catalog.

Why does Roo Code report the wrong cost for a task?

Because the Input Price and Output Price in Model Configuration are entered by hand and default to zero or to another provider's rates. Roo Code computes its per-task cost readout entirely from those two fields — it does not read prices from the endpoint — so the number is only as accurate as what was typed in. Copy the rates from the provider's own catalog.