model switch also switches provider (gpt models were sent to the Claude API)
This commit is contained in:
1 parent
658ada46f7
commit
ad73e8f1c2
7 files changed
+171
-21
No files matched your search
@@ -18,4 +18,12 @@ echo "$log" | grep -q '"auth": "Bearer fake-token"'
|
||||
echo "$log" | grep -q 'oauth-2025-04-20'
|
||||
echo "$log" | grep -q 'hi from hx' # bash tool result sent back to the model
|
||||
ls "$tmp/home/.hx/sessions/"*/*.jsonl > /dev/null
|
||||
# a GPT model goes to the Codex endpoint, not to the Claude API (both logged in)
|
||||
echo '{"claude":{"access":"fake-token","refresh":"r","expires":99999999999999},"codex":{"access":"cx-token","refresh":"r","expires":99999999999999,"account_id":"acc"}}' > "$tmp/home/.hx/auth.json"
|
||||
HOME="$tmp/home" HX_BASE_URL="http://127.0.0.1:$port" "$root/target/debug/hx" -m gpt-5.6-terra -p "hi" > /dev/null 2> "$tmp/err" || true
|
||||
curl -s "http://127.0.0.1:$port/" | python3 -c '
|
||||
import json, sys
|
||||
last = json.load(sys.stdin)[-1]
|
||||
assert last["path"].endswith("/responses") and last["body"]["model"] == "gpt-5.6-terra" and last["auth"] == "Bearer cx-token", last
|
||||
' || { echo "FAIL: gpt model not routed to codex"; cat "$tmp/err"; exit 1; }
|
||||
echo "e2e ok"
|
||||
Reference in new issue
Block a user