Skip to content

[Bug] Codex model access rejection exposes raw provider errors #613

Closed

Description

@Bindy-lbb

Problem

A Codex employee can select a model from the CLI catalog and then receive HTTP 400: The 'gpt-6-luna' model is not supported when using Codex with a ChatGPT account. The conversation renders the raw provider JSON with generic connection/task advice. Catalog discovery succeeds independently of inference authorization, so refreshing the list alone cannot fix this rejection.

Expected: explain that the selected model was rejected for this Codex login, distinguish catalog discovery from verified access, and guide the user to change the model or verify the CLI login before resending. Keep the explicit selection and authentication/billing boundary unchanged.

Actual: an opaque codex.turn_failed error and generic retry advice obscure the necessary recovery.

Requirement decision

Scope and acceptance criteria

Requirement / acceptance Expected behavior
REQ-001 / AC-001 Classify the observed ChatGPT-account model rejection as a specific non-retryable Codex model-access failure. Produce one failed terminal event, no completed result, and no raw provider JSON in the public message. Do not misclassify unrelated 400, 401, 403, or stream failures.
REQ-002 / AC-002 Show localized Chinese/English model-access recovery in the conversation, identifying the requested model and directing the user to change it or check the same Codex CLI login before resending. Preserve ordinary failure behavior.
REQ-003 / AC-003 Explain in the Codex model picker that listed/recommended models are not proof of access and refreshing does not validate inference permission; emphasize the last matching model rejection without changing the saved model. Other Agents retain their existing behavior.
REQ-004 / AC-004 Add executable-backed and renderer regressions; pass the repository's full npm run check gate. Update README and CHANGELOG and submit a focused PR for independent review.

Non-goals

No paid inference probes, account/plan entitlement guesses, universal model allow/deny lists, automatic model substitution, credential changes, API-billing fallback, or installed-client deployment. The fix cannot grant upstream model access. Previously persisted generic errors remain historical records.

Affected components and risks

Codex engine failure translation, shared model configuration metadata, conversation model picker and error presentation. Error recognition must be narrowly scoped; permission availability can differ by login and client, so the UI must not label catalog entries as verified or permanently block a model globally. No dependency changes.

Validation plan

  1. Reproduce the captured JSON error using a fake Codex executable, for both Codex authentication modes, without remote inference.
  2. Assert typed single-terminal failure and negative controls for other provider errors.
  3. Verify localized error recovery and catalog/access distinction in renderer interactions, including an unchanged saved selection and no automatic dispatch.
  4. Run the full documented local gate, then inspect PR checks and notify the requested reviewer.

Revision history

  • R1 (2026-10-20T02:33:12+00:00): initial ready scope authorized by the requesting maintainer; implementation has not begun.

Accepted delivery record

Status: accepted. Revision: R1. Decision: DEC-ROLEWEAVE-613-001. AC-001 through AC-004 accepted following independent exact-head review and green CI in #614, squash-merged at 2dc7764. The original readiness text above is retained as history. See appended ACCEPT and requirement-decision:v1 comments for evidence and limits.

  • R1 delivery accepted on 2026-10-21 (Asia/Shanghai); linked review/CI and original requirement preserved. Issue remains closed, with no new implementation revision added.

Activity

  1. PeterGuy326 commented on Oct 20, 2026

    @PeterGuy326
    Contributor

    ACCEPT — #613 R1, DEC-ROLEWEAVE-613-001, AC-001 through AC-004.

    #614 was independently re-approved on exact head ecd4c81 by PeterGuy326 (PR author Bindy-lbb), after all 11 current-head hosted checks passed. It was squash-merged at 2dc7764 on 2026-10-20T16:30:34Z. Review and CI evidence: #614 and https://github.com/bytefolk/roleweave/actions/runs/39456647131 .

    The narrow provider-error classification, localized recovery, catalog/access distinction and explicit model/account/billing boundaries were verified. Independent local evidence: equivalent executable source full gate 3058 pass, 0 fail, 3 existing conditional skips, audit 0; exact author-head build and 17 focused regressions pass. This does not grant upstream model access or claim real-customer/installed-client acceptance. GitHub auto-closed the issue at merge; this appends the acceptance ledger without reopening it.

  2. PeterGuy326 commented on Oct 20, 2026

    @PeterGuy326
    Contributor

    requirement-decision:v1 | status=accepted | revision=R1 | decision=DEC-ROLEWEAVE-613-001 | scope=AC-001 through AC-004 | evidence=#614 approved exact head ecd4c81, all 11 checks PASS, squash 2dc7764. Preserve the original requirement and historical readiness record; no upstream entitlement or customer acceptance is inferred.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions