CONFIG • OpenClaw quick fix
Featured: @OpenClawLog

Adding Kilo or Vercel AI Gateway? Prove the model route first.

OpenClaw now documents two gateway-style provider paths that can change how model traffic is routed: `kilocode` uses `KILOCODE_API_KEY`, while `vercel-ai-gateway` uses `AI_GATEWAY_API_KEY` and accepts Claude shorthand refs that normalize at runtime. The operator trap is assuming a config edit worked because the key exists. Treat a provider switch as a small change window: set the key where the Gateway process can actually read it, list the provider's models, run one tiny task, and keep the old model route available until the smoke test passes.

In simple words: Make a safe copy if the step could change your setup, try the smallest check, then confirm OpenClaw is back to normal before doing more. The source link and commands stay below for people who want the technical detail.

Checklist
Decide which route you are changing before editing config: `kilocode/...` for Kilo Gateway, or `vercel-ai-gateway/...` for Vercel AI Gateway.
Config refs to review, not paste blindly
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "kilocode/kilo/auto"
      }
    }
  }
}

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "vercel-ai-gateway/anthropic/claude-opus-4.6"
      }
    }
  }
}
Put the provider key in the Gateway process environment, not only in your interactive shell; daemon installs usually need `~/.openclaw/.env`, `env.shellEnv`, systemd, or launchd wiring.
Run the official onboarding flow when possible: `openclaw onboard --auth-choice kilocode-api-key` or `openclaw onboard --auth-choice ai-gateway-api-key`.
After restarting through your normal supervisor, verify discovery with `openclaw models list --provider kilocode` or `openclaw models list --provider vercel-ai-gateway`.
Provider route smoke commands
# Kilo Gateway
openclaw models list --provider kilocode

# Vercel AI Gateway
openclaw models list --provider vercel-ai-gateway
Run one tiny low-risk prompt on the new model route, then record the exact model ref, provider, date, and rollback model before using it for unattended work.
Route-change receipt
- Previous model/provider route:
- New model/provider route:
- Where the API key is loaded for the Gateway process:
- `openclaw models list` result:
- Tiny prompt result:
- Rollback model route:
- Who approved using this route for unattended work:
If model listing or the tiny prompt fails, roll back the config to the previous model route before changing unrelated provider settings.
Success looks like
The new provider route is proven by model-list output, not just by a saved API key.
The Gateway daemon can read the provider key after restart through the normal supervisor.
A one-prompt smoke test and rollback route are recorded before unattended agents use the new model path.

Source: OpenClaw Kilo + Vercel AI Gateway docs · link