-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Environment
- CLIProxyAPI Version: 6.8.22-0-plus
- Client: Kiro IDE (macOS)
- Model: kiro-claude-sonnet-4-6
Bug 1 (Critical): 400 — "Improperly formed request" when tools array is included
Description
When Kiro sends a request that includes a tools array (MCP tools like context7, sequential-thinking, filesystem, etc.), CLIProxyAPI returns HTTP 400 with:
{"message":"Improperly formed request.","reason":null}Requests without tools work fine. This completely breaks MCP tool functionality.
Request details
URL: /v1/chat/completions
Method: POST
Content-Length: 27057
Model: kiro-claude-sonnet-4-6
Tools included in the failing request:
context7__resolve-library-idcontext7__query-docssequential-thinking__sequentialthinkingfilesystem__read_file,read_text_file,write_file,edit_file, etc.
Suspected cause
The proxy may not be correctly translating OpenAI-format tools schema to Claude API format before forwarding. The tools[].function.parameters structure or the overall payload size/structure is being rejected by the upstream Claude API.
Bug 2: 404 — Missing /v1/ prefix in request URL
Description
In a separate case, the proxy sent a request to /chat/completions (without the /v1/ prefix), resulting in a 404.
URL: /chat/completions ← missing /v1/
Method: POST
Response: 404
This appears to be a routing/base-path issue in the proxy configuration.
Impact
| Bug | Impact |
|---|---|
| 400 (tools) | All MCP tool calls fail — core functionality broken |
| 404 (path) | All requests fail when base path is misconfigured |
Notes
Both errors were captured from CLIProxyAPI error logs at:
~/Library/Application Support/Quotio/logs/
Happy to provide full log files if helpful.