Skip to content

About

PR: interactive model config-add command for OpenClaw

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

openclaw-pr: Interactive Model Config Add

What

Adds openclaw models config-add -- an interactive CLI wizard that:

  1. Shows a list of 11 known LLM providers (OpenAI, Anthropic, OpenRouter, Google, Ollama, Groq, Mistral, Together, DeepSeek, OpenCode Go, OpenCode Zen) + custom URL option
  2. Prompts for API key (masked input)
  3. Auto-fetches all available models from the provider's /v1/models endpoint
  4. Lets you pick a default model
  5. Optionally select additional models
  6. Writes the provider config with all selected models
  7. Loops: asks if you want to add another provider

Why

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.

Key Use Case: Manual Model Switching

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.

Files Changed

  • src/commands/models/config-add.ts (NEW): The interactive wizard implementation
  • src/cli/models-cli.ts (MODIFIED): Registers the new config-add subcommand under openclaw models

Usage

openclaw models config-add

Testing

cd /path/to/openclaw
npx tsx src/cli/index.ts models config-add

About

PR: interactive model config-add command for OpenClaw

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages