Skip to content
Guides

Which model for OpenClaw

Providers, bring-your-own-key, and the one rule that decides

6 min read

OpenClaw is model-agnostic in the literal sense: models are plugins, the provider directory runs from Alibaba to xAI with local servers in between, and the default model is one config line in the form provider slash model. That freedom is why the question which model is asked so often and answered so badly. Here is how providers are set up, what changes between them, and the one rule the docs give for choosing.

How a provider is set up

  • Authenticate with the provider, usually through onboarding, which verifies the route with a real completion before saving it.
  • Set the default model as provider slash model in the agent defaults; every provider page shows its config block.
  • Some providers have two routes: Anthropic by API key or by an existing Claude CLI login; Ollama cloud, local or both.
  • Managed routers exist too, one provider that fronts several, and cloud gateways that add caching and cost controls in front of a provider.

What changes between models

Cost per token, obviously, and What OpenClaw costs shows how the heartbeat and the context multiply it. Tool calling: not every model or endpoint supports it well, which is why the Ollama page insists on the native API. Context length: onboarding will not even auto-select a local model with under sixteen thousand tokens of confirmed context. And resistance to prompt injection, which varies by tier more than people expect.

Model choice matters. Prompt-injection resistance is not uniform across model tiers - smaller/cheaper models are more susceptible to tool misuse and instruction hijacking under adversarial prompts.

The rule

Use the latest, best tier for any bot that can run tools or touch files and networks; use smaller or local models only for chat-only assistants with trusted input, or with the blast radius reduced. Prompt injection and OpenClaw is the page that says it, and Free and local models for OpenClaw is what free actually buys you.

Switching and mixing

Because the model is a config line, switching is cheap, and per-agent settings let one agent run a cheap model while another runs a frontier one. Automations can pin their own model. The trap is the heartbeat: it runs on whatever model the agent runs on, and a frontier model checking in every thirty minutes is the classic surprise. The OpenClaw heartbeat covers the settings, and Using Claude with OpenClaw the Anthropic routes specifically.

On Diali

Every plan includes a monthly balance of AI credits spent across fifteen managed models, so no provider account is needed, and bring-your-own-key connects any of ten providers from the vault. The model is a per-assistant setting in the dashboard, and the spend is visible per assistant. Hosted OpenClaw on Diali is the assistant; the AI credit calculator turns a month of expected use into a number.

  • Provider slash model, one line, verified by a real completion.
  • Cost, tool calling, context and injection resistance are what actually change.
  • Best tier for tools; cheap tier only for chat-only.
Get started

Stop reading about it, build one

Set up an agent, pick a channel, and have it working inside the app you already keep open.