Native wire
OpenAI-compatible
Evaluate OpenCode through an inline Tokaroo provider before using it for production workloads.
Tokaroo does not host this harness. It receives the model request, selects a compatible route, handles fallback and metering, then returns the response in the harness's expected format.
OpenAI-compatible
Start with auto. Basic, Fast, Pro, and Max remain available for explicit workload requirements.
Optimized across compatible model families.
This profile is available for compatibility evaluation and should not yet be treated as production-verified.
Use OPENAI_API_KEY for the Tokaroo credential and OPENAI_BASE_URL for the gateway. The recipe below is the same compatibility path exercised by the Gwen runtime.
npm install -g opencode-ai@1.18.21export TOKAROO_API_KEY="tok_..."
export OPENAI_API_KEY="$TOKAROO_API_KEY"
export OPENAI_BASE_URL="https://api.tokaroo.com/v1"
export TOKAROO_HARNESS_REF="opencode"{
"$schema": "https://opencode.ai/config.json",
"model": "tokaroo/auto",
"provider": {
"tokaroo": {
"npm": "@ai-sdk/openai-compatible",
"name": "Tokaroo",
"options": {
"baseURL": "https://api.tokaroo.com/v1",
"apiKey": "{env:OPENAI_API_KEY}",
"headers": { "x-tokaroo-harness-ref": "opencode" }
},
"models": { "auto": { "name": "Tokaroo Auto" } }
}
},
"enabled_providers": ["tokaroo"],
"share": "disabled"
}export TOKAROO_API_KEY="tok_..."
export OPENAI_API_KEY="$TOKAROO_API_KEY"
export OPENAI_BASE_URL="https://api.tokaroo.com/v1"
opencode run --model tokaroo/auto "Return exactly: Tokaroo connected"OPENAI_API_KEY = your Tokaroo key
OPENAI_BASE_URL = https://api.tokaroo.com/v1
auto for the first run; switch to Basic, Fast, Pro, or Max only for a measured workload need
opencode is a compatibility preference, never a hard model lock
This direct request proves the key, protocol, model alias, and harness profile header independently of the harness process.
curl https://api.tokaroo.com/v1/chat/completions \
-H "Authorization: Bearer $TOKAROO_API_KEY" \
-H "x-tokaroo-harness-ref: opencode" \
-H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Return exactly: Tokaroo connected"}]}'A successful native response containing Tokaroo connected.
Record the trace ID, requested Tokaroo mode, input and output tokens, latency, and Tokaroo charge.
CLI, JSONL, MCP, skills, subagents.
The harness remains responsible for its own installation, updates, sandbox, filesystem, tools, and network policy.
Store the Tokaroo key in a secret manager or trusted runtime environment.
Use Auto first, then choose another Tokaroo mode only for a measured workload requirement.
Preserve the harness's native wire and tool event format.
Log Tokaroo trace, requested-mode, token, latency, and charge headers with the harness run identifier.
Set spend limits, retry 429 and 503 responses with backoff, and monitor balance before production rollout.
Use Auto for the initial integration, then validate tool behavior, latency, usage, and output quality against your own workload.