Skip to content

fix: let GPT-6 Luna chat again on the ChatGPT/Codex subscription route - #201746

Merged
obviyus merged 3 commits into
openclaw:mainfrom
MertBasar0:fix/issue-201513
Nov 21, 2026
Merged

obviyus merged 3 commits into
openclaw:mainfrom
MertBasar0:fix/issue-201513

Conversation

@MertBasar0

@MertBasar0 MertBasar0 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Root cause: src/agents/model-catalog-metadata.ts:127 (and :57 in clearRouteBoundCatalogMetadata) on main fd4807a turned any declared inference into { chat: false } when the configured route differs from the catalog route, so GPT-6 Luna's { chat: true, decision } catalog row became a chat veto on the ChatGPT/Codex subscription route.

Fixes #201513

What Problem This Solves

Since 2026.11.5, people who use GPT-6 Luna through a ChatGPT/Codex subscription get "does not support chat" on every turn, from openclaw infer model run --local and from the Gateway, before any request is sent. Other OpenAI models on the same route still work.

User Impact

User impact: openai/gpt-6-luna runs again on the ChatGPT/Codex subscription route, as it did on 2026.11.3. Models whose catalog says they cannot chat stay refused with the same message, and Luna's Decision settings stay tied to the OpenAI Platform route.

Why This Change Was Made

2026.11.5 gave the bundled Luna row both chat and Decision capability (#176133). When the configured route differs from the catalog route, the catalog overlay drops route-bound facts, but it also replaced Luna's chat: true with chat: false. The overlay now decides inference once: on a changed route it keeps a veto only when the catalog row says chat: false, and otherwise drops the whole route-bound declaration, Decision facts included, so the model is treated as chat like the other OpenAI rows on that route.

Two changes on top of @MertBasar0's commit:

  • The provider-config merge (mergeProviderModels) is left as on main. There a decision-bearing row is a discovered per-route grant, such as ClawRouter's granted Luna, and fix(agents): subagent spawn rejects configured ClawRouter models as not chat-capable #186596 deliberately keeps vetoing it on another route because ClawRouter's catalog declares Luna typed-only (docs/providers/clawrouter.md). With the merge change, utility-completion.clawrouter.test.ts fails: the refreshed catalog lets typed-only ClawRouter Luna chat on a changed configured route.
  • With only the veto dropped, an API-only route change (which skips clearRouteBoundCatalogMetadata) let Luna's Decision facts ride along to the new route. The overlay now strips base inference and sets it once.

Codex agrees on the subscription route: its backend /models metadata (codex-rs/protocol/src/openai_models.rs:419-421, ModelInfo) and model/list (codex-rs/app-server/src/models.rs:16, model_from_preset) carry no chat-or-Decision capability split, and gpt-6-luna is listed like any other agent model (codex-rs/models-manager/models.json:1045, visibility: "list", shell_type: "shell_command").

Thanks @Caitoz for the report and the precise analysis, and @MertBasar0 for the fix this builds on.

Evidence

Real built CLI and Gateway with the issue's config verbatim (openai-chatgpt-responses, https://chatgpt.com/backend-api/codex, auth: oauth, agentRuntime: openclaw), a fixture ChatGPT OAuth profile and a local ChatGPT-backend fixture; the real bundled Codex app-server uses the same fixture. No real account.

  • Before (main fd4807a; also v2026.11.5): infer model run --local fails with "This model doesn't support chat; pick another model." (2026.11.5: "Model openai/gpt-6-luna does not support chat inference"); Gateway models.list hides Luna and chat.send gets the same refusal. The fixture receives no model request.
  • After (this PR): infer model run --local returns FIXTURE-ACK; Gateway lists Luna and chat.send answers FIXTURE-ACK; the fixture logs POST /backend-api/codex/responses model gpt-6-luna.
  • Controls, same before and after: typed-only clawrouter/openai/gpt-6-luna granted chat on ClawRouter's endpoint but configured on another route is still refused with the existing message and sends nothing; Luna on its own Platform catalog route reaches the provider; Luna on the native Codex runtime answers through Codex.
  • Regression: one case in model-catalog-inference.test.ts (a chat: true + Decision row on a new endpoint or API keeps no inference). On main both routes fail with expected { chat: false } to be undefined; on the contributor commit alone the API route fails with expected { chat: true, decision: … } to be undefined.

Observed proof lines: #201746 (comment)

Merge danger: two-way door. Only in-memory catalog metadata changes; nothing is written or migrated, and a revert restores the old behavior. Blast radius: models whose bundled catalog row declares chat: true together with Decision facts, used on a non-catalog route; today that is only openai/gpt-6-luna.

@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@MertBasar0
MertBasar0 marked this pull request as ready for review November 19, 2026 09:07
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Nov 19, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Preserve chat eligibility for dual-capability models on alternate routes while removing route-specific Decision metadata.

Example: Run openai/gpt-6-luna using openai-chatgpt-responses at https://chatgpt.com/backend-api/codex.

  • Before: The catalog produces chat:false, hiding Luna and rejecting inference before any provider request.
  • After: The supplied built CLI and Gateway trace returns FIXTURE-ACK through the configured route without inheriting Platform Decision capabilities.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, correct repair with shipped-entry-point before/after evidence, relevant controls and reported red/green regressions; pending CI remains a landing gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The exact-head collaborator trace exercises built infer CLI, Gateway models.list and chat.send using the reported configuration, isolated fixture OAuth state and real transport to a local HTTPS backend; it records before-fix refusal, after-fix FIXTURE-ACK and the expected responses request, plus unchanged sibling controls.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Users selecting Luna on the supported subscription route receive a chat-unsupported refusal before inference starts.
Reason: This restores documented supported behavior with a narrow shared-owner correction, preserves typed-only restrictions, and introduces no option or public API.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR fixes a released subscription-route regression still present on current main, with no actionable patch findings.

Priority: P2
Reviewed head: 781cd22ee072af314bb7691ae8b6e03c2850142b

Before merge

None.

Findings

None.

Agent review details

How this fits together

The shared catalog overlay combines declared model capabilities with configured transport routes; prepared catalogs feed model listings and chat admission.

flowchart LR
  A[Declared model catalog] --> C[Shared metadata overlay]
  B[Configured transport route] --> C
  C --> D[Prepared model catalog]
  D --> E[Model listings]
  D --> F[Chat admission]
  F --> G[Configured provider transport]
Loading

Technical review

Best possible solution:

Land the focused shared-overlay repair after the existing exact-head CI gate passes.

Do we have a high-confidence way to reproduce the issue?

Current-main source deterministically turns Luna's chat:true declaration into chat:false on the reported route; the linked exact-head proof independently records the failure before and successful CLI/Gateway responses after, without a new reviewer-run reproduction.

Is this the best way to solve the issue?

The patch repairs the existing metadata owner, removes duplicate inference assignment, covers endpoint and API changes, and preserves the distinct discovered-grant restriction rather than broadening provider merging.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3d99e4db2439.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f3360e9 adds src/agents/model-catalog-metadata.ts:54 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f3360e97b02f; files: src/agents/model-catalog-metadata.ts)

