Agent Tools

OpenClaw

Connect OpenClaw to Yolo Router and use a selected model for agent runs.

iBefore you start
  • OpenClaw is installed and available as openclaw.
  • A working Yolo Router endpoint, for example https://api.yolorouter.com.
  • A Yolo Router API Key generated from the console.
  • The model ID you want to use, for example deepseek-v4-pro. It must exactly match the model ID in the Yolo Router console.

OpenClaw model references use the provider/model format. To connect Yolo Router, add a yolorouter provider and set the default model to yolorouter/deepseek-v4-pro.

Setup

Check OpenClaw

Run:

openclaw --version

If it is not installed yet, install OpenClaw using the official installation flow before continuing.

Set the Yolo Router API Key

The examples below use YOLOROUTER_API_KEY; openclaw.json will read this variable.

export YOLOROUTER_API_KEY="sk-yolo-..."
$env:YOLOROUTER_API_KEY = "sk-yolo-..."
set YOLOROUTER_API_KEY=sk-yolo-...

Do not write the real API Key into config files or commit it to your repository.

Edit openclaw.json

OpenClaw reads the user-level config file by default:

~/.openclaw/openclaw.json

On Windows this is usually:

%USERPROFILE%\.openclaw\openclaw.json

Add or merge the following configuration:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "yolorouter/deepseek-v4-pro",
        "fallbacks": ["yolorouter/deepseek-v4-flash"]
      },
      "models": {
        "yolorouter/deepseek-v4-pro": {
          "alias": "Yolo Router Pro"
        },
        "yolorouter/deepseek-v4-flash": {
          "alias": "Yolo Router Flash"
        }
      }
    }
  },
  "models": {
    "providers": {
      "yolorouter": {
        "baseUrl": "https://api.yolorouter.com/v1",
        "apiKey": "${YOLOROUTER_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "deepseek-v4-pro",
            "name": "deepseek-v4-pro",
            "contextWindow": 128000,
            "maxTokens": 8192,
            "input": ["text"]
          },
          {
            "id": "deepseek-v4-flash",
            "name": "deepseek-v4-flash",
            "contextWindow": 128000,
            "maxTokens": 8192,
            "input": ["text"]
          }
        ]
      }
    }
  }
}

Values to replace:

  • baseUrl: your Yolo Router OpenAI-compatible endpoint, with /v1
  • apiKey: keep ${YOLOROUTER_API_KEY} so OpenClaw reads the Key from the environment
  • primary: the default model, always in yolorouter/model-id format
  • models[].id: the model ID from the Yolo Router console

Check model status

After saving the config, run:

openclaw models status

To run a live auth probe:

openclaw models status --probe

Confirm that yolorouter/deepseek-v4-pro appears in the output and there is no missing API Key warning.

Set or switch the model

If Yolo Router is not the current default model, run:

openclaw models set yolorouter/deepseek-v4-pro

You can also switch models inside an OpenClaw session:

/model yolorouter/deepseek-v4-pro

Test the connection

Start OpenClaw and send a simple message:

Introduce the model you are using in one sentence.

If OpenClaw returns a normal response, the integration is working. You can also check the Yolo Router console for the corresponding request log.

Troubleshooting

No credentials found or missing API Key

Confirm that YOLOROUTER_API_KEY is set in the same terminal or gateway process environment that runs OpenClaw. For a long-running OpenClaw Gateway, put the Key in the Gateway runtime environment, not only in a temporary shell.

Model is not allowed

If agents.defaults.models is set, it becomes the allowlist for /model. Make sure it includes yolorouter/deepseek-v4-pro, or remove the allowlist and select the model again.

404 or endpoint not found

Check that baseUrl is https://api.yolorouter.com/v1. OpenClaw's openai-completions mode calls OpenAI-compatible endpoints such as /v1/models and /v1/chat/completions.

Model not found

Check that models.providers.yolorouter.models[].id, agents.defaults.model.primary, and the /model selection exactly match the model ID in the Yolo Router console. In OpenClaw, the full model reference needs the provider prefix, for example yolorouter/deepseek-v4-pro.

Settings do not take effect

Run:

openclaw models status

If the Gateway is already running but still reads the old config, restart OpenClaw Gateway or reopen the current OpenClaw session.

On this page