fix: allow adding model names that differ only by case in multi-select#6061
Merged
Conversation
Contributor
WalkthroughThe multi-select component now matches typed input against existing option values and labels using case-sensitive comparisons, allowing differently cased entries to remain distinct. ChangesMulti-select matching
Estimated code review effort: 2 (Simple) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
lansine
pushed a commit
to evin-pubb/new-api-fork
that referenced
this pull request
Jul 14, 2026
QuantumNous#6061) Merge pull request QuantumNous#6061 from feitianbubu/pr/c33b40b70
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.
📝 变更描述 / Description
渠道编辑页的模型多选框里,输入
DeepSeek-V3时如果系统已有小写的deepseek-v3,"添加自定义模型"选项不会出现,按回车只能选中小写模型,大写模型名无法录入(上游只认大写时渠道就配不了)。原因是
multi-select.tsx里判断"输入是否已存在"用了toLowerCase()忽略大小写。改为精确匹配后,仅大小写不同的模型名也能正常录入;输入与已有选项完全一致时行为不变。🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
修复前:

修复后:
