Skip to content

fix(bidi): respect role from BidiTextInputEvent#2952

Open
chaynabors wants to merge 1 commit into
strands-agents:mainfrom
chaynabors:agent-tasks/2089-bidi-role
Open

fix(bidi): respect role from BidiTextInputEvent#2952
chaynabors wants to merge 1 commit into
strands-agents:mainfrom
chaynabors:agent-tasks/2089-bidi-role

Conversation

@chaynabors

Copy link
Copy Markdown
Member

The bidi agent loop hardcodes the appended message role to user when handling a BidiTextInputEvent, ignoring the event's role attribute entirely. Callers who construct an event with role="assistant" to inject context have that value silently overwritten. The fix swaps the literal for event.role at the single call site so the explicit role flows through.

Fixes #2089.

@github-actions github-actions Bot added size/xs area-bidirectional-streaming Related to bidirectional streaming bug Something isn't working labels Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-bidirectional-streaming Related to bidirectional streaming bug Something isn't working size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Respect role from BidiTextInputEvent parameter instead of hardcoding 'user' role

1 participant