PR surface

Source +6, Tests +4. Total +10 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 9 3 +6
Tests 1 4 0 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 13 3 +10

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #201513
Summary: This PR is the focused candidate repair for the reported subscription-route catalog regression.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The released regression blocks one explicitly configured model and subscription route while other model choices remain usable.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-19T09:23:40.867Z sha 4be2a02 :: needs real behavior proof before merge. :: none

Reviewed November 21, 2026, 2:41 AM ET / 07:41 UTC (Revision 2).

…aw#201513)

Static dual chat/Decision rows keep chat on a changed route through the catalog overlay; mergeProviderModels keeps vetoing discovered decision-bearing grants on another route (openclaw#186596), so a typed-only ClawRouter Luna stays refused on the refreshed catalog. Replace the resolver table with one overlay regression.
…law#201513)

An API-only route change skipped clearRouteBoundCatalogMetadata, so dropping the chat veto let Luna's Decision facts ride along onto the new route. The overlay now strips base inference and decides it once.
@obviyus

obviyus commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Proof for #201513 on head 781cd22 (base: main fd4807a; reporter release v2026.11.5 e13cf15). Tier: dist-nodts, built CLI and Gateway (node dist/entry.js), isolated --profile/HOME/OPENCLAW_HOME/CODEX_HOME per run.

Setup: the issue's config verbatim (models.providers.openai: api: "openai-chatgpt-responses", baseUrl: "https://chatgpt.com/backend-api/codex", auth: "oauth", the gpt-6-luna row; agentRuntime: openclaw). A fixture ChatGPT OAuth profile (fixture JWT) is written into the isolated state. A Node preload sends OpenClaw's chatgpt.com/backend-api/* (and, for controls, api.openai.com/v1/*, clawrouter.openclaw.ai/v1/*) fetches to a local HTTPS ChatGPT-backend fixture and refuses every other remote fetch. The real bundled Codex app-server 0.169.0 uses the same fixture through its CODEX_HOME config. No real account.

issue route: openai/gpt-6-luna on openai-chatgpt-responses + https://chatgpt.com/backend-api/codex, runtime openclaw
  v2026.11.5 e13cf15ece9b  infer model run --local: {"ok":false,"error":{"message":"Model openai/gpt-6-luna does not support chat inference"}}
  main fd4807ae1136        infer model run --local: {"ok":false,"error":{"message":"This model doesn't support chat; pick another model."}}
                           gateway models.list: lunaRows []
                           gateway chat.send -> history: custom "This model doesn't support chat; pick another model."
                           fixture: no /responses request
  head 781cd22ee072        infer model run --local: {"ok":true,"provider":"openai","model":"gpt-6-luna", outputs [{"text":"FIXTURE-ACK"}]}
                           gateway models.list: lunaRows [{"provider":"openai","id":"gpt-6-luna"}]
                           gateway chat.send -> history: assistant "FIXTURE-ACK"
                           fixture: POST /backend-api/codex/responses model gpt-6-luna

control: typed-only clawrouter/openai/gpt-6-luna (catalog chat:false). The fixture ClawRouter catalog grants this key
Luna chat + Decisions on ClawRouter's endpoint; the configured row moves Luna to https://other.fixture.invalid/v1 (#186596 case)
  main fd4807ae1136 / head 781cd22ee072 (same):
                           infer: "This model doesn't support chat; pick another model."; models.list lunaRows [];
                           chat.send -> custom "This model doesn't support chat; pick another model."; fixture: only GET /v1/catalog

control: openai/gpt-6-luna on its own catalog route (openai-responses, api.openai.com/v1, fixture API key)
  main / head (same):      infer ok FIXTURE-ACK; models.list lists Luna; chat.send -> assistant "FIXTURE-ACK"; fixture POST /v1/responses model gpt-6-luna
                           (both then show "Your request couldn't be completed." from a follow-up request the minimal fixture stream cannot satisfy; same on main)

control: openai/gpt-6-luna on the native Codex runtime (real Codex app-server 0.169.0, no provider override)
  main / head (same):      chat.send -> assistant "FIXTURE-ACK"; fixture POST /backend-api/codex/responses model gpt-6-luna (sent by Codex)

regression (vitest-source) src/agents/model-catalog-inference.test.ts, chat:true + Decision row on a new endpoint/API:
  main fd4807ae1136:       2 failed: expected { chat: false } to be undefined (endpoint and API routes)
  contributor 4be2a02e79:  1 failed (API route): expected { chat: true, decision: { …(5) } } to be undefined
  head:                    model-catalog-inference, utility-completion.clawrouter, prepared-model-runtime.configured,
                           models-config.merge, prepared-model-runtime.capture: all passed
  contributor 4be2a02e79:  utility-completion.clawrouter.test.ts failed: refreshed catalog admitted typed-only ClawRouter Luna on a changed route

@obviyus obviyus changed the title fix(agents): openai/gpt-6-luna rejected as non-chat on subscription routes fix: let GPT-6 Luna chat again on the ChatGPT/Codex subscription route Nov 21, 2026
@obviyus

obviyus commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 21, 2026
@obviyus
obviyus merged commit 39a215a into openclaw:main Nov 21, 2026
140 of 145 checks passed
@obviyus

obviyus commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Merged in 39a215a. Thanks @MertBasar0 for the fix and @Caitoz for the report in #201513. A model whose catalog row declares chat support, such as openai/gpt-6-luna, now stays chat-capable when it runs on a different route than its catalog route (for example the ChatGPT/Codex subscription route), so it no longer fails with "does not support chat inference" before any provider call. The route-bound Decision facts are still dropped on the other route, and models the catalog marks as non-chat stay blocked.

Copy link
Copy Markdown
Contributor Author

Thanks for the follow-up and for testing both PRs, @obviyus! I’d missed the API-only route change. Keeping Luna usable for chat without carrying over the Decision metadata was a good catch.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 22, 2026
openclaw#201746)

Root cause: src/agents/model-catalog-metadata.ts:127 (and :57 in `clearRouteBoundCatalogMetadata`) on main 07aa1df turned any declared `inference` into `{ chat: false }` when the configured route differs from the catalog route, so GPT-6 Luna's `{ chat: true, decision }` catalog row became a chat veto on the ChatGPT/Codex subscription route.

Fixes openclaw#201513

## What Problem This Solves

Since 2026.11.5, people who use GPT-6 Luna through a ChatGPT/Codex subscription get "does not support chat" on every turn, from `openclaw infer model run --local` and from the Gateway, before any request is sent. Other OpenAI models on the same route still work.

## User Impact

User impact: `openai/gpt-6-luna` runs again on the ChatGPT/Codex subscription route, as it did on 2026.11.3. Models whose catalog says they cannot chat stay refused with the same message, and Luna's Decision settings stay tied to the OpenAI Platform route.

## Why This Change Was Made

2026.11.5 gave the bundled Luna row both chat and Decision capability (openclaw#176133). When the configured route differs from the catalog route, the catalog overlay drops route-bound facts, but it also replaced Luna's `chat: true` with `chat: false`. The overlay now decides inference once: on a changed route it keeps a veto only when the catalog row says `chat: false`, and otherwise drops the whole route-bound declaration, Decision facts included, so the model is treated as chat like the other OpenAI rows on that route.

Two changes on top of @MertBasar0's commit:
- The provider-config merge (`mergeProviderModels`) is left as on main. There a decision-bearing row is a discovered per-route grant, such as ClawRouter's granted Luna, and openclaw#186596 deliberately keeps vetoing it on another route because ClawRouter's catalog declares Luna typed-only (docs/providers/clawrouter.md). With the merge change, `utility-completion.clawrouter.test.ts` fails: the refreshed catalog lets typed-only ClawRouter Luna chat on a changed configured route.
- With only the veto dropped, an API-only route change (which skips `clearRouteBoundCatalogMetadata`) let Luna's Decision facts ride along to the new route. The overlay now strips base inference and sets it once.

Codex agrees on the subscription route: its backend `/models` metadata (`codex-rs/protocol/src/openai_models.rs:419-421`, `ModelInfo`) and `model/list` (`codex-rs/app-server/src/models.rs:16`, `model_from_preset`) carry no chat-or-Decision capability split, and `gpt-6-luna` is listed like any other agent model (`codex-rs/models-manager/models.json:1045`, `visibility: "list"`, `shell_type: "shell_command"`).

Thanks @Caitoz for the report and the precise analysis, and @MertBasar0 for the fix this builds on.

## Evidence

Real built CLI and Gateway with the issue's config verbatim (`openai-chatgpt-responses`, `https://chatgpt.com/backend-api/codex`, `auth: oauth`, `agentRuntime: openclaw`), a fixture ChatGPT OAuth profile and a local ChatGPT-backend fixture; the real bundled Codex app-server uses the same fixture. No real account.

- Before (main 07aa1df; also v2026.11.5): `infer model run --local` fails with "This model doesn't support chat; pick another model." (2026.11.5: "Model openai/gpt-6-luna does not support chat inference"); Gateway `models.list` hides Luna and `chat.send` gets the same refusal. The fixture receives no model request.
- After (this PR): `infer model run --local` returns `FIXTURE-ACK`; Gateway lists Luna and `chat.send` answers `FIXTURE-ACK`; the fixture logs `POST /backend-api/codex/responses model gpt-6-luna`.
- Controls, same before and after: typed-only `clawrouter/openai/gpt-6-luna` granted chat on ClawRouter's endpoint but configured on another route is still refused with the existing message and sends nothing; Luna on its own Platform catalog route reaches the provider; Luna on the native Codex runtime answers through Codex.
- Regression: one case in `model-catalog-inference.test.ts` (a `chat: true` + Decision row on a new endpoint or API keeps no inference). On main both routes fail with `expected { chat: false } to be undefined`; on the contributor commit alone the API route fails with `expected { chat: true, decision: … } to be undefined`.

Observed proof lines: openclaw#201746 (comment)

Merge danger: two-way door. Only in-memory catalog metadata changes; nothing is written or migrated, and a revert restores the old behavior. Blast radius: models whose bundled catalog row declares `chat: true` together with Decision facts, used on a non-catalog route; today that is only `openai/gpt-6-luna`.

Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 24, 2026
#201746)

Root cause: src/agents/model-catalog-metadata.ts:127 (and :57 in `clearRouteBoundCatalogMetadata`) on main fd4807a turned any declared `inference` into `{ chat: false }` when the configured route differs from the catalog route, so GPT-6 Luna's `{ chat: true, decision }` catalog row became a chat veto on the ChatGPT/Codex subscription route.

Fixes #201513

## What Problem This Solves

Since 2026.11.5, people who use GPT-6 Luna through a ChatGPT/Codex subscription get "does not support chat" on every turn, from `openclaw infer model run --local` and from the Gateway, before any request is sent. Other OpenAI models on the same route still work.

## User Impact

User impact: `openai/gpt-6-luna` runs again on the ChatGPT/Codex subscription route, as it did on 2026.11.3. Models whose catalog says they cannot chat stay refused with the same message, and Luna's Decision settings stay tied to the OpenAI Platform route.

## Why This Change Was Made

2026.11.5 gave the bundled Luna row both chat and Decision capability (#176133). When the configured route differs from the catalog route, the catalog overlay drops route-bound facts, but it also replaced Luna's `chat: true` with `chat: false`. The overlay now decides inference once: on a changed route it keeps a veto only when the catalog row says `chat: false`, and otherwise drops the whole route-bound declaration, Decision facts included, so the model is treated as chat like the other OpenAI rows on that route.

Two changes on top of @MertBasar0's commit:
- The provider-config merge (`mergeProviderModels`) is left as on main. There a decision-bearing row is a discovered per-route grant, such as ClawRouter's granted Luna, and #186596 deliberately keeps vetoing it on another route because ClawRouter's catalog declares Luna typed-only (docs/providers/clawrouter.md). With the merge change, `utility-completion.clawrouter.test.ts` fails: the refreshed catalog lets typed-only ClawRouter Luna chat on a changed configured route.
- With only the veto dropped, an API-only route change (which skips `clearRouteBoundCatalogMetadata`) let Luna's Decision facts ride along to the new route. The overlay now strips base inference and sets it once.

Codex agrees on the subscription route: its backend `/models` metadata (`codex-rs/protocol/src/openai_models.rs:419-421`, `ModelInfo`) and `model/list` (`codex-rs/app-server/src/models.rs:16`, `model_from_preset`) carry no chat-or-Decision capability split, and `gpt-6-luna` is listed like any other agent model (`codex-rs/models-manager/models.json:1045`, `visibility: "list"`, `shell_type: "shell_command"`).

Thanks @Caitoz for the report and the precise analysis, and @MertBasar0 for the fix this builds on.

## Evidence

Real built CLI and Gateway with the issue's config verbatim (`openai-chatgpt-responses`, `https://chatgpt.com/backend-api/codex`, `auth: oauth`, `agentRuntime: openclaw`), a fixture ChatGPT OAuth profile and a local ChatGPT-backend fixture; the real bundled Codex app-server uses the same fixture. No real account.

- Before (main fd4807a; also v2026.11.5): `infer model run --local` fails with "This model doesn't support chat; pick another model." (2026.11.5: "Model openai/gpt-6-luna does not support chat inference"); Gateway `models.list` hides Luna and `chat.send` gets the same refusal. The fixture receives no model request.
- After (this PR): `infer model run --local` returns `FIXTURE-ACK`; Gateway lists Luna and `chat.send` answers `FIXTURE-ACK`; the fixture logs `POST /backend-api/codex/responses model gpt-6-luna`.
- Controls, same before and after: typed-only `clawrouter/openai/gpt-6-luna` granted chat on ClawRouter's endpoint but configured on another route is still refused with the existing message and sends nothing; Luna on its own Platform catalog route reaches the provider; Luna on the native Codex runtime answers through Codex.
- Regression: one case in `model-catalog-inference.test.ts` (a `chat: true` + Decision row on a new endpoint or API keeps no inference). On main both routes fail with `expected { chat: false } to be undefined`; on the contributor commit alone the API route fails with `expected { chat: true, decision: … } to be undefined`.

Observed proof lines: #201746 (comment)

Merge danger: two-way door. Only in-memory catalog metadata changes; nothing is written or migrated, and a revert restores the old behavior. Blast radius: models whose bundled catalog row declares `chat: true` together with Decision facts, used on a non-catalog route; today that is only `openai/gpt-6-luna`.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 39a215a)

Companion disposition: bundled dual chat/Decision row and catalog overlay/matching contracts are present-equivalent. Codex d32063f96c models-manager/models.json:700 and app-server/src/models.rs:16 confirm the subscription route exposes Luna as a normal model; no Codex fork changes needed. No later same-path or PR follow-ups.

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: openai/gpt-6-luna rejected with "does not support chat inference" on the ChatGPT/Codex subscription route since 2026.11.5

2 participants