mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: extract custom_provider_slug() helper, harden gateway test
- Add custom_provider_slug() to hermes_cli/providers.py as the single source of truth for building 'custom:<name>' slugs. - Use it in resolve_custom_provider() and list_authenticated_providers() instead of duplicated inline slug construction. - Add _session_model_overrides and _voice_mode to gateway test runner for object.__new__() safety.
This commit is contained in:
parent
a2f46e4665
commit
568be71003
3 changed files with 16 additions and 4 deletions
|
|
@ -25,6 +25,7 @@ from dataclasses import dataclass
|
|||
from typing import List, NamedTuple, Optional
|
||||
|
||||
from hermes_cli.providers import (
|
||||
custom_provider_slug,
|
||||
determine_api_mode,
|
||||
get_label,
|
||||
is_aggregator,
|
||||
|
|
@ -887,7 +888,7 @@ def list_authenticated_providers(
|
|||
if not display_name or not api_url:
|
||||
continue
|
||||
|
||||
slug = "custom:" + display_name.lower().replace(" ", "-")
|
||||
slug = custom_provider_slug(display_name)
|
||||
if slug in seen_slugs:
|
||||
continue
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue