feat: Add Command Code provider (42 models from commandcode.ai) - #471
Open
themuuln wants to merge 3 commits into
Open
feat: Add Command Code provider (42 models from commandcode.ai)#471themuuln wants to merge 3 commits into
themuuln wants to merge 3 commits into
Conversation
Adds commandcode-proxy, a Rust translation shim that bridges Command Code's proprietary API (POST /alpha/generate) to an OpenAI-compatible endpoint (localhost:8399). VibeProxy then routes requests through its standard openai-compatibility mechanism. Components: - commandcode-proxy binary (Rust/axum): SSE streaming, model list, tool calls - ServerManager: lifecycle management alongside cli-proxy-api-plus - config.yaml: static provider entry with 24 model aliases (CC: prefix) Supports all Command Code models: Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, MiMo, and Step.
- Retry on 429/5xx with exponential backoff (MAX_RETRIES=3) - Request timeout (REQUEST_TIMEOUT=60s) - Connection pooling (pool_max_idle_per_host=4) - Model alias mapping from config.yaml (24 aliases) - Fix base-url to include /v1 (CLIProxyAPIPlus strips it)
themuuln
force-pushed
the
feature/commandcode-provider
branch
from
July 16, 2026 15:32
a2f437b to
e95e39d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Adds Command Code as a new provider. For anyone who uses commandcode.ai — the model aggregator with Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM — this makes those models accessible right from VibeProxy.
The core problem: CC has its own API format. Different from OpenAI. Different endpoints, different SSE events, different message structure. CLIProxyAPIPlus only speaks OpenAI.
The fix: A small Rust binary (3.3MB) that sits between CLIProxyAPIPlus and CCs API. Translates requests in, responses out. One-way translation, transparent to the rest of the stack.
Architecture
What changed
src/Sources/Resources/commandcode-proxysrc/Sources/Resources/config.yamlopenai-compatibilityprovider with 24 model aliasessrc/Sources/ServerManager.swiftCOMMANDCODE_PROXY.md42 models, all available
Claude Opus 4.8, Sonnet 4.6, Haiku 4.5. GPT-5.5, 5.4, 5.3 Codex. Gemini 3.5 Flash. DeepSeek V4 Pro/Flash. Kimi K2.6. Qwen 3.7 Max. GLM 5.1. MiniMax M2.7. MiMo V2.5. Step 3.5 Flash.
Get your API key at commandcode.ai. Click "Add API Key" in VibeProxy Settings, paste it. Models show up as
CC: Opus 4.7,CC: DeepSeek V4 Flash, etc.Production features
pool_max_idle_per_host=4, 90s idle timeoutREQUEST_TIMEOUTenv var (default 600s)CC: prefix→ actual model namesHow to rebuild
Source repo: https://github.com/themuuln/commandcode-proxy
What I tested
/v1/models— confirmed working against live CC API[DONE]. Clean OpenAI SSE format.get_weathertool call came through with propertool_callsSSE chunks. Function name, arguments, IDs all correct.swift buildcompiles clean. App launches, all 3 processes start (CLIProxyMenuBar + cli-proxy-api-plus + commandcode-proxy).