command-code-proxy-server
command-code-proxy-server copied to clipboard
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.
## Problem `ConvertMessages` forwards assistant messages that have no text and no tool call as `"content": null`, which the upstream gateway rejects with a **non-retryable 400**. The whole request fails....
after saving right key still getting error unauthorize error
Sometimes I get "[ERROR] Scanner error: bufio.Scanner: token too long" which happens because bufio.Scanner has a hardcoded buffer limit of 1 MB at this line in proxy.go: `scanner.Buffer(make([]byte, 64*1024), 1024*1024)`
Would be nice if we could fetch official models from https://api.commandcode.ai/provider/v1/models, falling back to the current hardcoded implementation on error.