-
Notifications
You must be signed in to change notification settings - Fork 208
Description
Description
When using ProxyPal as a local proxy for Claude Code, requests sent to Codex models fail with the following error:
API Error: 400 {"error":{"message":"Unknown parameter: 'tools.defer_loading'"}}
This happens because Claude Code sends the field:
tools.defer_loading
when Tool Search / MCP tools are enabled.
The CLIProxyAPI engine bundled inside ProxyPal appears to forward this parameter directly to upstream providers, which causes Codex/OpenAI-compatible APIs to reject the request.
Relevant upstream fix
This issue appears to already be fixed in CLIProxyAPI:
router-for-me/CLIProxyAPI#1822
That PR strips unsupported fields like:
tools.defer_loading
cache_control
when translating Claude tool payloads for Codex/Gemini upstreams.
Environment
ProxyPal version
0.4.8
Installation method
macOS .dmg release
Claude Code configuration
ANTHROPIC_BASE_URL=http://127.0.0.1:8317
ANTHROPIC_AUTH_TOKEN=proxypal-local
ANTHROPIC_DEFAULT_OPUS_MODEL=gpt-5.3-codex
Steps to reproduce
- Run ProxyPal
- Configure Claude Code to use ProxyPal as
ANTHROPIC_BASE_URL - Enable MCP tools / Tool Search
- Send a tool-enabled request
ProxyPal forwards tools.defer_loading to upstream → upstream rejects the request.
Current workaround
Disable tool search in Claude Code:
ENABLE_TOOL_SEARCH=false
However this disables lazy tool loading.
Expected behavior
ProxyPal should strip unsupported parameters before forwarding requests upstream, specifically:
tools.defer_loading
This would match the behavior implemented in CLIProxyAPI PR #1822.
Question
Does ProxyPal currently bundle a CLIProxyAPI version that includes the fix from PR #1822?
If not, would it be possible to update the bundled engine or implement equivalent filtering inside ProxyPal?
Additional note
ProxyPal regenerates proxy-config.yaml, so manual payload.filter workarounds cannot be persisted.
Thanks for building ProxyPal — it makes running Claude Code with local proxy stacks much easier.