From c1977146ce763e0a5d01df9e4f2adeb09f1dd466 Mon Sep 17 00:00:00 2001 From: Teknium Date: Mon, 20 Apr 2026 12:06:08 -0700 Subject: [PATCH] fix(model_switch): register custom: slug in seen_slugs for Section 3 providers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Section 3 (user-defined endpoints) added the plain ep_name to seen_slugs but not the custom:-prefixed slug. Section 4 generates custom: via custom_provider_slug() and checks seen_slugs — since the prefixed slug was missing, the same provider appeared twice in /model. Register custom_provider_slug(display_name).lower() in seen_slugs after Section 3 emits a provider, so Section 4's dedup correctly suppresses the duplicate. Closes #12293. Co-authored-by: bennytimz --- hermes_cli/model_switch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hermes_cli/model_switch.py b/hermes_cli/model_switch.py index f5dcbc49da..22721f9a42 100644 --- a/hermes_cli/model_switch.py +++ b/hermes_cli/model_switch.py @@ -1095,6 +1095,7 @@ def list_authenticated_providers( "api_url": api_url, }) seen_slugs.add(ep_name.lower()) + seen_slugs.add(custom_provider_slug(display_name).lower()) _pair = ( str(display_name).strip().lower(), str(api_url).strip().rstrip("/").lower(),