Skip to content

fix: match current provider model aliases to capability scores#78

Merged
0xzr merged 1 commit into
mainfrom
fix/aa-current-provider-aliases
Jul 20, 2026
Merged

fix: match current provider model aliases to capability scores#78
0xzr merged 1 commit into
mainfrom
fix/aa-current-provider-aliases

Conversation

@0xzr

@0xzr 0xzr commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • normalize current Cloudflare, Hugging Face, and NVIDIA vendor-qualified model names
  • ensure GLM-5.2, MiniMax M3, Kimi K2.6, and MiMo V2.5 Pro receive their benchmark capability scores instead of the neutral fallback
  • cover each live catalog form with regression tests

Verification

  • pytest -q tests/test_capability.py
  • pytest -q

Summary by Sourcery

Align model name normalization with current provider-specific aliases so benchmark capabilities apply to the correct models.

Bug Fixes:

  • Map current Cloudflare, Hugging Face, and NVIDIA vendor-qualified model names to their canonical benchmark model names so they receive non-fallback capability scores.

Enhancements:

  • Extend vendor prefix normalization to cover additional provider namespaces such as cf-moonshotai, minimaxai, xiaomimimo, and z-ai.

Tests:

  • Add parametrized regression tests to ensure live catalog model names normalize to the same form as their benchmark counterparts.

@sourcery-ai

sourcery-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR extends model name normalization to recognize current provider-specific vendor aliases so that several Cloudflare, Hugging Face, and NVIDIA catalog entries correctly map to existing benchmark capability scores, and adds regression tests to lock in the normalization behavior.

File-Level Changes

Change Details Files
Extend vendor prefix stripping in model normalization to cover new provider-specific aliases so catalog names map to correct benchmark models.
  • Update the vendor prefix regular expression to include cf-moonshotai, minimaxai, xiaomimimo, and z-ai as recognized vendor prefixes
  • Ensure normalized names for GLM-5.2, MiniMax M3, Kimi K2.6, and MiMo V2.5 Pro align with their benchmark identifiers instead of falling back to neutral scoring
src/freellmpool/capability.py
Add regression tests to verify normalization of current provider catalog names to benchmark model names.
  • Introduce a parametrized test that exercises Cloudflare, Hugging Face, and NVIDIA catalog model identifiers and their intended benchmark equivalents
  • Validate that normalize_model_name returns identical normalized names for each catalog/benchmark pair, preventing future regressions in capability scoring
tests/test_capability.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The growing alternation list in _VENDOR_PREFIX_RE is becoming harder to maintain; consider defining vendor/alias prefixes in a data structure (e.g., a list or mapping) and generating the regex from it so new providers/aliases can be added in a single place.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The growing alternation list in `_VENDOR_PREFIX_RE` is becoming harder to maintain; consider defining vendor/alias prefixes in a data structure (e.g., a list or mapping) and generating the regex from it so new providers/aliases can be added in a single place.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@0xzr
0xzr merged commit c571ca0 into main Jul 20, 2026
8 checks passed
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.

1 participant