Coding agents
Coding agents send a very particular workload: streamed tool calls, tool results fed back as
tool messages, files written through tools, and a large context on every turn. OSMEXO speaks the
OpenAI wire format and the Anthropic Messages format, so agents built on either one work as is. Pick a
model that carries the Coding ready badge in the dashboard
(filter the list by Coding ready), then set the tool up as below.
Working: Claude Code, OpenCode, Cline, Roo Code, Kilo Code, Continue, Aider, and Codex in chat mode. Anything else that lets you set an OpenAI-compatible or Anthropic base URL should work; the badge tells you the model side is fine.
Set-up per tool
All of them need the same three things: the base URL __GATEWAY_URL__/v1, your OSMEXO key
(sk-llm-…, from API Keys) and a model id such as
anthropic/claude-sonnet-5. Key names below are the tools' as of late 2026; check the tool's own
docs if a field has moved.
Claude Code
Claude Code talks to the Messages endpoint. Set three environment variables before you start
it; the base URL has no /v1:
export ANTHROPIC_BASE_URL="https://api.osmexo.com"
export ANTHROPIC_AUTH_TOKEN="sk-llm-…"
export ANTHROPIC_MODEL="anthropic/claude-sonnet-5.5"
claudeANTHROPIC_MODEL takes any OSMEXO text model id, so Claude Code can also run on a non-Claude model that is
Coding ready. Claude Code uses a second, smaller model for background work; point it at a cheap model with
ANTHROPIC_SMALL_FAST_MODEL (for example anthropic/claude-haiku-5.5). If you leave the model variables
unset, Claude Code sends Anthropic's own model names, and OSMEXO maps the Claude ones to its ids.
Two limits to know: the extended-thinking setting is not passed on, and tools that Anthropic runs on its side (web search) are not available. Your own tools, file edits and shell commands work normally.
OpenCode
opencode.json in the project (or ~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"osmexo": {
"npm": "@ai-sdk/openai-compatible",
"name": "OSMEXO",
"options": { "baseURL": "https://api.osmexo.com/v1", "apiKey": "{env:OSMEXO_API_KEY}" },
"models": { "anthropic/claude-sonnet-5": { "name": "Claude Sonnet 5 via OSMEXO" } }
}
},
"model": "osmexo/anthropic/claude-sonnet-5"
}Cline, Roo Code and Kilo Code
In the extension settings choose the OpenAI Compatible provider, then:
| Field | Value |
|---|---|
| Base URL | __GATEWAY_URL__/v1 |
| API key | your sk-llm-… key |
| Model ID | anthropic/claude-sonnet-5 (any Coding ready id) |
Leave "supports streaming" on. For reasoning models (Kimi K3, DeepSeek V4, Gemini Pro) raise the
max output tokens if the tool exposes it; see the note on max_tokens below.
Continue
~/.continue/config.yaml:
models:
- name: Claude Sonnet 5 via OSMEXO
provider: openai
model: anthropic/claude-sonnet-5
apiBase: https://api.osmexo.com/v1
apiKey: ${{ secrets.OSMEXO_API_KEY }}
roles: [chat, edit, apply]Aider
Aider reaches OpenAI-compatible endpoints through the openai/ prefix:
export OPENAI_API_BASE=https://api.osmexo.com/v1
export OPENAI_API_KEY=sk-llm-...
aider --model openai/anthropic/claude-sonnet-5Codex CLI
~/.codex/config.toml, using the chat wire format (OSMEXO's Responses API is a subset; see
Responses):
model_provider = "osmexo"
model = "anthropic/claude-sonnet-5"
[model_providers.osmexo]
name = "OSMEXO"
base_url = "https://api.osmexo.com/v1"
env_key = "OSMEXO_API_KEY"
wire_api = "chat"What "Coding ready" means
Before a model gets the badge, OSMEXO sends an agent's workload to the model and judges each step deterministically. The badge is shown only when every required test passed; the model page lists the tests with what happened.
| Test | Required | What must happen |
|---|---|---|
| Streamed tool call | yes | Streaming on, one function tool: the model streams tool_calls deltas with an id and a name, the arguments assemble to valid JSON, and it finishes with finish_reason: "tool_calls". |
| Parallel tool calls | no | Two tool calls in one turn when two are asked for. One at a time is slower, not broken. |
| Tool result round trip | yes | The conversation replayed with the assistant tool calls and two tool messages is accepted, and the answer uses the results. |
| Coding task through tools | yes | Told to act only through tools, the model creates prime.py with write_file instead of printing code in chat. |
| Long context (15k tokens) | yes | A real source file with one fact hidden in a comment: the model accepts the size and finds the fact. |
| Cached tokens reported | no | The same long prompt sent twice reports cached prompt tokens on the second call. |
| JSON schema answer | no | response_format: json_schema with strict: true yields exactly the requested object. |
The check judges behaviour, not identity; Verify a Model is the identity check, and you can run that one yourself.
Things to know
- Caching. Agents resend a large context every turn, so most of their input is read from the
prompt cache at the model's cached price, with your discount applied (the "Cached tokens
reported" line on the model page says whether the model reports them). Claude caches only what is
marked with
cache_control, which most agents add for you. See Prompt caching. max_tokenson reasoning models. Kimi K3, DeepSeek V4 and the Gemini Pro models spend part of the output budget thinking before the visible answer or tool call. Give them at least 1,200 output tokens for a tool call and a few thousand for a file; a small budget returns an empty answer. Most agents set this high by default.- Streaming. Keep it on. Non-streaming calls must return headers within 60 seconds, which a long file generation can exceed; streamed calls only need to keep sending.
- One key per tool is enough: budgets, model allow-lists and spend per key are on API Keys, so a runaway agent can only spend what you gave that key.