hermes - 💡(How to fix) Fix [Bug] model= empty on recovery turn after stream_interrupt_abort — "trying fallback..." logged but never executed, session goes silent

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

After a stream_interrupt_abort during an active gateway session (Discord), the recovery conversation turn is sometimes created with model= (empty). Subsequent API calls fail with HTTP 400: No models provided. The system logs ⚠️ Non-retryable error (HTTP 400) — trying fallback... but the fallback is never actually invoked — the session becomes permanently non-responsive until the user manually re-sends their message. The configured model.default and session history are correct; only the post-interrupt recovery turn loses the model. 6. "⚠️ Non-retryable error (HTTP 400) — trying fallback..." is logged but fallback_model is never called 11:57:42 → "⚠️ Non-retryable error (HTTP 400) — trying fallback..."

Root Cause

Root cause analysis (from logs)

  • The OpenAI client created (agent_init, shared=True) log sometimes shows model= empty after an interrupt
  • This is NOT every interrupt — ~8 other interrupts in the same session retained the model
  • The bug correlates with OpenAI client created being triggered after the interrupt (client recreated), vs. client reuse which preserves the model
  • The fallback announced in the UI is never actually dispatched (confirmed: no fallback API calls in agent.log)

Fix Action

Fix / Workaround

Root cause analysis (from logs)

  • The OpenAI client created (agent_init, shared=True) log sometimes shows model= empty after an interrupt
  • This is NOT every interrupt — ~8 other interrupts in the same session retained the model
  • The bug correlates with OpenAI client created being triggered after the interrupt (client recreated), vs. client reuse which preserves the model
  • The fallback announced in the UI is never actually dispatched (confirmed: no fallback API calls in agent.log)

Code Example

11:57:38 → stream_interrupt_abort, model=deepseek/deepseek-v4-flash ✅
11:57:38 → conversation turn model=EMPTY11:57:42API call failed: HTTP 400 No models provided (attempt 1/3)
11:57:42"⚠️ Non-retryable error (HTTP 400) — trying fallback..."
        → fallback NEVER executes
54 minutes of dead silence
12:51:42[user] resends message manually → model=deepseek ✅ works immediately

---

11:37:49 → stream_interrupt_abort, model=deepseek ✅
11:37:49OpenAI client created (agent_init, shared=True) model=EMPTY11:37:50 → conversation turn model=EMPTY
Same failure pattern
RAW_BUFFERClick to expand / collapse

Summary After a stream_interrupt_abort during an active gateway session (Discord), the recovery conversation turn is sometimes created with model= (empty). Subsequent API calls fail with HTTP 400: No models provided. The system logs ⚠️ Non-retryable error (HTTP 400) — trying fallback... but the fallback is never actually invoked — the session becomes permanently non-responsive until the user manually re-sends their message. The configured model.default and session history are correct; only the post-interrupt recovery turn loses the model.

Steps to Reproduce

  1. Run Hermes Agent gateway (Discord platform) with busy_input_mode: interrupt
  2. Have an active long-running session (deepseek/deepseek-v4-flash via OpenRouter in our case)
  3. Send a message while the agent is processing a tool turn → triggers stream_interrupt_abort
  4. The recovery turn's conversation turn log shows model= (empty) instead of the configured model
  5. API call fails with HTTP 400: No models provided — 3 retry attempts all use the empty model
  6. "⚠️ Non-retryable error (HTTP 400) — trying fallback..." is logged but fallback_model is never called
  7. Session is dead until user manually re-sends

Frequency ~2 out of ~20+ interrupts across 2 sessions in a ~20-minute window. Most interrupts work fine and retain the model.

Timeline from agent.log (session 20260530_115228_72da9eec)

11:57:38 → stream_interrupt_abort, model=deepseek/deepseek-v4-flash ✅
11:57:38 → conversation turn model= ← EMPTY ⚡
11:57:42 → API call failed: HTTP 400 No models provided (attempt 1/3)
11:57:42 → "⚠️ Non-retryable error (HTTP 400) — trying fallback..."
        → fallback NEVER executes
        → 54 minutes of dead silence
12:51:42 → [user] resends message manually → model=deepseek ✅ works immediately

Timeline from session 20260530_102010_3ad067ec

11:37:49 → stream_interrupt_abort, model=deepseek ✅
11:37:49 → OpenAI client created (agent_init, shared=True) model= ← EMPTY ⚡
11:37:50 → conversation turn model= ← EMPTY
        → Same failure pattern

Root cause analysis (from logs)

  • The OpenAI client created (agent_init, shared=True) log sometimes shows model= empty after an interrupt
  • This is NOT every interrupt — ~8 other interrupts in the same session retained the model
  • The bug correlates with OpenAI client created being triggered after the interrupt (client recreated), vs. client reuse which preserves the model
  • The fallback announced in the UI is never actually dispatched (confirmed: no fallback API calls in agent.log)

Environment

  • Hermes Agent version: v0.14.0+ (current HEAD)
  • Platform: Discord gateway
  • Provider: openrouter
  • Model: deepseek/deepseek-v4-flash
  • OS: Linux

Related issues

  • #17446: "Fallback announced but never sent" — same "trying fallback..." never-executed pattern but different trigger (invalid /model override vs. empty model after interrupt)
  • #25242: "Gateway auto-continue note can be persisted and amplified by interrupt" — related interrupt recovery path
  • #14189: model= empty in agent_init for Ollama — same symptom different context

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Bug] model= empty on recovery turn after stream_interrupt_abort — "trying fallback..." logged but never executed, session goes silent