Run a localhost proxy that lets OpenAI SDKs talk to CommandCode models
Map short aliases like deepseek-v4-pro or kimi2.6 to full upstream model IDs
Forward per-request Authorization Bearer keys to api.commandcode.ai
Stream chat completions as OpenAI-style SSE chunks to existing chat UIs
Build needs Go 1.26.2 or newer, and a valid CommandCode API key is required for actual calls.
This project is a small server, written in Go, that sits between a client app and a service called CommandCode. Many AI tools speak the OpenAI API style for chat, so this proxy translates OpenAI-style requests into the CommandCode style and back. The point is that any app that already knows how to talk to OpenAI can talk to CommandCode models instead, just by pointing it at this local server. The proxy exposes the two endpoints OpenAI-compatible clients expect: a list-models endpoint at /v1/models and a chat endpoint at /v1/chat/completions. Both streaming and non-streaming responses are supported. By default the server listens on 127.0.0.1 port 55990, but the host and port are configurable with command line flags. There is also a health check at /health that returns a simple ok status. API keys can come from two places. Each incoming request can include its own Authorization Bearer header, which is the preferred path, and the server will pass that key upstream. Alternatively you can pass a default key with the -api-key flag when starting the server, and that key is used when a request does not include its own. If neither is present, the request is rejected with 401 Unauthorized. The README lists short aliases for many model names, so for example you can ask for deepseek-v4-pro or kimi2.6 and the proxy maps that to the full upstream model ID. Unknown names are forwarded as-is. Under the hood, the proxy converts the OpenAI message format into CommandCode's, sends the request to api.commandcode.ai, and converts streaming events back into OpenAI-style SSE chunks. On startup it also checks GitHub tags for a newer version of itself and fetches the latest npm version of the command-code package to include as an upstream header, cached for 30 minutes. Go 1.26.2 or newer is required to build it.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.