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>).
@SiNaPsEr0x

Copy link
Copy Markdown

my only problem is
image
from 1 day fable,opus and sonnet after first post I have this problem... so I send many fix graphics e structural of pxpipe in your PR with other fix but this I dont know the solution :(

@teamchong

Copy link
Copy Markdown
Owner Author

my only problem is image from 1 day fable,opus and sonnet after first post I have this problem... so I send many fix graphics e structural of pxpipe in your PR with other fix but this I dont know the solution :(

frst, Opus and Sonnet are not supported by default. enable them only if you want to experiment with them

second, the screenshot shows one request marked [create], meaning a prompt-cache entry was created. It does not show that cache creation repeats on later requests or that the cache is broken

one create request is normal, subsequent requests should show cache hits if the prefix remains stable

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

2 participants