Repository navigation
fix(models): preserve captured routes in configured catalog views - #143643
Conversation
|
🦞👀 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, 1:37 AM ET / 05:37 UTC (Revision 4). ClawSweeper reviewWhat this changesPreserves captured model endpoints and API types in configured catalog views while honoring explicit model settings and provider-default fallbacks. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main and the latest release still lose captured routes when composing configured rows. The prior exact-identity finding is resolved, and no blocking defect remains in the reviewed patch. Priority: P2 Review scores
Verification
How this fits togetherThe model catalog combines configured models with captured provider inventory. Startup and visibility policies use that catalog to supply model lists and route metadata to clients. flowchart TD
A[Configured models] --> C[Configured catalog composer]
B[Captured provider inventory] --> C
C --> D[Model pin then exact captured route then default]
D --> E[Prepared catalog]
E --> F[Visibility and route projection]
F --> G[Client model lists]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +12, Tests +136. Total +148 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use one exact-identity route-precedence rule across catalog composition and visibility while preserving explicit pins, replace mode, and configuration-only SDK behavior. Do we have a high-confidence way to reproduce the issue? Yes: current-main configuration-only overlays replace a differing captured route with provider defaults; the body also records a real Gateway baseline showing incorrect locality. This review established the path from source without executing it. Is this the best way to solve the issue? Yes: the patch repairs the shared producer, preserves configuration-only callers, and reuses prepared visibility facts; exact matching and replace-mode coverage address the relevant compatibility boundaries. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0153d84c02af. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
Thanks @obviyus! Proof: Ordinary Gateway startup and authenticated
This lands the configured-route contribution to #136257, not the remaining registry/native/auth work or whole original-area closure. No live-provider inference claim is made. |
…w#143643) Preserve the exact captured model route below explicit model pins and above provider defaults. Reuse the configured policy across catalog, startup and visibility consumers. Keep case-distinct identities, first physical donors, configured metadata, replace/empty-refresh behavior and config-only SDK compatibility. Index captured identities once per composition. Verified with baseline regressions, 91 focused checks, ordinary Gateway public proof, scoped independent acceptance and exact-head CI. Public proof uses the matching CI merge build; prior failures and acceptance limits remain documented in the PR. Related: openclaw#136257 Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #136257.
What Problem This Solves
Configured model listings could show provider-default routing even when the captured catalog retained a different route, such as reporting a local endpoint as remote.
Why This Change Was Made
Configured composition now prefers an explicit model route, then the captured route for the exact model identity, then provider defaults. Startup and visibility use that same decision. A per-call identity index removes repeated scans without introducing a persistent cache.
User Impact
Listings retain captured routes while respecting explicit settings and case-distinct identities. Configuration-only callers retain provider defaults when no captured catalog is supplied. No credential, schema, protocol, or operator-option change is introduced.
Consumers: configured catalog composition, startup publication, and visibility now share captured-route selection.
Evidence
The original Gateway returned incorrect locality in all three catalog views. Twelve authenticated candidate responses across four route scenarios retained the expected locality and metadata. Source regressions passed, including the case-distinct identity control. A producer benchmark improved from 1,963 to 35 ms at 400 rows; this is not end-to-end latency. Continuous integration passed its 400-model, 11-agent case with no upstream requests. Passive-read checks preserved saved configuration and catalog bytes. Inference and live account sign-in were not tested.