mirror of
https://github.com/teamchong/pxpipe.git
synced 2026-07-22 02:02:51 +02:00
docs(demo): pin demo URLs to 127.0.0.1 to match the IPv4 loopback bind
This commit is contained in:
@@ -46,8 +46,8 @@ Each proxy serves a **live dashboard** in your browser — no commands, no extra
|
||||
|
||||
| open in browser | shows |
|
||||
|---|---|
|
||||
| **http://localhost:47824/** (pxpipe → `b.sh`) | **`THIS SESSION — N% fewer tokens (… total)`** |
|
||||
| http://localhost:47823/ (plain → `a.sh`) | ~0% — the passthrough **control** |
|
||||
| **http://127.0.0.1:47824/** (pxpipe → `b.sh`) | **`THIS SESSION — N% fewer tokens (… total)`** |
|
||||
| http://127.0.0.1:47823/ (plain → `a.sh`) | ~0% — the passthrough **control** |
|
||||
|
||||
It updates as the run goes. The headline is the **honest, rate-free number**: real
|
||||
server tokens (`input+cache_create+cache_read+output`) vs the same body as text
|
||||
|
||||
+1
-1
@@ -30,5 +30,5 @@ esac
|
||||
|
||||
echo "LEFT = normal (passthrough :47823), model=$MODEL. Launching interactive Claude with the task..."
|
||||
# Run in $DIR via a subshell so your terminal stays in the original dir afterward.
|
||||
( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://localhost:47823 \
|
||||
( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://127.0.0.1:47823 \
|
||||
"$CB" "$PROMPT" --model "$MODEL" --setting-sources project --strict-mcp-config --no-chrome --dangerously-skip-permissions )
|
||||
|
||||
+1
-1
@@ -33,5 +33,5 @@ esac
|
||||
|
||||
echo "RIGHT = pxpipe (:47824), model=$MODEL. Launching interactive Claude with the task..."
|
||||
# Run in $DIR via a subshell so your terminal stays in the original dir afterward.
|
||||
( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://localhost:47824 \
|
||||
( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://127.0.0.1:47824 \
|
||||
"$CB" "$PROMPT" --model "$MODEL" --setting-sources project --strict-mcp-config --no-chrome --dangerously-skip-permissions )
|
||||
|
||||
@@ -43,8 +43,8 @@ const PROMPT =
|
||||
|
||||
// Both arms run through a proxy so BOTH are logged. LEFT = passthrough (normal),
|
||||
// RIGHT = pxpipe. See demo/cost-ab/README.md for the 4-terminal layout that starts them.
|
||||
const ON_PROXY = process.env.DEMO_ON_PROXY ?? 'http://localhost:47824'; // pxpipe
|
||||
const OFF_PROXY = process.env.DEMO_OFF_PROXY ?? 'http://localhost:47823'; // passthrough
|
||||
const ON_PROXY = process.env.DEMO_ON_PROXY ?? 'http://127.0.0.1:47824'; // pxpipe
|
||||
const OFF_PROXY = process.env.DEMO_OFF_PROXY ?? 'http://127.0.0.1:47823'; // passthrough
|
||||
|
||||
// --setting-sources project -> use ONLY the seeded project settings (model [1m],
|
||||
// no MCP); ignore the user global ~/.claude/settings.json.
|
||||
|
||||
@@ -51,7 +51,7 @@ on the dashboard "compress models" chips.
|
||||
| LEFT — plain (`a.sh`) | **may be wrong** at this size (drowns in filler) |
|
||||
|
||||
**pxpipe correct + plain wrong = the effective-context win.** Each proxy also serves
|
||||
a live dashboard ([:47824](http://localhost:47824/) pxpipe, [:47823](http://localhost:47823/)
|
||||
a live dashboard ([:47824](http://127.0.0.1:47824/) pxpipe, [:47823](http://127.0.0.1:47823/)
|
||||
plain) showing the context/token reduction — the same number `/context` reports.
|
||||
|
||||
---
|
||||
|
||||
@@ -30,5 +30,5 @@ esac
|
||||
|
||||
echo "LEFT = normal (passthrough :47823), model=$MODEL. Launching interactive Claude with the needle task..."
|
||||
# Run in $DIR via a subshell so your terminal stays in the original dir afterward.
|
||||
( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://localhost:47823 \
|
||||
( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://127.0.0.1:47823 \
|
||||
"$CB" "$PROMPT" --model "$MODEL" --setting-sources project --strict-mcp-config --dangerously-skip-permissions )
|
||||
|
||||
@@ -34,5 +34,5 @@ esac
|
||||
|
||||
echo "RIGHT = pxpipe (:47824), model=$MODEL. Launching interactive Claude with the needle task..."
|
||||
# Run in $DIR via a subshell so your terminal stays in the original dir afterward.
|
||||
( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://localhost:47824 \
|
||||
( cd "$DIR" && exec env ANTHROPIC_BASE_URL=http://127.0.0.1:47824 \
|
||||
"$CB" "$PROMPT" --model "$MODEL" --setting-sources project --strict-mcp-config --dangerously-skip-permissions )
|
||||
|
||||
Reference in New Issue
Block a user