Fix/remove redundant model suffix - #17467
Open
jay77721 wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
📝 WalkthroughWalkthrough
ChangesModel name parsing
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
jay77721
marked this pull request as draft
July 28, 2026 11:17
jay77721
marked this pull request as ready for review
July 28, 2026 11:17
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
LongCat model names were getting a redundant
@OwnedBysuffix appended, producingLongCat-2.0@LongCat. Root cause:ParseListModelunconditionally appended@OwnedBywheneverowned_bywas non-empty, but LongCat's model ID (LongCat-2.0) already contains the provider name (LongCat), making the suffix duplicate.Changes:
• internal/entity/models/base_model.go: added a
strings.Containsguard before appending@OwnedBy— when the model name already contains theowned_byvalue, the suffix is skipped. Existing behavior for Gitee/Google/FunASR/VolcEngine is unaffected (none of their model names contain the correspondingowned_byvalue).Verification:
• bash build.sh --test ./internal/entity/models/ — ok (no test changes needed)