Skip to content

fix(agents): subagent spawn rejects configured ClawRouter models as not chat-capable - #186596

Merged
jalehman merged 2 commits into
mainfrom
openclaw-9382/subagent-clawrouter-chat-inference
Oct 28, 2026
Merged

jalehman merged 2 commits into
mainfrom
openclaw-9382/subagent-clawrouter-chat-inference

Conversation

@jalehman

@jalehman jalehman commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: sessions_spawn rejects configured ClawRouter models with "Model clawrouter/ does not support chat inference". This happens even when the same model runs fine as the main session model.

User Impact

Subagents can spawn on configured ClawRouter models again, for example clawrouter/anthropic/claude-opus-5-5 and clawrouter/openai/gpt-6.1-sol. This works whether the model is passed as an override or inherited from the parent session. These rows also reappear in model lists that hide chat-incapable entries.

Known limit: a typed-only row such as clawrouter/openai/gpt-6-luna, configured on the bare service root, is still refused for chat. This is unchanged and is the conservative behavior.

Why This Change Was Made

ClawRouter discovery marks each granted row inference: { chat: true } on its own endpoint, such as …/v1 or …/v1/native/anthropic. Configured rows usually take the provider's root baseUrl, so the merge saw a route change. On a route change, mergeProviderModels replaced the discovered grant with an explicit { chat: false } veto. ClawRouter then moves those rows back onto the granted route at runtime, but the veto stayed on them.

Main turns never check inference.chat. Spawn admission does, which is why only subagents failed.

After this change, a plain chat grant on a different route becomes unknown, just as if discovery had not matched the row. A row that was never vetoed is now accepted. Typed or non-chat inference, such as decision-capable rows, still becomes { chat: false } on a route change. Typed routes therefore never turn into legacy chat. Explicitly configured inference still wins.

Evidence

  • The regression lives in the existing ClawRouter grant test, utility-completion.clawrouter.test.ts. It runs the real bundled plugin, credential-scoped discovery, the configured-row merge, the registry and the prepared catalog, with only HTTP faked. A new case configures the provider on the service root (https://clawrouter.openclaw.ai) and adds a plain chat row (GPT-6.1 Sol):
    • the chat row is admitted on both the captured and the refreshed catalog;
    • typed-only Luna is still refused on that route, and grants still do not leak across credentials or routes.
    • Against main's merge code the new case fails with "does not support chat inference"; with the fix it passes.
  • The coverage was folded into the existing test so the test-lines ratchet stays green (net change −1 test line against current main).
  • Targeted suites pass: utility-completion.clawrouter, models-config.merge, model-runtime-choice, and extensions/clawrouter; pnpm tsgo:core:test and oxlint on the changed files are clean.
  • Reproduced against a live ClawRouter catalog with a minimal config: provider baseUrl: https://clawrouter.openclaw.ai, configured Opus 5.5, GPT-6.1 Sol and GPT-6 Astra rows.
    • Before: each prepared model choice returned "does not support chat inference".
    • After: all three resolve.
  • pnpm check:changed: typecheck and lint pass for the changed files. The dead-export scan was skipped because it currently flags unrelated exports on main.

@clawsweeper

clawsweeper Bot commented Oct 28, 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.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M labels Oct 28, 2026
@jalehman
jalehman enabled auto-merge (squash) October 28, 2026 06:50
@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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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 Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR stops converting plain discovered chat grants into chat vetoes when configured model routes differ.

Example: Spawn a subagent using clawrouter/openai/gpt-6.1-sol configured with baseUrl https://clawrouter.openclaw.ai.

  • Before: Discovery supplies a /v1 route, and merging the configured service root produces chat:false, rejecting spawn preparation.
  • After: The plain grant becomes unspecified instead of false, allowing the configured model through spawn preparation.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, minimal production repair with meaningful integration coverage, a confirmed test-line gate failure, and an outstanding retained-catalog compatibility gate.
Proof confidence 🦐 gold shrimp (3/6) The supplied maintainer-authored classification exempts ordinary real-behavior proof. Available evidence reaches spawn planning with mocked HTTP and a substituted prepared-catalog owner; the reported live-catalog check reaches model-choice resolution. Compatibility of retained generated catalogs across the latest-stable upgrade remains unproven.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Subagent spawning rejects configured ClawRouter chat models that work for main-session turns.
Reason: The authorized direction restores an existing workflow without new settings, routing machinery, or changes to typed-only model eligibility.

Regression provenance

Regression provenance — verified: source commit cb3bb04f96ac by RoboClaw; canonical PR #183779 (blame-to-merge-commit).

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: this PR fixes a source-confirmed subagent admission bug still present on main, but its added tests trigger the test-line ratchet.

Priority: P2
Reviewed head: 884fd03e519b545bc126d21ea97f1f98515970e6

Before merge

  • Consolidate the added regressions to pass the test-line ratchet (P2) - The new suite and merge table add 246 test lines. In the verified synthetic merge, the tree exceeds its test-line ceiling, and check-test-lines-ratchet rejects positive test-line growth even when the base already exceeds that ceiling. Exact-head CI confirms test-lines failed. Consolidate this coverage with the existing ClawRouter/catalog tests while retaining the spawn regression and typed-route negative controls, rather than raising the ceiling or weakening assertions.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P2] Consolidate the added regressions to pass the test-line ratchet — src/agents/subagents/spawn/subagent-spawn-plan.clawrouter.test.ts:1-2

