Repository navigation
refactor(agents): unify configured model assembly - #178309
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs changes before merge. What this changesThis PR routes configured-only models through the existing configured-override owner and deletes the separate fallback constructor. Example: Resolve xiaomi/mimo-v2.5-pro without an authored output cap.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this is a useful maintainer-directed consolidation with one concrete assertion-ratchet blocker. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherModel resolution combines configured rows, catalog metadata, provider transport, and request policy into the runtime model consumed by agent execution and prepared aliases. flowchart TD
A[Model configuration] --> D[Configured override owner]
B[Registry and catalog metadata] --> D
C[Provider transport and request policy] --> D
D --> E[Runtime model normalization]
E --> F[Agent execution]
E --> G[Prepared model aliases]
Technical reviewBest possible solution: Keep the single assembly owner, repair its assertion accounting without expanding allowances, and preserve the existing routing, pricing, and unknown-cap contracts. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the assertion-ratchet violation directly; no target code or tests were executed during this read-only review. Is this the best way to solve the issue? Extending the existing override owner is the smallest coherent consolidation, and the migrated tests retain distinct pricing and fallback contracts. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a3267d4b57e8. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -179, Tests 0. Total -179 across 7 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 20, 2026, 5:44 AM ET / 09:44 UTC. |
|
Merged via squash.
|
* refactor(agents): unify configured model assembly * chore(agents): reconcile model assertion safety accounting
What Problem This Solves
Configured-only model resolution duplicates the route, request, pricing, capability, and token-limit assembly already used for discovered models.
User Impact
No user-visible change is intended. Existing model configuration, provider routes, plugin hooks, suppression, credential authority, and unknown-output-cap behavior remain supported. No configuration, protocol, dependency, persisted-shape, or public SDK change.
Why This Change Was Made
Let the existing configured-override owner handle an absent discovered model explicitly. Keep the genuine optional catalog donor separate rather than fabricating a model that can accidentally authorize its own route. Three production callers now use the existing normalization operation; delete the parallel constructor and its orphan parameter-merge wrapper.
Retain authored source pricing, model/provider/manifest/catalog route precedence, headers and request facts, input/media/reasoning, same-route compatibility and parameter counts, context provenance, output-cap omission/clamping/provenance, and final runtime normalization. The no-op discovered branch still exists, but prepares its passthrough request only when used.
Best-effort tradeoffs accepted
Evidence
Net production: 179 lines removed (+107/-286); completed-owner residue under the campaign's 100-line rule, not a LARGE PR. Test delta +4/-4 consists only of migrating existing constructor calls/imports; no assertion, timeout, retry, or skip is weakened.
--maxWorkers=1. The wrapper took 918 seconds including cold compiler/import work on the shared host; no speedup claim. This source remained unchanged throughout the run. The only subsequent change deletes a wrapper with no remaining reference; behavioral proof is reused for that unreachable deletion.Local proof uses
nice -n 10and isolated HOME/OpenClaw/XDG/TMP state. No live-provider, throughput, or whole-product E2E claim. The standalone Phase E session memory backend is untouched.