Skip to main content
Roo Code talks to models through provider profiles you configure in its settings panel. Add an OpenAI Compatible provider, set the Base URL to https://api.tokios.com/v1, the API Key to your sk-tok-… key, and the Model ID to the deployment name you registered in the Tokios console. Roo Code then sends requests to your local model through the connector, wherever that machine is.

Prerequisites

  • A running Tokios connector paired with your local model — see Connector install
  • A registered model deployment name — see Register a model
  • A Tokios API key (sk-tok-…) — see API Keys
  • The Roo Code extension installed in VS Code

Configure the OpenAI Compatible provider

1

Open Roo Code's provider settings

Open the Roo Code panel in VS Code and go to its settings. Choose OpenAI Compatible as the API provider.
2

Set the base URL

Set Base URL to:
3

Add your API key

Paste your sk-tok-… key into the API Key field. Roo Code sends it as a Bearer token on every request.
4

Set the model ID

Set Model ID to the public deployment name you registered in the Models tab — for example, gemma-tunnel. This is not the local model id your backend (Ollama, llama.cpp, vLLM, or LM Studio) uses.
Replace gemma-tunnel with your own deployment name, and sk-tok-YOUR_KEY with your own key. Never commit either into a shared settings file.

Pick a model that supports tool calling

Roo Code relies on native tool calling to read files, run commands, and apply edits in your project. If the underlying model doesn’t support native tool calls, Roo Code can’t parse its responses into tool actions — it retries and loops instead of making progress. Tokios passes the tool-call structure in a request straight through to your backend; whether tool calling actually works depends entirely on the model you’re running, not on Tokios or the connector. Before you rely on Roo Code for real work, confirm your deployment is backed by a model with native tool-calling support. See Choose a local model for how to compare models for agent workloads.
A model without native tool calling will not work with Roo Code, even though it may work fine for plain chat through the same deployment. If Roo Code appears stuck retrying the same step, this is the first thing to check.

Troubleshooting

The API key Roo Code sent is missing, malformed, or has been revoked. Confirm you pasted the full sk-tok-… key with no extra whitespace, and check its status on the Keys tab.
The key is valid but isn’t scoped to the deployment in Model ID, or the account is suspended. Check the key’s allowed model patterns on the Keys tab.
The Model ID value doesn’t match a registered deployment. Confirm it exactly matches the public name on the Models tab — not your Ollama/llama.cpp/vLLM/LM Studio local model id.
The connector for that deployment is offline or at its concurrency cap. Check the Connectors tab — the connector needs to show as Online.
This usually isn’t a Tokios error — it’s a sign the model behind your deployment doesn’t support native tool calling. See Pick a model that supports tool calling above.

Next steps

Choose a local model

Compare models and backends for coding-agent workloads like Roo Code.

Compatible clients

See base URL and key setup for other OpenAI- and Anthropic-compatible clients.