OpenClaw
One provider block in openclaw.json. Any model on the list.
Where the settings are
~/.openclaw/openclaw.json. It is JSON5, so comments and trailing commas are fine. The Gateway watches the file and applies most changes on save; a few need a restart.
OpenClaw takes an OpenAI-compatible base URL under models.providers with api: "openai-completions". Every model on the Models page answers in that format, Claude included.
The provider block
mode: "merge" keeps the bundled providers next to yours. Model refs are provider/model, so the primary becomes uplinkswitch/claude-sonnet-5-5.
{
env: { vars: { UPLINKSWITCH_API_KEY: "sk-uplink-live-..." } },
agents: {
defaults: { model: { primary: "uplinkswitch/claude-sonnet-5-5" } },
},
models: {
mode: "merge",
providers: {
uplinkswitch: {
baseUrl: "https://api.uplinkswitch.com/v1",
apiKey: "${UPLINKSWITCH_API_KEY}",
api: "openai-completions",
models: [
{ id: "claude-sonnet-5-5", name: "Claude Sonnet 5.5" },
{ id: "claude-opus-5-5", name: "Claude Opus 5.5" },
{ id: "gpt-6.1-sol", name: "GPT-6.1 Sol" },
{ id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro" },
{ id: "deepseek-v4-pro-0813", name: "DeepSeek V4 Pro" },
{ id: "kimi-k3", name: "Kimi K3" },
],
},
},
},
}${UPLINKSWITCH_API_KEY} is read from the environment. Inline env.vars only apply when the process env lacks the key; ~/.openclaw/.env works as well. A missing variable stays unresolved and logs a warning.
Per-model fields
reasoning, input, cost, contextWindow and maxTokens are optional. Defaults: reasoning: false, input: ["text"], zero cost, no fixed output limit (so max_tokens is left out of the request) and a 200000-token context fallback. OpenClaw recommends explicit values. Set input to include "image" for models that take images, or attachments go in as text.
{
id: "claude-sonnet-5-5",
name: "Claude Sonnet 5.5",
reasoning: true,
input: ["text", "image"],
// contextWindow and maxTokens: the model developer's published limits
}Check it
openclaw models list --provider uplinkswitch
openclaw models statusThe first lists the ids you declared under UplinkSwitch. The second shows the resolved primary model and its auth. Then send a message; the request shows in the console within seconds.
To change the default later: openclaw models set uplinkswitch/gpt-6.1-sol.
Good to know
- Only the ids in
models[]are callable.agents.defaults.modelsholds aliases and metadata; it does not register a model on its own. - On a host other than OpenAI's, OpenClaw drops the developer role,
service_tier, store flags and prompt-cache hints from the request. Those are OpenAI-only fields; the Models page lists each model's cache read price. - A model with
reasoning: truesendsreasoning_effortwhen thinking is on. Setcompat.supportsReasoningEffort: falseon the entry if that field is rejected. - Custom endpoints do not inherit a catalog route's Code Mode tier. Leave
compat.codeModealone unless you have tested it.