Thanks to visit codestin.com
Credit goes to github.com

Skip to content
 
 

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CommandCode Proxy Server (Node.js)

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

Features

  • 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 Authorization header
  • Configurable host and port
  • Zero external node_modules dependencies (100% native Node.js)
  • Integrated version check against GitHub tags and npm registry

Requirements

  • Node.js 18.0.0 or newer

Run

npm start

or directly:

node bin/cli.js

Default server address:

http://127.0.0.1:55990

CLI options

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 -version

API key behavior

The proxy uses the API key in this order:

  1. -api-key CLI value (if specified when starting the proxy server)
  2. Authorization header from the incoming client request
  3. If neither exists, the request returns 401 Unauthorized

Header format:

Authorization: Bearer your-commandcode-api-key

Supported model aliases

The 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.

Project structure

.
├── 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

License

MIT

About

OpenAI-compatible proxy server for CommandCode API. Exposes /v1/chat/completions and /v1/models endpoints so any OpenAI-compatible client can use CommandCode models through a local HTTP server.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages