fix(model-picker): deduplicate providers across user-config and custom sections#12321
Closed
kagura-agent wants to merge 1 commit into
Closed
fix(model-picker): deduplicate providers across user-config and custom sections#12321kagura-agent wants to merge 1 commit into
kagura-agent wants to merge 1 commit into
Conversation
|
✓ Automated scan: no security concerns. Provider dedup fix. |
3c7009c to
b097178
Compare
…m sections (NousResearch#12293) Section 3 (user_providers) was not adding slugs to seen_slugs, and section 4 (custom_providers) only checked the "custom:"-prefixed slug. This caused duplicate rows when the same provider appeared in both sections. Fix by adding user-config slugs to seen_slugs and checking both prefixed and plain slug forms in the custom_providers loop. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b097178 to
2d07850
Compare
Contributor
Author
|
Closing — the production fix has been incorporated into upstream main via #9210. The deduplication logic is already in place. Thanks for considering! |
Collaborator
|
Likely duplicate of #13154 — same dedup fix for custom providers in model_switch.py, already merged. |
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.
Fixes #12293
Problem: Custom provider slugs appeared twice in the /model picker because:
seen_slugs, making them invisible to later dedup checkscustom:-prefixed slugs againstseen_slugs, missing plain slug matchesFix:
seen_slugs.add(ep_name.lower())after appending user-config providers in Section 3slug.removeprefix('custom:')againstseen_slugsbefore addingTests: Added test covering the dedup behavior.