Skip to content

consult -m codex: bundled @openai/codex-sdk 0.146.1 rejects gpt-6-astra ("requires a newer version of Codex"); --model-id cannot reach current models #1880

Closed

Description

@waleedkadous

Summary

consult -m codex --model-id gpt-6-astra fails with a provider 400 because consult runs Codex through the SDK bundled inside @cluesmith/codev (@openai/codex-sdk 0.146.1, which embeds @openai/codex 0.146.1), not the user's installed Codex CLI. The current model (gpt-6-astra) needs a newer Codex, so the lane cannot use it even after the user upgrades their CLI to 0.166.0.

Repro

$ codex --version
codex-cli 0.166.0            # user CLI, freshly upgraded
$ consult -m codex --model-id gpt-6-astra --prompt "Reply with the single word OK."
[CODEX] model: gpt-6-astra at medium reasoning effort (from --model-id)
{"type":"error","status":400,"error":{"type":"invalid_request_error","message":"The 'gpt-6-astra' model requires a newer version of Codex. Please upgrade to the latest app or CLI and try again."}}
The codex lane requested model "gpt-6-astra" (passed via --model-id).

Same result without --model-id when ~/.codex/config.toml has model = "gpt-6-astra" (the user's default).

$ cat $(npm root -g)/@cluesmith/codev/node_modules/@openai/codex-sdk/package.json | grep version
  "version": "0.146.1",
$ npm view @openai/codex-sdk version
0.166.0

Running the same prompt directly with the CLI works: codex exec -m gpt-6-astra ....

Expected

Either (a) consult's codex lane tracks a current @openai/codex-sdk, or (b) consult lets the lane use the user's installed codex binary. The SDK already exposes codexPathOverride; consult does not surface it (no env var or config key; checked CODEX_MODEL, CODEX_PROFILE, CODEX_REASONING_EFFORT, CODEX_HARNESS).

Suggested fix

  • Bump @openai/codex-sdk in codev's dependencies on each release (0.166.0 today), and
  • Add consult.codexPath config / CODEX_PATH env that is passed to the SDK as codexPathOverride, defaulting to the bundled binary, so users can point the lane at a newer CLI when the bundle lags.
  • The error message should say which Codex version the lane is running (bundled 0.146.1) so the mismatch is obvious; today it only names the model id.

Environment

codev @cluesmith/codev (global, /opt/homebrew/lib/node_modules), macOS arm64, Codex auth via ChatGPT login, 2026-11-04.

Related: #708 (model version selection).

Activity

  1. added
    bug
    area/consult
    on Nov 4, 2026
  2. waleedkadous commented on Nov 10, 2026

    @waleedkadous
    ContributorAuthor

    Hit again on 2026-11-09 with codev 3.3.7. Upgrading the machine's global @openai/codex to 0.167.0 does not help, because consult runs the bundled @openai/codex-sdk 0.146.1 (package.json pins ^0.146.0). A direct codex exec -m gpt-6-astra on the global 0.167.0 answers; consult -m codex --model-id gpt-6-astra still gets the 400 "requires a newer version of Codex". Fix asked: bump the bundled codex-sdk to a version that serves the current models. The owner has asked for a fix lane on this.

  3. waleedkadous commented on Nov 10, 2026

    @waleedkadous
    ContributorAuthor

    On it! Working on a fix now.

  4. added 4 commits that reference this issue on Nov 10, 2026
  5. added a commit that references this issue on Nov 10, 2026
    4291dab
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

    area/consultbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions