https://api.tokios.com/v1, the API Key to your sk-tok-… key, and the Model ID to your registered Tokios deployment name — Cline then routes every request down your private tunnel to your local model.
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 — see API Keys
- The Cline extension installed in VS Code (or a compatible editor)
Configure the OpenAI Compatible provider in Cline
1
Open Cline's settings
Click the gear icon in the Cline panel to open Settings.
2
Select the OpenAI Compatible provider
In the API Provider dropdown, choose OpenAI Compatible.
3
Set the Base URL
In the Base URL field, enter:
4
Set the API Key
In the API Key field, paste your Tokios key:
5
Set the Model ID
In the Model ID field, enter your Tokios deployment name — the public name you registered in the Models tab, for example
gemma-tunnel. This is not the local/upstream model id your backend uses.6
Set context window and max output manually
The OpenAI Compatible provider doesn’t auto-detect model limits. Fill in Context Window and Max Output Tokens to match your deployment’s underlying model so Cline sizes requests correctly.
If it worked in curl but returns 400 errors in Cline
If a plaincurl request to https://api.tokios.com/v1/chat/completions succeeds but Cline returns a 400, work through these in order:
Base URL is the /v1 root, not the full chat/completions path
Base URL is the /v1 root, not the full chat/completions path
Cline appends
/chat/completions to whatever you put in Base URL. Enter https://api.tokios.com/v1 — if you paste the full path (https://api.tokios.com/v1/chat/completions), Cline will request a doubled-up path and Tokios returns an error. Tokios serves a stable /v1 OpenAI surface, so the root is unambiguous: it’s always https://api.tokios.com/v1, nothing appended.Model ID doesn't match your deployment name exactly
Model ID doesn't match your deployment name exactly
The Model ID field must be the exact public deployment name shown in the Models tab — not the upstream model id, and not a typo’d variant. A mismatched name typically surfaces as a 404, but malformed model strings (extra whitespace, wrong casing your deployment is picky about) can also come back as a 400.
Streaming
Streaming
Cline requests streaming responses by default. Tokios returns standard OpenAI-format SSE for
"stream": true on /v1/chat/completions, so this should work out of the box. If a request parameter Cline sends isn’t supported by your local backend, the backend can reject it as a 400 before Tokios ever sees a routing problem.Malformed request body
Malformed request body
A 400 is Tokios reporting the request body itself couldn’t be processed. If the base URL and model ID both check out, check for a stray provider-specific option in Cline’s advanced settings (a field that a generic OpenAI Compatible backend doesn’t expect).
Error reference
Next steps
Once Cline is pointed at Tokios, the same Base URL, API key, and deployment name work for any other OpenAI-compatible tool you run alongside it — no extra tunnels or port forwarding per client.Compatible clients
See the base URL and key settings for every other supported client.
API keys
Create, scope, and rotate
sk-tok-… keys for teammates and agents.