Skip to content

fix: terminate chat streams after upstream errors#626

Open
ShiroKSH wants to merge 1 commit into
chenyme:mainfrom
ShiroKSH:fix/chat-stream-error-terminal
Open

fix: terminate chat streams after upstream errors#626
ShiroKSH wants to merge 1 commit into
chenyme:mainfrom
ShiroKSH:fix/chat-stream-error-terminal

Conversation

@ShiroKSH

Copy link
Copy Markdown

Summary

  • Stop the Chat SSE converter from appending a successful terminal chunk after an upstream error.
  • Add regression coverage for response.failed streams.

Why

After an upstream error, source EOF caused the converter to emit finish_reason: "stop" and a second terminal marker. Failed generations could therefore appear successful to Chat clients.

Checks

  • go vet ./...
  • go test ./...

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