Repository navigation
fix(models): drop the fuzzy tier from the models.dev lookup - #486
Merged
Merged
Conversation
The catalogue lookup ended with a Levenshtein match on separator-stripped
tokens. One-edit tolerance is wrong for model ids, where a single character
carries meaning: "qwen3.8" normalizes to "qwen38", one edit from
"qwen38b", so a custom-provider model was renamed to "Qwen 3 8B" and
inherited that model's context window and capability flags.
Keep exact, prefixed and separator-insensitive matching ("qwen3:8b" still
resolves to "qwen3-8b"); require equality after normalization.
Contributor
Greptile SummaryRemoves edit-distance matching from the models.dev catalogue lookup so near-miss model identifiers cannot silently inherit another model’s label, context window, or capabilities.
Confidence Score: 5/5The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issues identified. The lookup now requires exact or separator-normalized equality, preventing near-miss identifiers from inheriting incorrect catalogue metadata while preserving the documented valid matching paths. Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/drop-fuzzy-..." | Re-trigger Greptile |
Leo310
added a commit
that referenced
this pull request
Sep 14, 2026
Stability release for the Obsidian 1.13 installer (Electron 43 / Node 24): the renderer crash on the first chat send (#492) and the transport connection error (#501), plus the streaming render coalescing (#484), the checkpoint callbacks strip (#483), and the indexing fixes since 2.1.0 (#486, #487, #490, #491, #493, #495, #497, #498, #499, #500). Co-Authored-By: Claude <noreply@anthropic.com>
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.
Fixes #480.
Problem
Model labels, context windows and capability flags come from a models.dev catalogue lookup (
lookupModelInfoSync). Its last tier was a Levenshtein match over separator-stripped tokens (distance ≤ 2). One-edit tolerance is wrong for model ids, where a single character carries meaning:qwen3.8normalizes toqwen38, one edit from the catalogue'sqwen38b, so a custom-provider model was renamed to "Qwen 3 8B" and silently inherited that model's context window and vision/tool/reasoning flags. The existing digit-sequence guard was already patching one instance of this; a size suffix is the same class of problem and can't be special-cased exhaustively.Reproduced against the live catalogue with a custom provider id:
qwen3.8qwen3:8bclaude-sonet-4-5(typo)Change
qwen3:8b/Qwen3-8B/qwen/qwen3-8bstill resolve to the same entry.qwen3.8regression case.Not disabling the lookup for custom providers: OpenAI-compatible endpoints (Groq, Together, SAP AI Core) get correct metadata from exact and normalized matches, and the cross-provider precedence tests cover exactly that.
Checks
bun run check,bun run format,bun run lint,bun run test(1675 passed).AI assistance: written with AI coding agents from the maintainer's brief; reviewed and tested by the maintainer.