Function: buildConverseRequest()
ts
function buildConverseRequest(
input: ConverseRequestBuildInput,
): Promise<ConverseRequest>;Defined in: src/batteries/llm/bedrock_converse/helpers.ts:305
Assemble the native Converse request from ADK turn state. THE ordering seam.
Parameters
| Parameter | Type |
|---|---|
input | ConverseRequestBuildInput |
Returns
Promise<ConverseRequest>
Remarks
The translation that makes this battery different from pointing openai_chat_completions at a Converse-backed gateway:
- System text becomes a top-level
system[], never a turn. - A
ToolCallbecomes anassistantturn with a{toolUse}block, then auserturn with a{toolResult}block — Converse has notoolrole. - Blocks accumulate on the CURRENT turn where possible, so prose and a tool call emitted in the same assistant turn stay in one turn (the shape Converse is designed around).
- Alternation is applied last, under ConverseRequestBuildInput.alternationPolicy.
- Timeline order is
createdAt, matching the ordering guard's view, so what the guard validated is what gets dispatched.