Skip to content

ProxyPal bundled CLIProxyAPI does not strip tools.defer_loading (Claude Code + Codex compatibility) #193

@damaswangsa

Description

@damaswangsa

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

  1. Run ProxyPal
  2. Configure Claude Code to use ProxyPal as ANTHROPIC_BASE_URL
  3. Enable MCP tools / Tool Search
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions