Skip to content

fix(agent): restore safe non-streaming fallback after stream failures#3020

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-2cdc8d39
Mar 25, 2026
Merged

fix(agent): restore safe non-streaming fallback after stream failures#3020
teknium1 merged 1 commit intomainfrom
hermes/hermes-2cdc8d39

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Salvage of PR #3008 by @kshitijk4poor.

Fixes the 2 streaming test failures that have been on main since the streaming retry logic landed in #2980.

Changes

Streaming fallback logic:

UX improvement (added on top):
When a model/provider doesn't support streaming, shows a clean message:

⚠  Streaming is not supported for this model/provider. Falling back to non-streaming.
   To avoid this delay, set display.streaming: false in config.yaml

Instead of a raw Python error or silent fallback.

Test results

All 6175 tests pass. The 2 previously-failing streaming fallback tests now pass:

  • test_any_stream_error_falls_back
  • test_fallback_error_propagates

New test added: test_exhausted_transient_stream_error_falls_back

After streaming retries are exhausted on transient errors, fall back to
non-streaming instead of propagating the error. Also fall back for any
other pre-delivery stream error (not just 'streaming not supported').

Added user-facing message when streaming is not supported by a model/
provider, directing users to set display.streaming: false in config.yaml
to avoid the fallback delay.

Cherry-picked from PR #3008 by kshitijk4poor. Added UX message for
streaming-not-supported detection.
@teknium1 teknium1 merged commit 94e3d9a into main Mar 25, 2026
3 of 4 checks passed
InB4DevOps pushed a commit to InB4DevOps/hermes-agent that referenced this pull request Mar 25, 2026
…NousResearch#3020)

After streaming retries are exhausted on transient errors, fall back to
non-streaming instead of propagating the error. Also fall back for any
other pre-delivery stream error (not just 'streaming not supported').

Added user-facing message when streaming is not supported by a model/
provider, directing users to set display.streaming: false in config.yaml
to avoid the fallback delay.

Cherry-picked from PR NousResearch#3008 by kshitijk4poor. Added UX message for
streaming-not-supported detection.

Co-authored-by: kshitijk4poor <kshitijk4poor@users.noreply.github.com>
outsourc-e pushed a commit to outsourc-e/hermes-agent that referenced this pull request Mar 26, 2026
…NousResearch#3020)

After streaming retries are exhausted on transient errors, fall back to
non-streaming instead of propagating the error. Also fall back for any
other pre-delivery stream error (not just 'streaming not supported').

Added user-facing message when streaming is not supported by a model/
provider, directing users to set display.streaming: false in config.yaml
to avoid the fallback delay.

Cherry-picked from PR NousResearch#3008 by kshitijk4poor. Added UX message for
streaming-not-supported detection.

Co-authored-by: kshitijk4poor <kshitijk4poor@users.noreply.github.com>
StreamOfRon pushed a commit to StreamOfRon/hermes-agent that referenced this pull request Mar 29, 2026
…NousResearch#3020)

After streaming retries are exhausted on transient errors, fall back to
non-streaming instead of propagating the error. Also fall back for any
other pre-delivery stream error (not just 'streaming not supported').

Added user-facing message when streaming is not supported by a model/
provider, directing users to set display.streaming: false in config.yaml
to avoid the fallback delay.

Cherry-picked from PR NousResearch#3008 by kshitijk4poor. Added UX message for
streaming-not-supported detection.

Co-authored-by: kshitijk4poor <kshitijk4poor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants