model value.
Pick the API shape
Use your Tokios API key as the client API key. Use the deployment name you registered as the client model name.
Recommended setup path
1
Start with one known-good backend
Run one local backend first, such as Ollama, llama.cpp, vLLM, or LM Studio. Confirm it serves an OpenAI-compatible
/v1/chat/completions endpoint before adding the coding agent.2
Register one deployment
Give the deployment a short, stable name such as
qwen-coder-local or gemma-tunnel. This is the value the coding agent sends in the model field.3
Configure the agent
Set the base URL for the API shape the agent uses. OpenAI-style clients usually use
https://api.tokios.com/v1; Anthropic-style clients use https://api.tokios.com.4
Run a small task first
Ask the agent to explain a small file or make a tiny change before sending a larger refactor. This confirms routing, streaming, and model behavior.
What to compare
When you test coding agents with local models, compare the full workflow rather than only raw model speed.A faster model is not always the better coding model. For agent workflows, instruction following and repository understanding matter as much as generation speed.
Next steps
Use Claude Code
Configure
ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY.Use OpenAI Codex
Add Tokios as a Codex model provider in
config.toml.Benchmark your deployment
Compare latency, streaming, and task behavior across deployments.
Route multiple models
Keep one endpoint and switch models with the
model field.