Commit ae08e9d
committed
fix: remove double-wrapping from converse-stream Event Stream payloads (closes #162)
Converse stream event builders emitted payloads wrapped with the
event type name (e.g. { messageStart: { role: "assistant" } }). The
:event-type header already carries the event name, so AWS SDK
(botocore) expected flat payloads (e.g. { role: "assistant" }). The
redundant wrapping caused botocore to silently return empty dicts,
producing KeyError in downstream frameworks like Strands Agents.
Affected functions: buildBedrockStreamTextEvents,
buildBedrockStreamToolCallEvents,
buildBedrockStreamContentWithToolCallsEvents.1 parent 90a7907 commit ae08e9d
4 files changed
Lines changed: 145 additions & 185 deletions
File tree
- src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
0 commit comments