refactor(shared): unify fuzzyMatchModel into model-name-matcher.ts#1855
Open
iyoda wants to merge 2 commits intocode-yeongyu:devfrom
Open
refactor(shared): unify fuzzyMatchModel into model-name-matcher.ts#1855iyoda wants to merge 2 commits intocode-yeongyu:devfrom
iyoda wants to merge 2 commits intocode-yeongyu:devfrom
Conversation
This was referenced Feb 15, 2026
There was a problem hiding this comment.
No issues found across 35 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Reviewed by cubic with no issues found; changes are mostly refactors and dependency updates with no regressions.
0223b7d to
0e9708b
Compare
Collaborator
|
@iyoda Thanks for the refactor! This looks clean and cubic has approved it. However, there are merge conflicts that need to be resolved before we can merge. Could you rebase onto the latest dev branch? |
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Make model-name-matcher.ts the canonical source for fuzzyMatchModel and normalizeModelName - Export normalizeModelName from model-name-matcher.ts (was internal) - Remove duplicate implementations from model-availability.ts - Add re-exports in model-availability.ts for backward compatibility - All existing consumers continue to work via their import paths - Tests pass, typecheck clean, build succeeds
0e9708b to
4b20cee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make
src/shared/model-name-matcher.tsthe single canonical source forfuzzyMatchModelandnormalizeModelName, removing duplicate implementations frommodel-availability.ts.Changes
src/shared/model-name-matcher.ts— now exportsnormalizeModelName(was internal)fuzzyMatchModelandnormalizeModelNamefromsrc/shared/model-availability.ts(-98 lines)model-availability.tsfor backward compatibility — existing consumers don't need import changesNet: -95 lines removed
Verification
bun run typecheck✅bun test✅ (2693 pass, 0 fail)bun run build✅PR Stack
This is PR 4 of 9 in the code deduplication refactor series. Depends on #1854.
Summary by cubic
Unifies model name matching into src/shared/model-name-matcher.ts and consolidates formatDuration into a single source to remove duplicates. Keeps imports working via re-exports and updated paths.
Written for commit 4b20cee. Summary will update on new commits.