fix(streaming): skip retry when stream health is Healthy#377
Merged
Conversation
When a poll timeout fires during SSE streaming, the old code retried the entire provider call regardless of the stream health state. This caused reasoning models (e.g. glm-5-turbo) to be killed after a single 5-second gap between tokens during their thinking phase. Now the poll-timeout handler checks health state first: - Healthy → continue waiting (just a slow token gap) - Dead → fail immediately - Stale → retry with backoff (existing behavior) Closes #376 Bahtya
Chocolatey installs protoc but the binary may not be on PATH for subsequent steps. Explicitly append the install directory to GITHUB_PATH so protoc is findable by cargo. Bahtya
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HealthState::Healthy— a 5s poll timeout during a reasoning model's thinking phase no longer tears down the entire streamStaleorDeadhealth states;Healthygaps are just slow token flowCloses #376
Test plan
absolute_max) still fail with appropriate erroreffective_stale) still retry with backoffBahtya