Custom LLM Providers
CMDOP supports custom LLM providers — any OpenAI-compatible API endpoint can be used for chat completions alongside the default SDKRouter. Add providers via Desktop Settings → Providers or CLI cmdop provider add, switch between them, and CMDOP routes chat through your chosen provider while keeping search, vision, and CDN on SDKRouter.
Use any OpenAI-compatible AI provider for chat completions.
How do I add a custom provider?
Via Desktop UI
- Open Settings → Providers (in “Additional” section)
- Click Add & Activate
- Select a preset (Z.AI, MiniMax, DeepSeek, Ollama, etc.) or choose “Custom…”
- Enter your API key
- Click Add — the provider is tested automatically and activated if successful
Via CLI
# List all configured providers
cmdop provider list
# Add a provider interactively
cmdop provider add
# Set as active provider
cmdop provider set <id>
# Reset to SDKRouter default
cmdop provider defaultWhich providers are supported?
Any OpenAI-compatible endpoint works. Popular presets:
| Provider | Base URL | Default Model | Notes |
|---|---|---|---|
| Z.AI | https://api.z.ai/api/coding/paas/v4 | glm-5 | GLM models |
| Z.AI China | https://open.bigmodel.cn/api/paas/v4 | glm-5 | China region |
| MiniMax | https://api.minimax.io/v1 | MiniMax-M2.7 | |
| Kimi K2 | https://api.kimi.com/v1 | kimi-k2.5 | |
| DeepSeek | https://api.deepseek.com/v1 | deepseek-chat | |
| Xiaomi MiMo | https://api.xiaomimimo.com/v1 | mimo-v2-pro | |
| OpenRouter | https://openrouter.ai/api/v1 | (user selects) | All models |
| Ollama | http://localhost:11434/v1 | (user selects) | Local, no key |
| LM Studio | http://localhost:1234/v1 | (user selects) | Local, no key |
| Custom | Any URL | (user specifies) | Must support /v1/chat/completions |
How does it work?
CMDOP uses a two-key architecture:
| Key | Purpose | Storage |
|---|---|---|
| CMDOP auth token | SDKRouter: search, vision, CDN | ~/.config/cmdop/token.json |
| Custom provider API key | Chat completions only | ~/.config/cmdop/provider_keys.json (mode 0600) |
This means:
- Chat goes through your custom provider (z.ai, Groq, etc.)
- Search, vision, CDN still use SDKRouter
- Switch providers without affecting core CMDOP features
How do I switch providers?
Desktop
- Settings → Providers
- Click the radio button next to the provider you want
- The badge under the chat input updates immediately
CLI
cmdop provider set <id> # switch to custom
cmdop provider default # back to SDKRouterWhat about SDKRouter model aliases (@code, @balanced)?
SDKRouter aliases (@code, @balanced, @smart) are resolved by the SDKRouter server. When a custom provider is active, CMDOP automatically substitutes these aliases with the provider’s default model (e.g., @code → glm-5).
In the chat UI, the model selector is replaced by a provider badge showing the active provider and actual model:
┌──────────────┐ ┌─────────┐
│ Z.AI • glm-5 │ │ @code ▼ │ ← SDKRouter default
└──────────────┘ └─────────┘How are API keys protected?
Custom provider API keys are never stored in config.yaml. They go to a dedicated file:
~/.config/cmdop/provider_keys.json (file permissions: 0600, owner read/write only){
"providers": {
"uuid-here": "your-api-key"
}
}How do I test a provider?
Desktop
Click the flask icon (🧪) next to a provider in Settings → Providers. It sends a “Hi” request and shows success/error.
CLI
cmdop provider test <id>How do I delete a provider?
Desktop
Click the trash icon next to the provider in Settings → Providers.
CLI
cmdop provider delete <id>