OpenAI-compatible proxy server for the CommandCode API, built in high-performance native Node.js (zero external dependencies). It exposes /v1/chat/completions, /v1/responses, and /v1/models endpoints so OpenAI-compatible clients (e.g. Claude Code, Aider, Continue, Roo Code) can call CommandCode models through a local HTTP server.
Repository: https://github.com/Rbil1y/command-code-proxy-server
Version: v1.0.8
- OpenAI-compatible chat completions endpoint (
/v1/chat/completions,/chat/completions) - OpenAI Responses API endpoint (
/v1/responses) - Streaming (SSE) and non-streaming responses
- OpenAI-compatible model list endpoint (
/v1/models) - Health check endpoint (
/health) - Short model name mapping & automatic pass-through
- Automatic capping of
max_tokens(200,000 max) to prevent upstream validation errors - Optional default API key injection via CLI (
-api-key) - Per-request API key via
Authorizationheader - Configurable host and port
- Zero external
node_modulesdependencies (100% native Node.js) - Integrated version check against GitHub tags and npm registry
- Node.js 18.0.0 or newer
npm startor directly:
node bin/cli.jsDefault server address:
http://127.0.0.1:55990
npm start -- [options]
# or
node bin/cli.js [options]| Option | Default | Description |
|---|---|---|
-host |
127.0.0.1 |
Host to bind the server to |
-port |
55990 |
Port to run the server on |
-api-key |
empty | Optional default CommandCode API key to inject |
-version |
false |
Print version and exit |
-debug |
false |
Enable verbose debug logging |
-help |
false |
Show help message |
Examples:
# Run on default host and port
node bin/cli.js
# Inject your CommandCode API key automatically for all requests
node bin/cli.js -api-key your-commandcode-api-key
# Run on a custom port
node bin/cli.js -port 8080
# Expose on all network interfaces
node bin/cli.js -host 0.0.0.0
# Print version
node bin/cli.js -versionThe proxy uses the API key in this order:
-api-keyCLI value (if specified when starting the proxy server)Authorizationheader from the incoming client request- If neither exists, the request returns
401 Unauthorized
Header format:
Authorization: Bearer your-commandcode-api-keyThe proxy accepts full model IDs and short aliases:
| Alias | Maps to |
|---|---|
muse-spark-1.2-contributor, muse-contributor |
meta/muse-spark-1.2-contributor |
muse-spark-1.2, muse1.2 |
meta/muse-spark-1.2 |
muse-spark-1.1, muse-spark |
meta/muse-spark-1.1 |
gpt-5.6-luna, luna |
openai/gpt-5.6-luna |
gpt-5.6-terra, terra |
openai/gpt-5.6-terra |
gpt-5.6-sol, sol |
openai/gpt-5.6-sol |
deepseek-v4-pro, deepseek-v4, deepseek-pro |
deepseek/deepseek-v4-pro |
deepseek-v4-flash, deepseek-flash |
deepseek/deepseek-v4-flash |
minimax-m2.7, minimax2.7 |
MiniMaxAI/MiniMax-M2.7 |
minimax-m2.5, minimax2.5, minimax |
MiniMaxAI/MiniMax-M2.5 |
minimax-m3, minimax3 |
MiniMaxAI/MiniMax-M3 |
glm-5.2, glm5.2, glm52 |
zai-org/GLM-5.2 |
glm-5.1 |
zai-org/GLM-5.1 |
glm-5 |
zai-org/GLM-5 |
kimi-k3, kimi3 |
moonshotai/Kimi-K3 |
kimi-k2.6, kimi2.6 |
moonshotai/Kimi-K2.6 |
kimi-k2.5, kimi2.5 |
moonshotai/Kimi-K2.5 |
qwen-3.6-max-preview, qwen3.6-max |
Qwen/Qwen3.6-Max-Preview |
qwen-3.6-plus, qwen3.6-plus, qwen3.6 |
Qwen/Qwen3.6-Plus |
step-3.5-flash, step3.5 |
stepfun/Step-3.5-Flash |
step-3.7-flash, step3.7 |
stepfun/Step-3.7-Flash |
gemini-3.1-flash-lite, gemini-flash-lite |
google/gemini-3.1-flash-lite |
qwen-3.7-max-free, qwen3.7-max-free |
Qwen/Qwen3.7-Max-Free |
qwen-3.7-max, qwen3.7-max |
Qwen/Qwen3.7-Max |
mimo-v2.5-pro, mimo-pro |
xiaomi/mimo-v2.5-pro |
mimo-v2.5, mimo |
xiaomi/mimo-v2.5 |
Unknown model names are passed through unchanged.
.
├── README.md
├── package.json
├── bin
│ └── cli.js
├── src
│ ├── convert.js
│ ├── index.js
│ ├── models.js
│ ├── proxy.js
│ ├── server.js
│ └── version.js
└── test
├── convert.test.js
└── models.test.js
MIT