Skip to content

fix(cli): setting a project up for Codex writes a model the account cannot use #700

Description

@blafourcade

Setting a project up for Codex writes a model name that a ChatGPT-account Codex refuses. Every session in that project fails until someone edits the file by hand.

What was measured

aidd setup --ai codex --source local --path <repo> --plugins none --yes

writes into the project's .codex/config.toml:

model = "gpt-5"
approval_policy = "on-request"

and the next session ends before it starts:

ERROR: {"type":"error","status":400,"error":{"type":"invalid_request_error",
 "message":"The 'gpt-5' model is not supported when using Codex with a ChatGPT account."}}

Twice, on two fresh projects. It resolves by overriding the model, either in the file or with -m.

Why it matters

This is the first command a person runs. Getting a 400 on the first session after a successful setup reads as "the tool is broken", and nothing in the setup output points at the line that caused it.

The model also carries a second cost: codex warns Model metadata for 'gpt-5' not found. Defaulting to fallback metadata, so even where the name is accepted the session runs on guessed metadata.

Done when

  • A project set up for Codex runs a session without being edited by hand.
  • The written model is one the account can actually use, or no model is written at all and Codex's own default applies.
  • A test fails when setup writes a model the tool would reject.

Open question, for whoever picks it up

Whether AIDD should pin a model here at all. Pinning means owning a name that changes outside this repository and differs by account type; not pinning means the tool decides. The measurement above only shows the current value is wrong, not which of the two is right.

Where it was found

While verifying #698 end to end on a real Codex session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Status
    Ideation

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions