OpenClaw is a self-hosted CLI agent. It treats any OpenAI-compatible endpoint as a custom provider, so AIgateway drops in as the brain behind every OpenClaw agent — 1000+ models, one key. OpenClaw doesn't auto-discover models for a custom provider, so you list the slugs you want and pick a default; nothing else changes.
The fastest path — writes the provider and sets the default model in one shot, no editor. Pick a model spendable on the $5 signup credit (moonshot/kimi-k2.7-code) so the first call works before you top up. Compatibility stays openai (the default).
Declare the provider under models.providers, then point a default at it. Both halves are required — the provider entry registers the model with the runtime, agents.defaults.model.primary makes it the one OpenClaw runs. mode: "merge" preserves any providers you already have.
OpenClaw won't pull our catalog on its own, so add the slugs you want to models[] (openai/gpt-5.4, google/gemini-3.1-pro, …). Switch the active model in-session with /model, or change primary. Every listed model is callable the moment your org has any balance.