Tests

  • Missing end-to-end proof: The PR owner should demonstrate fresh setup and an upgrade from v2026.10.8 with retained catalogs and settings, followed by refresh and successful subagent use; redact credentials and private endpoints.
Agent review details

How this fits together

Provider discovery and authored configuration enter the shared model merge; its metadata feeds model registries and prepared catalogs used by subagent admission before runtime transport resolution.

flowchart LR
  A[Credential scoped discovery] --> C[Shared provider merge]
  B[Authored model configuration] --> C
  C --> D[Model registry]
  D --> E[Prepared model catalog]
  E --> F[Subagent admission]
  F --> G[ClawRouter runtime resolution]
Loading

Technical review

Best possible solution:

Keep the focused shared-merge repair and consolidate its regressions into the existing ClawRouter coverage so the test-line gate passes.

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

Source inspection connects credential-scoped discovery's chat:true metadata to the off-route merge veto and the resolver's chat:false rejection; the PR reports a before-failing regression, but no target code was executed during this review.

Is this the best way to solve the issue?

The production change is the smallest focused repair in the existing merge owner: it restores unknown legacy-chat semantics for plain grants while preserving explicit configuration and typed-route rejection.

Full review comments:

  • [P2] Consolidate the added regressions to pass the test-line ratchet — src/agents/subagents/spawn/subagent-spawn-plan.clawrouter.test.ts:1-2
    The new suite and merge table add 246 test lines. In the verified synthetic merge, the tree exceeds its test-line ceiling, and check-test-lines-ratchet rejects positive test-line growth even when the base already exceeds that ceiling. Exact-head CI confirms test-lines failed. Consolidate this coverage with the existing ClawRouter/catalog tests while retaining the spawn regression and typed-route negative controls, rather than raising the ceiling or weakening assertions.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm check:test-lines-ratchet --base c14ee71 --no-merge-base
  • pnpm test src/agents/models-config.merge.test.ts src/agents/utility-completion.clawrouter.test.ts src/agents/subagents/spawn/subagent-spawn-plan.clawrouter.test.ts
  • pnpm check:changed
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 5808b72 adds src/agents/models-config.merge.ts:108 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5808b72ed614; files: src/agents/models-config.merge.ts)
  • Ayaan Zaidi: Raw commit 78373d4 adds src/agents/models-config.merge.ts:213 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 78373d43f621; files: src/agents/models-config.merge.ts)

PR surface

Source +3, Tests +246. Total +249 across 3 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 4 1 +3
Tests 2 246 0 +246
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 250 1 +249

Review metrics

Metric Value Why it matters
Production versus test changes Production +4/-1; tests +246/-0 The production repair is minimal; the integration regression protects discovery-to-spawn composition, but its fixture growth needs consolidation to satisfy the existing ratchet.

Labels

Label changes:

  • add P2: Configured ClawRouter models can be rejected for subagents while ordinary main-session operation remains available.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Configured ClawRouter models can be rejected for subagents while ordinary main-session operation remains available.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

Reviewed October 28, 2026, 2:58 AM ET / 06:58 UTC.

@jalehman
jalehman disabled auto-merge October 28, 2026 07:04
@jalehman
jalehman merged commit 01d66c7 into main Oct 28, 2026
128 of 129 checks passed
@jalehman
jalehman deleted the openclaw-9382/subagent-clawrouter-chat-inference branch October 28, 2026 07:51
@jalehman

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 29, 2026
…ot chat-capable (openclaw#186596)

* fix(agents): allow subagent spawns on configured ClawRouter models

* test(agents): fold ClawRouter route-change regression into existing grant test
obviyus added a commit to MertBasar0/openclaw that referenced this pull request Nov 21, 2026
…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.
obviyus added a commit that referenced this pull request Nov 21, 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]>
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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant