Skip to content

fix: opt-out for child processes inheriting ANTHROPIC_BASE_URL (#111)#122

Open
teamchong wants to merge 1 commit into
mainfrom
fix/111-base-url-child-process-leak
Open

fix: opt-out for child processes inheriting ANTHROPIC_BASE_URL (#111)#122
teamchong wants to merge 1 commit into
mainfrom
fix/111-base-url-child-process-leak

Conversation

@teamchong

Copy link
Copy Markdown
Owner

Fixes #111.

Three changes, one theme: subprocesses inherit ANTHROPIC_BASE_URL and silently route through pxpipe with no way out and no visibility.

1. Per-request bypass: x-pxpipe-bypass: 1

Body forwarded byte-for-byte — no compression, no transforms.
Routing and auth still apply, header stripped before upstream. 0/false/off/no are ignored.

Before:

# plugin's internal probe → compressed like everything else
claude -p "probe"

After:

ANTHROPIC_CUSTOM_HEADERS="x-pxpipe-bypass: 1" claude -p "probe"
# → forwarded untouched

2. Model-scope toggles survive restarts

Dashboard chip toggles now write the config file's models key (write-then-rename, other keys preserved).
Explicit PXPIPE_MODELS env still wins on next start.

Before: toggle chip → restart → reset to env/default
After: toggle chip → restart → still set

3. Skip log names the model

Before: savings:skip(unsupported_model)
After: skip(unsupported=grok-4)

- x-pxpipe-bypass: per-request opt-out for subprocesses that inherited
  ANTHROPIC_BASE_URL; body forwarded byte-for-byte, header stripped.
- Dashboard model-scope toggles persist to the config file's models key
  (atomic write-then-rename); explicit PXPIPE_MODELS env still wins.
- Skip log names the model: skip(unsupported=<model>).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ANTHROPIC_BASE_URL inherited by unrelated child processes breaks third-party CLI compatibility probes

1 participant