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.Troubleshooting
401 error
401 error
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.403 error
403 error
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.
404 error
404 error
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.
503 error
503 error
The connector for that deployment is offline or at its concurrency cap. Check the Connectors tab — the connector needs to show as Online.
Roo Code keeps retrying the same step
Roo Code keeps retrying the same step
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.