Skip to content

[Bug] ChatGPT account model list returns 400: /codex/models now requires client_version #1249

Description

@initH271

What happened? / 问题描述

For the "OpenAI (ChatGPT Plus/Pro)" provider, the vendor-account model list request has failed with 400 since about 2026-09-24. PI-Desktop cannot get the account's model list, so any model that is only known from that list is rejected locally. For example, gpt-6.1-sol fails with MODEL_NOT_CONFIGURED: Vendor account does not offer model "gpt-6.1-sol" from session-launch.ts, and no request is sent upstream.

The logs only show vendor.account.model.list.failed … model list request failed (400), without the response body.

Root cause / 原因

apps/desktop/electron/main/vendor-live-models.ts (around L117–130) requests GET https://chatgpt.com/backend-api/codex/models with no query string. The endpoint now requires a client_version query parameter. The 400 body says:

('query','client_version') Field required

I tested the same account with 4 GET requests:

originator query status
pi (none, same as PI-Desktop) 400: client_version Field required
pi ?client_version=0.159.2 200: 10 models, including gpt-6.1-sol
codex_cli_rs ?client_version=0.159.2 200: identical body
codex_cli_rs (none) 400: same error

The originator header makes no difference. Only client_version matters.

Expected behavior / 预期行为

  • Send client_version on the model-list request, as Codex CLI does.
  • Include the upstream error body in the vendor.account.model.list.failed log entry, so problems like this are visible without an external repro.

Actual behavior / 实际行为

The model list is empty. Newer models such as gpt-6.1-sol cannot be used with the ChatGPT account, even though the same account serves them in Codex CLI.

App version / 应用版本

0.15.10 (macOS arm64). The request code is unchanged on main at 4547158.

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