Adds openclaw models config-add -- an interactive CLI wizard that:
- Shows a list of 11 known LLM providers (OpenAI, Anthropic, OpenRouter, Google, Ollama, Groq, Mistral, Together, DeepSeek, OpenCode Go, OpenCode Zen) + custom URL option
- Prompts for API key (masked input)
- Auto-fetches all available models from the provider's
/v1/modelsendpoint - Lets you pick a default model
- Optionally select additional models
- Writes the provider config with all selected models
- Loops: asks if you want to add another provider
Currently, adding an LLM provider to OpenClaw requires manually editing the config YAML file, looking up the correct base URL, and typing each model ID by hand. This is error-prone and tedious.
This command turns a 10-minute manual task into a 30-second interactive flow. Users just pick a provider, paste their API key, and the wizard handles the rest.
Different models excel at different tasks:
- Cheap models (DeepSeek, Gemini Flash) for routine coding
- Expensive models (Claude Opus, GPT-4o) for complex debugging
- Specialized models (Qwen Coder) for agentics
With config-add, users can register multiple providers in one session, then use /model in Telegram to switch between them on the fly.
src/commands/models/config-add.ts(NEW): The interactive wizard implementationsrc/cli/models-cli.ts(MODIFIED): Registers the newconfig-addsubcommand underopenclaw models
openclaw models config-addcd /path/to/openclaw
npx tsx src/cli/index.ts models config-add