Skip to content

fix: streaming repeated final answer events#45

Merged
vrtornisiello merged 2 commits into
stagingfrom
fix/streaming-repeated-final-answer-events
Apr 30, 2026
Merged

fix: streaming repeated final answer events#45
vrtornisiello merged 2 commits into
stagingfrom
fix/streaming-repeated-final-answer-events

Conversation

@vrtornisiello
Copy link
Copy Markdown
Collaborator

No description provided.

`ModelCallLimitMiddleware.before_model` runs on every model iteration, not just when the limit is exceeded.
Checking only for the chunk key's presence caused the limit-reached message to be streamed repeatedly before the real final answer.
Now we check the chunk's payload for `jump_to == "end"`, which is the actual signal the middleware triggered.
@vrtornisiello vrtornisiello merged commit ffbf2d2 into staging Apr 30, 2026
1 check passed
@vrtornisiello vrtornisiello deleted the fix/streaming-repeated-final-answer-events branch April 30, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant