fix(model-normalize): strip base-vendor prefix for regional-variant providers - #17079
Closed
luoshan5261486 wants to merge 1 commit into
Closed
fix(model-normalize): strip base-vendor prefix for regional-variant providers#17079luoshan5261486 wants to merge 1 commit into
luoshan5261486 wants to merge 1 commit into
Conversation
…roviders Fixes #12140 — Regional-variant providers (minimax-cn, kimi-coding-cn) now accept their base vendor's prefix when normalizing model names. Problem: catalog entries like 'minimax/minimax-m2.7' routed through 'provider: minimax-cn' kept the vendor slash intact, causing API 'unknown model' failures that cascaded into memory summarisation collapse and image recognition timeouts. Solution: _REGIONAL_VARIANT_ROOTS maps each regional target to its base vendor; _strip_matching_provider_prefix checks this mapping as a fallback after the primary prefix match fails. Co-authored-by: briandevans <briandevans@users.noreply.github.com> Co-authored-by: laicai <laicai@laicai.io>
Collaborator
Author
|
This PR is a duplicate of #12165 (same fix by Briandevans), open but unmerged for a while. Bug #12140 causes The CI failures shown in the checks are all pre-existing issues on Requesting merge of either this PR or #12165 to unblock the fix. |
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.
Fix #12140 — Regional-variant provider prefix stripping
Problem
Catalog entries like
minimax/minimax-m2.7routed throughprovider: minimax-cnkept the vendor slash intact, causing APIunknown modelfailures. This cascaded into memory summarisation collapse and image recognition timeouts.Solution
_REGIONAL_VARIANT_ROOTSmapping (minimax-cn→minimax,kimi-coding-cn→kimi-coding)_strip_matching_provider_prefixnow checks this mapping as a fallback after primary prefix match failsTesting
All new tests pass. Verified against the exact reporter inputs from #12140.
Related
Base PR: #12140 (Briandevans) — this fork diverges slightly in test structure but implements the same fix.