跳转到内容

ClawRouter

此内容尚不支持你的语言。

ClawRouter gives OpenClaw one policy-scoped key for multiple upstream model providers. The bundled plugin discovers only the models allowed for that key, routes each model through its declared protocol, and reports the key’s budget and aggregate usage on OpenClaw usage surfaces.

You do not install or authenticate each upstream provider plugin on the OpenClaw host. Upstream credentials and provider-specific forwarding stay in ClawRouter. OpenClaw needs only the bundled @openclaw/clawrouter plugin and an issued ClawRouter credential.

PropertyValue
Providerclawrouter
Package@openclaw/clawrouter
AuthCLAWROUTER_API_KEY
Default URLhttps://clawrouter.openclaw.ai
Model catalogCredential-scoped via /v1/catalog
QuotasMonthly budget and usage via /v1/usage
  1. Get a scoped credential

    Ask your ClawRouter administrator for a credential whose policy includes the providers, models, and monthly budget you should use. Credentials are revealed once when issued.

  2. Configure OpenClaw

    Terminal window
    export CLAWROUTER_API_KEY="..."
    openclaw onboard --auth-choice clawrouter-api-key
    openclaw plugins enable clawrouter

    The plugin is bundled with OpenClaw. If your configuration sets plugins.allow, add clawrouter to that list before enabling it. For a custom deployment, set models.providers.clawrouter.baseUrl to the ClawRouter origin; the default is https://clawrouter.openclaw.ai.

  3. List granted models

    Terminal window
    openclaw models list --all --provider clawrouter

    Use the returned model refs exactly as shown. They retain the upstream namespace, such as clawrouter/openai/..., clawrouter/anthropic/..., or clawrouter/google/.... If agents.defaults.models is an allowlist in your configuration, add each selected ClawRouter ref to it.

  4. Select a model

    Terminal window
    openclaw models set clawrouter/

    /

    You can also select a returned model for one run with
    `openclaw agent --model clawrouter/

    /

    —message ”…”`.

GET /v1/catalog is the source of truth. OpenClaw does not ship a second, fixed list of ClawRouter models. A model configured in ClawRouter appears when:

  • the credential’s policy grants its provider;
  • the provider connection is enabled and ready;
  • the catalog model advertises a supported LLM capability; and
  • the catalog exposes a transport contract supported by the plugin.

Adding another model to a supported ClawRouter provider therefore does not require an OpenClaw release or another provider plugin. The next catalog refresh discovers it. A model that needs a new wire protocol requires support in the ClawRouter plugin before OpenClaw advertises it.

You do not need to install every upstream company’s auth plugin. ClawRouter owns upstream credentials; its catalog tells OpenClaw which transport to use. The plugin supports:

Catalog routeOpenClaw transport
OpenAI-compatible chatopenai-completions
OpenAI-compatible Responsesopenai-responses
Native Anthropic Messagesanthropic-messages
Native Google Gemini streaminggoogle-generative-ai

The plugin also applies the matching replay and tool-schema policies for those families. Catalog rows using another request/stream format are intentionally not advertised as OpenClaw text models. Normalize those providers to one of the supported contracts in ClawRouter rather than sending an incompatible payload.

ClawRouter’s /v1/usage response feeds the normal OpenClaw provider-usage surfaces. /status and related dashboard status show the monthly budget window when the key has a limit, plus request, token, and spend totals. Unmetered keys still show aggregate usage without a percentage window.

Quota lookup uses the same scoped key as model discovery. A failed quota lookup does not block model execution.

Check the live snapshot with:

Terminal window
openclaw status --usage
openclaw models status

The same provider snapshot is available to /status in chat and OpenClaw’s usage UI. The budget is policy-wide, so requests made by another client using the same ClawRouter policy can change the remaining percentage.

SymptomCheck
No ClawRouter modelsConfirm the plugin is enabled and allowed by plugins.allow, then check that the credential is active and grants at least one ready provider.
A configured ClawRouter model is missingInspect its /v1/catalog capability and route format. Unsupported transport contracts are intentionally filtered.
Unknown model: clawrouter/...Add the exact catalog ref to agents.defaults.models when that configuration map is being used as an allowlist.
401 or 403 from catalog or usageReissue or re-scope the ClawRouter credential; OpenClaw does not fall back to upstream provider keys.
Model call fails after discoveryCheck the provider connection and upstream health in ClawRouter, then retry after its readiness state recovers.
Usage has totals but no percentageThe policy is unmetered; add a monthly budget in ClawRouter to expose a percentage window.
  • Catalog discovery is scoped to the configured proxy key and cached per key.
  • The proxy key is attached only at request dispatch; it is not stored in model metadata.
  • Native Anthropic and Gemini model ids are rewritten to their upstream ids only at dispatch.
  • Unsupported or ungranted catalog rows fail closed and are not selectable.
Model providers

Provider configuration and model selection.

Usage tracking

OpenClaw usage and status surfaces.