Skip to content

fix(provider): apply chunkTimeout to non-SSE streaming protocols#35743

Open
trollkarlen wants to merge 1 commit into
anomalyco:devfrom
trollkarlen:chunk-type-timeout-fix
Open

fix(provider): apply chunkTimeout to non-SSE streaming protocols#35743
trollkarlen wants to merge 1 commit into
anomalyco:devfrom
trollkarlen:chunk-type-timeout-fix

Conversation

@trollkarlen

Copy link
Copy Markdown

wrapSSE only installed chunk-timeout monitoring when the response content-type included text/event-stream, so AWS Bedrock (application/vnd.amazon.eventstream) and other EventStream providers bypassed it entirely and chunkTimeout never fired.

Match text/event-stream and eventstream content types, and add an optional per-provider chunkTimeoutContentTypes list to include extra content-type substrings in the check.

Closes #26487

Issue for this PR

Closes #26487

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Add the missing content type and add config for future missing content types.

How did you verify your code works?

Test, and towards the provider.

Screenshots / recordings

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

wrapSSE only installed chunk-timeout monitoring when the response
content-type included text/event-stream, so AWS Bedrock
(application/vnd.amazon.eventstream) and other EventStream providers
bypassed it entirely and chunkTimeout never fired.

Match text/event-stream and eventstream content types, and add an
optional per-provider chunkTimeoutContentTypes list to include extra
content-type substrings in the check.

Closes anomalyco#26487
@trollkarlen

Copy link
Copy Markdown
Author

Please review so I can rebase and update.

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.

[BUG] chunkTimeout does not work for AWS Bedrock and other non-SSE streaming protocols (EventStream)

1 participant