Skip to content

Normalize provider model IDs before capability resolution#215

Merged
Aaronontheweb merged 2 commits into
devfrom
claude-wt-model-normalization
Mar 13, 2026
Merged

Normalize provider model IDs before capability resolution#215
Aaronontheweb merged 2 commits into
devfrom
claude-wt-model-normalization

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

Closes #204

  • Enhance ModelIdNormalizer to strip .gguf extensions, GGML quantization suffixes (-Q5_K_M, -IQ2_XXS, -Q4_K_XL), lowercase PascalCase names, and remove trailing build-variant segments (-UD, -BPW4)
  • Add dynamic suffix scan to OpenRouterOracleResolver — when exact lookup misses, scan catalog for entries ending with /{candidate}, eliminating the need to maintain a static prefix map for every model family
  • Update HuggingFaceCapabilityResolver to use ModelIdNormalizer.GetCandidates() instead of ad-hoc Ollama tag stripping
  • Add GetDisplayName() for clean model names in status output (e.g., Qwen3.5-35B-A3B-UD instead of Qwen3.5-35B-A3B-UD-Q4_K_XL.gguf)

Verified locally

Before (stock daemon):

model: Qwen3.5-35B-A3B-UD-Q4_K_XL.gguf (provider: big-gpu-lemonade, context: 32,768 tokens)
  input: Text
  output: Text

After (test build):

model: Qwen3.5-35B-A3B-UD (provider: big-gpu-lemonade, context: 262,144 tokens)
  input: Text, Image, Video
  output: Text

Test plan

  • All 29 normalizer tests pass (7 existing + 22 new)
  • Full test suite: 983 tests, 0 failures
  • dotnet slopwatch analyze: 0 violations
  • Local build tested against live Lemonade endpoint with GGUF model

…y resolution (#204)

Model capability detection relied on exact model ID matches, which broke
for local/runtime-specific identifiers like GGUF filenames, quantized
variants, and Ollama tags. Enhance ModelIdNormalizer with a multi-step
pipeline that strips .gguf extensions, quantization suffixes (-Q5_K_M,
-IQ2_XXS, etc.), lowercases PascalCase names, and removes trailing build
variant segments (-UD, -BPW4).

Add dynamic suffix scan to OpenRouterOracleResolver so unprefixed
candidates match catalog entries without maintaining a static prefix map
for every model family.

Update HuggingFaceCapabilityResolver to use the normalizer instead of
ad-hoc Ollama tag stripping.

Add GetDisplayName() for human-friendly model names in status output,
stripping file-format noise while preserving original casing.
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) March 13, 2026 17:44
@Aaronontheweb Aaronontheweb merged commit b8bac3f into dev Mar 13, 2026
2 of 3 checks passed
@Aaronontheweb Aaronontheweb deleted the claude-wt-model-normalization branch March 13, 2026 17:48
@Aaronontheweb Aaronontheweb mentioned this pull request Mar 13, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize provider model IDs before capability resolution

1 participant