Skip to Content
CLICustom LLM Providers

Custom LLM Providers

TL;DR

CMDOP supports custom LLM providers — any OpenAI-compatible API endpoint can be used for chat completions alongside the default cmdop provider. 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 the cmdop model router.

Use any OpenAI-compatible AI provider for chat completions.

How do I add a custom provider?

Via Desktop UI

  1. Open Settings → Providers (in “Additional” section)
  2. Click Add & Activate
  3. Select a preset (Z.AI, MiniMax, DeepSeek, Ollama, etc.) or choose “Custom…”
  4. Enter your API key
  5. 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 the cmdop default provider cmdop provider default

Which providers are supported?

Any OpenAI-compatible endpoint works. Built-in presets (19 total):

ProviderIDBase URLDefault Model
Anthropicanthropichttps://api.anthropic.com/v1claude-sonnet-4-6
Z.AIzaihttps://api.z.ai/api/coding/paas/v4glm-5
Z.AI Chinazai-cnhttps://open.bigmodel.cn/api/paas/v4glm-5
MiniMaxminimaxhttps://api.minimax.io/v1MiniMax-M2.7
Kimikimihttps://api.kimi.com/coding/v1kimi-k2.6
Moonshotmoonshothttps://api.moonshot.ai/anthropickimi-k2.6
DeepSeekdeepseekhttps://api.deepseek.com/v1deepseek-chat
Xiaomi MiMomimohttps://api.xiaomimimo.com/v1mimo-v2-pro
Alibabaalibabahttps://modelstudio.aliyuncs.com/compatible-mode/v1qwen3.5-plus
Alibaba USalibaba-ushttps://modelstudio-us.aliyuncs.com/compatible-mode/v1qwen3.5-plus
OpenAIopenaihttps://api.openai.com/v1gpt-5
Geminigeminihttps://generativelanguage.googleapis.com/v1beta/openaigemini-3-pro
xAIxaihttps://api.x.ai/v1grok-4-1-fast
Mistralmistralhttps://api.mistral.ai/v1mistral-large-latest
OpenRouteropenrouterhttps://openrouter.ai/api/v1(any model)
Groqgroqhttps://api.groq.com/openai/v1llama-3.3-70b-versatile
Ollamaollamahttp://localhost:11434/v1(user selects)
LM Studiolmstudiohttp://localhost:1234/v1(user selects)
CustomcustomAny URL(user specifies)

How does it work?

CMDOP uses a two-key architecture:

KeyPurposeStorage
CMDOP auth tokencmdop model router: search, vision, CDN~/.config/cmdop/token.json
Custom provider API keyChat 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 the cmdop model router
  • Switch providers without affecting core CMDOP features

A custom provider is the bring-your-own-key escape hatch from the default router path. For the full picture — how the default path supplies provider keys, what the router brokers, and the two-credential model — see How model access works.

How do I switch providers?

Desktop

  1. Settings → Providers
  2. Click the radio button next to the provider you want
  3. The badge under the chat input updates immediately

CLI

cmdop provider set <id> # switch to custom cmdop provider default # back to the cmdop default provider

What about model aliases (@code, @balanced)?

Model aliases (@code, @balanced, @smart) are resolved by the cmdop model router. When a custom provider is active, CMDOP automatically substitutes these aliases with the provider’s default model (e.g., @codeglm-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 ▼ │ ← cmdop 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>
Last updated on