发布

  • feat(codex): auto-detect ChatGPT target and force HTTP transport (#68)

    frostbyte_neo 发布于 2026-04-21 15:33:35 +00:00

    Two independent Codex UX improvements on top of PR #69's base URL fix:

    1. Auto-detect upstream target from ~/.codex/auth.json — ChatGPT OAuth
      users (codex login) no longer need to pass --tap-target manually.
      Falls back to api.openai.com for API-key users.

    2. Reject WebSocket upgrade requests with 426 for Codex (default).
      Codex v0.120.0+ defaults to WebSocket transport which hides each turn
      inside one long-lived connection — trace records only appear in the
      live viewer when the WS closes. The 426 triggers Codex's built-in
      WS→HTTP fallback immediately (no retry waste), so each turn becomes
      an independent HTTP/SSE record that shows up in real time.

    Co-authored-by: liangweifeng liangweifeng@bytedance.com
    Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com

    下载附件