Status: [UNTESTED] Endpoints found: http://127.0.0.1:18080/v1/chat/completions http://127.0.0.1:18080/v1/models Source: https://github.com/Lythaeon/command-code-openapi-proxy # command-code-openapi-proxy OpenAI-compatible proxy in front of Command Code's HTTP API. Use your Command Code subscription with **any** client supporting OpenAI Chat Completions - no vendor lock-in. ## What it does ``` ┌──────────────────┐ ┌───────────────┐ ┌─────────────────────────┐ │ OpenCode │ POST │ proxy │ POST │ Command Code API │ │ LiteLLM │ ────> │ :18080 │ ────> │ /alpha/generate │ │ curl / any SDK │ <──── │ (local) │ <──── │ (NDJSON) │ │ │ SSE │ │ NDJSON│ │ └──────────────────┘ └───────────────┘ └─────────────────────────┘ ``` The proxy translates the **OpenAI `/v1/chat/completions`** protocol to Command Code's custom wire format, preserving the exact API fingerprint (headers, body structure, auth) so the upstream cannot distinguish proxy traffic from the official `cmd` CLI. ## Quick start ```bash # Prerequisites: Rust 1.75+, command-code CLI authenticated git clone https://github.com/Lythaeon/command-code-openapi-proxy.git cd command-code-openapi-proxy # Run cargo run --release # listening on http://127.0.0.1:18080 # Test curl http://127.0.0.1:18080/v1/models curl http://127.0.0.1:18080/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"xiaomi/mimo-v2.5","messages":[{"role":"user","content":"Hello"}]}' ``` ## Features - **OpenAI-compatible** - `/v1/chat/completions` (stream + non-stream) - **Streaming** - full SSE translation (text, reasoning, tool calls) - **Tool calls** - OpenAI function calling ↔ Command Code tool-call format - **