> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokios.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Tokios exposes private local models through https://api.tokios.com using an outbound-only connector tunnel.
> Use 'connector' for the local tokios-connector process.
> Use 'deployment' for the public model name in the API model field.
> Use 'upstream model id' for the model served by Ollama, llama.cpp, vLLM, LM Studio, or another local backend.
> API keys use the prefix sk-tok-. Connector tokens use the prefix ct-tok-.

# Use Roo Code with your own local model

> Set Roo Code's OpenAI Compatible provider to Tokios so the VS Code extension can drive a local model on Ollama, LM Studio, or vLLM — including tool-calling.

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](https://docs.tokios.com/setup/connector-install.md)
* A registered model deployment name — see [Register a model](https://docs.tokios.com/setup/register-model.md)
* A Tokios API key (`sk-tok-…`) — see [API Keys](https://docs.tokios.com/setup/api-keys.md)
* 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:

```text theme={"theme":{"light":"github-light","dark":"css-variables"}}
https://api.tokios.com/v1
```

**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](https://tokios.com/console/models) tab — for example, `gemma-tunnel`. This is not the local model id your backend (Ollama, llama.cpp, vLLM, or LM Studio) uses.

> [!NOTE]
>
> 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](https://docs.tokios.com/guides/choose-a-local-model.md) for how to compare models for agent workloads.

> [!WARNING]
>
> 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

> [accordion] 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](https://tokios.com/console/keys) tab.

> [accordion] 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](https://tokios.com/console/keys) tab.

> [accordion] 404 error
>
> The **Model ID** value doesn't match a registered deployment. Confirm it exactly matches the public name on the [Models](https://tokios.com/console/models) tab — not your Ollama/llama.cpp/vLLM/LM Studio local model id.

> [accordion] 503 error
>
> The connector for that deployment is offline or at its concurrency cap. Check the [Connectors](https://tokios.com/console/connectors) tab — the connector needs to show as **Online**.

> [accordion] 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](#pick-a-model-that-supports-tool-calling) above.

## Next steps

> [card] [Choose a local model](https://docs.tokios.com/guides/choose-a-local-model.md)
>
> Compare models and backends for coding-agent workloads like Roo Code.

> [card] [Compatible clients](https://docs.tokios.com/guides/compatible-clients.md)
>
> See base URL and key setup for other OpenAI- and Anthropic-compatible clients.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.