Skip to content

fix(agent): preserve usage frames after finish_reason - #493

Merged
ace331 merged 2 commits into
mainfrom
fix/stream-finish-tail-bug
Sep 4, 2026
Merged

ace331 merged 2 commits into
mainfrom
fix/stream-finish-tail-bug

Conversation

@ace331

@ace331 ace331 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the upstream byte-stream pump alive after the model protocol Finish event until the wire reaches EOF / [DONE]
  • preserve OpenAI-compatible usage-only SSE frames that providers send after finish_reason
  • add a regression test covering finish_reason followed by a usage frame

Validation

  • cargo fmt -p future-agent --check
  • cargo clippy -p future-agent --all-targets -- -D warnings
  • cargo test -p future-agent (1604 tests passed)

@ace331
ace331 enabled auto-merge (squash) September 4, 2026 06:51
@ace331
ace331 merged commit 9b98aa6 into main Sep 4, 2026
12 checks passed
@ace331
ace331 deleted the fix/stream-finish-tail-bug branch September 4, 2026 06:55
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