hermes-agent/tests/tui_gateway
Adalsteinn Helgason 643dc82793 Fix custom provider identity loss in session persistence
_runtime_model_config persisted the live agent's RESOLVED provider into
the session row's model_config JSON. For any named providers:/
custom_providers: entry, agent.provider is the literal string "custom",
so the entry name was lost (and the api_key is deliberately never
persisted). On session.resume or _reset_session_agent the stored
provider="custom" fed resolve_runtime_provider(requested="custom"),
which cannot match a named entry — the rebuild either raised "No LLM
provider configured" or silently resolved placeholder credentials
against the patched-back base_url.

Persist the REQUESTED/entry identity instead: a new reverse lookup
find_custom_provider_identity(base_url) maps the endpoint URL back to
the canonical custom:<name> menu key. _runtime_model_config stores that
key; _make_agent performs the same recovery for rows persisted before
the fix, falling back to passing the stored base_url as
explicit_base_url so the direct-alias branch still targets the
session's endpoint when no entry matches.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 05:51:05 -07:00
..
__init__.py
test_custom_provider_session_persistence.py Fix custom provider identity loss in session persistence 2026-06-13 05:51:05 -07:00
test_entry_sys_path.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_goal_command.py test(tui_gateway): stop reloading server module in fixture teardown (#34217) 2026-05-28 18:16:54 -07:00
test_make_agent_provider.py fix(tui): honor provider_routing config in the desktop/TUI backend (#44953) 2026-06-13 02:58:15 -05:00
test_protocol.py feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
test_render.py
test_review_summary_callback.py Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
test_subagent_child_mirror.py feat(desktop): composer status stack, live subagent windows, editable prompts (#44630) 2026-06-12 08:30:06 -05:00
test_undo_command.py feat(undo): /undo [N] backs up N user turns with prefill + soft-delete 2026-06-01 01:22:38 -07:00
test_wait_for_mcp_discovery.py perf(tui): stop slow/dead MCP servers from freezing TUI startup 2026-05-30 02:53:37 -07:00