Skip to content

Create new event stream generator#626

Merged
Madrigal merged 13 commits intomainfrom
feat-support-bedrock-bidi
Feb 20, 2026
Merged

Create new event stream generator#626
Madrigal merged 13 commits intomainfrom
feat-support-bedrock-bidi

Conversation

@Madrigal
Copy link
Copy Markdown
Contributor

Issue #, if available:
N/A

Description of changes:
Add a new event stream generator to support bedrockruntime#InvokeModelWithBidirectionalStream.
This works in tandem with pull request xx in the SDK, where most of the description will happen

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -0,0 +1,198 @@
/*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jfyi i deleted the thing that checks for this a while ago since it's not strictly required

Symbol structOutputSymbol;

if (EventStreamGenerator.isV2EventStream(model, operation)) {
List<MemberShape> onlyEventStreamMembers = outputShape.members().stream().filter(member -> StreamingTrait.isEventStream(model, member)).toList();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an excellent way to solve this, and one I hadn't considered.

@Madrigal Madrigal merged commit c6d1144 into main Feb 20, 2026
15 checks passed
@Madrigal Madrigal deleted the feat-support-bedrock-bidi branch February 20, 2026 19:03
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.

2 participants