OpenClaw

Route OpenClaw's messaging gateway through BitRouter as an OpenAI-compatible model provider.

OpenClaw is a self-hosted gateway that bridges messaging platforms — WhatsApp, Telegram, Slack, Discord, and more — to an LLM. Configure BitRouter as its model provider and every channel routes across the whole registry.

Prerequisites

  • BitRouter running — local proxy at http://127.0.0.1:4356, or BitRouter Cloud at https://api.bitrouter.ai.
  • OpenClaw installed. See the OpenClaw docs for setup.

Point OpenClaw at BitRouter

BitRouter is an OpenAI-compatible endpoint, so it goes straight into your OpenClaw config file as a provider — no plugin required. Add a bitrouter entry under models.providers and reference it as the default model:

{
  agents: {
    defaults: {
      model: { primary: "bitrouter/openai/gpt-4o" },
    },
  },
  models: {
    providers: {
      bitrouter: {
        baseUrl: "http://127.0.0.1:4356/v1",
        apiKey: "local-placeholder",   // any value for the local proxy
        api: "openai-completions",
        models: [{ id: "openai/gpt-4o", contextWindow: 128000, maxTokens: 8192 }],
      },
    },
  },
}

Then start the gateway:

openclaw gateway

Pick a model

Each provider model id is a registry id in provider/model form (openai/gpt-4o, anthropic/claude-sonnet-4-6, …), optionally with a :cost / :latency variant. In OpenClaw's model.primary it's prefixed with the provider id you chose — e.g. bitrouter/openai/gpt-4o. See Models.

Learn more

How is this guide?

On this page