Environment
claude-code-proxy v0.1.34
Claude Code 2.1.220 (VS Code extension and CLI)
Provider: grok, model grok-4.6
Problem
The Grok proxy rejects any tool declaration that carries max_uses. It returns a 400, and the request never reaches xAI. Claude Code puts max_uses on its own WebSearch tool, so every session that declares web search hits this.
Example 1 -- a WebSearch tool with a use cap
How to reproduce
curl -s -X POST http://$PROXY_HOST:$PROXY_PORT/v1/messages \
-H 'content-type: application/json' -H 'authorization: Bearer unused' \
-d '{"model":"grok-4.6","max_tokens":64,
"messages":[{"role":"user","content":"hi"}],
"tools":[{"name":"WebSearch","description":"Search the web","max_uses":6,
"input_schema":{"type":"object",
"properties":{"query":{"type":"string"}},
"required":["query"]}}]}'
Observed
API Error: 400 unsupported tool field: max_uses
The request is rejected. The turn produces no reply.
Expected
The request is accepted and the turn replies normally.
Environment
Problem
The Grok proxy rejects any tool declaration that carries
max_uses. It returns a 400, and the request never reaches xAI. Claude Code putsmax_useson its ownWebSearchtool, so every session that declares web search hits this.Example 1 -- a WebSearch tool with a use cap
How to reproduce
Observed
The request is rejected. The turn produces no reply.
Expected
The request is accepted and the turn replies normally.