Skip to content

Codex plugin header detection fails. #70

Description

@fonqL

Environment:

  • ccproxy: 0.2.10
  • Codex CLI: 0.132.0
  • Auth mode: ChatGPT/OAuth
  • Config enables codex + oauth_codex plugin

Reproduction:

  1. Remove ~/.cache/ccproxy/codex_headers_*.json
  2. Start ccproxy with codex plugin enabled:
    ccproxy serve --port 8014 --log-level debug
  3. Observe startup logs.

Expected:

  • ccproxy should capture the current Codex CLI request and generate codex_headers_0.132.0.json.

Actual:

  • ccproxy fail to capture.

log:

03:50:02.109 [debug    ] [core        ] [plugin    ] detection_service_using        [ccproxy.plugins.codex.detection_service] cmd_id=4deb2105 cwd=PosixPath('/home/fofo/work/evo/ele') filename=detection_service.py home_dir=/home/fofo lineno=386
03:50:22.196 [error    ] [core        ] [plugin    ] failed_to_capture_codex_cli_request [ccproxy.plugins.codex.detection_service] cmd_id=4deb2105 filename=detection_service.py lineno=447 stderr='OpenAI Codex v0.132.0\n--------\nworkdir: /home/fofo/work/evo/ele\nmodel: gpt-5.5\nprovider: openai\napproval: never\nsandbox: workspace-write [workdir, /tmp, $TMPDIR]\nreasoning effort: high\nreasoning summaries: none\nsession id: 019e52f4-4c89-7bf3-a685-23b1726604f4\n--------\nuser\ntest\ncodex\nReady.\ntokens used\n1,612\n' stdout='Ready.\n'
03:50:22.196 [warning  ] [core        ] [plugin    ] detection_codex_headers_failed [ccproxy.plugins.codex.detection_service] cmd_id=4deb2105 fallback=True filename=detection_service.py lineno=119
╭─────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────╮
│ /home/fofo/.local/share/uv/tools/ccproxy-api/lib/python3.11/site-packages/ccproxy/plugins/codex/detection_service.py:102 in initialize_detection         │
│                                                                                                                                                          │
│   101 │   │   │   │   # No cache or version changed - detect fresh                                                                                       │
│ ❱ 102 │   │   │   │   detected_data = await self._detect_codex_headers(current_version)                                                                  │
│   103 │   │   │   │   # Cache the results                                                                                                                │
│                                                                                                                                                          │
│ /home/fofo/.local/share/uv/tools/ccproxy-api/lib/python3.11/site-packages/ccproxy/plugins/codex/detection_service.py:453 in _detect_codex_headers        │
│                                                                                                                                                          │
│   452 │   │   │   )                                                                                                                                      │
│ ❱ 453 │   │   │   raise RuntimeError("Failed to capture Codex CLI request")                                                                              │
│   454                                                                                                                                                    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Failed to capture Codex CLI request

03:50:22.261 [warning  ] [core        ] [plugin    ] using_fallback_codex_data      [ccproxy.plugins.codex.detection_service] cmd_id=4deb2105 filename=detection_service.py lineno=514

It is speculated that this may be because OPENAI_BASE_URL is no longer compatible with the current version of Codex.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions