mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
* fix: stop /model from silently rerouting direct providers to OpenRouter (#10300) detect_provider_for_model() silently remapped models to OpenRouter when the direct provider's credentials weren't found via env vars. Three bugs: 1. Credential check only looked at env vars from PROVIDER_REGISTRY, missing credential pool entries, auth store, and OAuth tokens 2. When env var check failed, silently returned ('openrouter', slug) instead of the direct provider the model actually belongs to 3. Users with valid credentials via non-env-var mechanisms (pool, OAuth, Claude Code tokens) got silently rerouted Fix: - Expand credential check to also query credential pool and auth store - Always return the direct provider match regardless of credential status -- let client init handle missing creds with a clear error rather than silently routing through the wrong provider Same philosophy as the provider-required fix: don't guess, don't silently reroute, error clearly when something is missing. Closes #10300 * fix: word-wrap spinner, interruptable agent join, and delegate_task interrupt Three fixes: 1. Spinner widget clips long tool commands — prompt_toolkit Window had height=1 and wrap_lines=False. Now uses wrap_lines=True with dynamic height from text length / terminal width. Long commands wrap naturally. 2. agent_thread.join() blocked forever after interrupt — if the agent thread took time to clean up, the process_loop thread froze. Now polls with 0.2s timeout on the interrupt path, checking _should_exit so double Ctrl+C breaks out immediately. 3. Root cause of 5-hour CLI hang: delegate_task() used as_completed() with no interrupt check. When subagent children got stuck, the parent blocked forever inside the ThreadPoolExecutor. Now polls with wait(timeout=0.5) and checks parent_agent._interrupt_requested each iteration. Stuck children are reported as interrupted, and the parent returns immediately.