mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
parent
766c617e83
commit
1b56d0d1a2
2 changed files with 13 additions and 0 deletions
|
|
@ -19,6 +19,12 @@ import pytest
|
|||
from hermes_cli import model_switch
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _disable_live_custom_provider_model_probe(monkeypatch):
|
||||
"""Keep custom-provider picker fixtures independent of local model servers."""
|
||||
monkeypatch.setattr("hermes_cli.models.fetch_api_models", lambda *_a, **_kw: None)
|
||||
|
||||
|
||||
def _make_provider(slug, name=None, models=None, *, is_current=False,
|
||||
is_user_defined=False, source="built-in", api_url=None):
|
||||
"""Build a dict shaped like ``list_authenticated_providers`` output."""
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ only looked at `providers:`.
|
|||
"""
|
||||
|
||||
import hermes_cli.providers as providers_mod
|
||||
import pytest
|
||||
from hermes_cli.model_switch import list_authenticated_providers, switch_model
|
||||
from hermes_cli.providers import resolve_provider_full
|
||||
|
||||
|
|
@ -18,6 +19,12 @@ _MOCK_VALIDATION = {
|
|||
}
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _disable_live_custom_provider_model_probe(monkeypatch):
|
||||
"""Keep custom-provider picker fixtures independent of local model servers."""
|
||||
monkeypatch.setattr("hermes_cli.models.fetch_api_models", lambda *_a, **_kw: None)
|
||||
|
||||
|
||||
def test_list_authenticated_providers_includes_custom_providers(monkeypatch):
|
||||
"""No-args /model menus should include saved custom_providers entries."""
|
||||
monkeypatch.setattr("agent.models_dev.fetch_models_dev", lambda: {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue