Repository navigation
fix: use numeric sort for model alias resolution - #96640
mralonsocorona wants to merge 1 commit into
Conversation
|
Thanks for the context here. I did a careful shell check against current Current main already contains the same central fix, with slightly stronger regression coverage, via merged pull request #96609. The latest release still has the old comparator, so this is fixed on main only and this conflicting branch is no longer needed as a landing candidate. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the merged current-main implementation from #96609 and close this conflicting duplicate branch rather than trying to land it separately. Do we have a high-confidence way to reproduce the issue? No as a current-main failure: source inspection shows current main now uses numeric-aware sorting and includes a regression test for the double-digit alias rollover. The pre-fix bug is documented by the linked issue and the merged canonical fix. Is this the best way to solve the issue? Yes. Numeric-aware sorting at the existing Security review: Security review cleared: The PR diff only changes local TypeScript model-id sorting logic and a colocated test, with no dependency, lockfile, CI, secret, publishing, or external code execution surface changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against b95b9e448794; fix evidence: commit 7ae52dc56ecf, main fix timestamp 2026-06-29T01:55:25Z. |
|
The PR evidence has been updated and the Real behavior proof check is now passing. Current status from
The PR is also currently:
It looks like the old Thanks. |
|
@mralonsocorona thanks for the PR. ClawSweeper is still waiting on real behavior proof before this can move forward. Useful proof can be a screenshot, short video, terminal output, copied live output, linked artifact, or redacted logs that show the changed behavior after the fix. Please redact private tokens, phone numbers, private endpoints, customer data, and anything else sensitive. Once proof is added to the PR body or a comment, ClawSweeper or a maintainer can re-check it. |
|
ClawSweeper applied the proposed close for this PR.
|
What Problem This Solves
Fixes alias model resolution for version-like model ids that cross into double-digit minor versions.
Previously,
tryMatchModelsorted candidate model ids with plain lexicographiclocaleCompare, so ids likeclaude-opus-4-9could sort aboveclaude-opus-4-10. This caused partial aliases such asopusto resolve to an older model.This PR updates model candidate sorting to use numeric-aware collation and adds a regression test for the
4-9vs4-10case.Fixes #96588.
Evidence
node scripts/run-vitest.mjs run src/agents/sessions/model-resolver.test.ts→ Test Files 1 passed, Tests 3 passedpnpm exec oxfmt --check --threads=1 src/agents/sessions/model-resolver.ts src/agents/sessions/model-resolver.test.ts→ All matched files use the correct formatparseModelPattern("opus", ...)selectsclaude-opus-4-10overclaude-opus-4-9after the numeric-aware sort fix