mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(model_switch): register custom: slug in seen_slugs for Section 3 providers
Section 3 (user-defined endpoints) added the plain ep_name to seen_slugs but not the custom:-prefixed slug. Section 4 generates custom:<name> 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 <bennytimz@users.noreply.github.com>
This commit is contained in:
parent
89070b8f9f
commit
c1977146ce
1 changed files with 1 additions and 0 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue