Skip to content

fix(model-picker): deduplicate providers across user-config and custom sections#12321

Closed
kagura-agent wants to merge 1 commit into
NousResearch:mainfrom
kagura-agent:fix/duplicate-provider-slugs
Closed

fix(model-picker): deduplicate providers across user-config and custom sections#12321
kagura-agent wants to merge 1 commit into
NousResearch:mainfrom
kagura-agent:fix/duplicate-provider-slugs

Conversation

@kagura-agent

Copy link
Copy Markdown
Contributor

Fixes #12293

Problem: Custom provider slugs appeared twice in the /model picker because:

  1. Section 3 (user-config providers) never added endpoints to seen_slugs, making them invisible to later dedup checks
  2. Section 4 (built-in registry) only checked custom:-prefixed slugs against seen_slugs, missing plain slug matches

Fix:

  • Add seen_slugs.add(ep_name.lower()) after appending user-config providers in Section 3
  • In Section 4, also check slug.removeprefix('custom:') against seen_slugs before adding

Tests: Added test covering the dedup behavior.

@mxnstrexgl

Copy link
Copy Markdown

✓ Automated scan: no security concerns. Provider dedup fix.

…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>
@kagura-agent

Copy link
Copy Markdown
Contributor Author

Closing — the production fix has been incorporated into upstream main via #9210. The deduplication logic is already in place. Thanks for considering!

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #13154 — same dedup fix for custom providers in model_switch.py, already merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Duplicate custom providers not filtered — slug mismatch between custom_provider_slug() and seen_slugs

3 participants