Repository navigation
fix(models): keep catalog capabilities with their routes - #144180
Conversation
Use the shared catalog overlay for configured selection metadata while keeping captured API and endpoint fields for final route projection. Discard stale capabilities and prepared thinking policy on known route changes, and carry explicit configured thinking-level maps. Preserve literal identity, aliases, names, explicit booleans, same-route compatibility, and final rejection of donors with missing transport. Validation: 355 focused tests, original-source 5-fail/7-control regression proof, complete changed gate, full docs checks, and fresh P2 review.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 12:30 PM ET / 16:30 UTC. ClawSweeper reviewWhat this changesModel selection reuses the shared catalog merger to clear capabilities from changed routes, retain original transport metadata, and apply configured thinking-level maps. Merge readiness✅ Ready for maintainer review This focused fix remains necessary on current main. The shared overlay preserves donor-route identity and removes stale capabilities without changing configuration or plugin contracts; no blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe model catalog combines discovered capabilities with configured model settings. Selection and route projection use those rows to supply model controls and runtime metadata. flowchart TD
A[Discovered model capabilities] --> C[Shared catalog overlay]
B[Configured model settings] --> C
C --> D{API or endpoint changed?}
D -->|Yes| E[Clear previous route capabilities]
D -->|No| F[Retain compatible capabilities]
E --> G[Select matching route donor]
F --> G
G --> H[Model controls and runtime metadata]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -8, Tests +292, Docs +2. Total +286 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep capability merging in the shared overlay and preserve physical donor identity until final route projection. Do we have a high-confidence way to reproduce the issue? Yes, from source: configure a different API or endpoint for a captured row and omit its capabilities, or supply an explicit thinking map; current main's selection merger retains stale fields or omits the map. Execution was not performed in this read-only review. Is this the best way to solve the issue? Yes. Reusing the existing route-aware overlay removes the competing merger while preserving same-route precedence and missing-field donor rejection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fa90e3893a0e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Use the shared catalog overlay for configured selection metadata while keeping captured API and endpoint fields for final route projection. Discard stale capabilities and prepared thinking policy on known route changes, and carry explicit configured thinking-level maps. Preserve literal identity, aliases, names, explicit booleans, same-route compatibility, and final rejection of donors with missing transport. Validation: 355 focused tests, original-source 5-fail/7-control regression proof, complete changed gate, full docs checks, and fresh P2 review.
Related: #130706, #142100.
What Problem This Solves
The model-selection catalog duplicated the shared metadata merger. When a configured API or endpoint changed, that copy could retain capabilities and a prepared thinking policy from the previous route. It also failed to apply an explicit thinking-level map.
Why This Change Was Made
Use the existing catalog overlay owner, including its route-change checks, and clear the old thinking-policy fields with the other route-bound metadata. Keep the captured catalog row's original transport until final route projection. That preserves rejection of incompatible donors, including rows missing an API or endpoint.
This removes eight production lines across two files. The documentation describes the resulting route and thinking-map behavior. Configuration, storage, and plugin APIs are unchanged.
User Impact
Model selection no longer carries the previous route's capabilities and thinking policy across a configured route change. Explicit thinking maps are retained. Compatible routes keep their existing capability and compatibility precedence.
Evidence
f1bc414c6ab7bcd8da7546fe75a22ce2be3d7a98passed, including SDK declarations. All twelve cases passed through the emitted production exports. The source-import rejection control also passed.An earlier attempt copied configured transport onto the captured row and allowed missing-field rows to become false capability donors. That candidate was rejected. The current change preserves the captured transport and tests the final selected projection, including property omissions. It does not add a source-binding layer or claim to repair retained-source attribution across configuration generations.