You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PydanticAITurn.events feeds BOTH delivery channels (yield_turn for sync,
auto_send_turn for async). Applying _coalesce_tool_requests unconditionally
would deliver tool requests as a single Full with no ToolRequestDelta tokens,
losing the sync converter's documented tool-call-argument token streaming
(Task 4 routes the sync/HTTP path through emitter.yield_turn(PydanticAITurn(...))).
- Add constructor param coalesce_tool_requests: bool = False. Default OFF means
PydanticAITurn(...).events == bare convert_pydantic_ai_to_agentex_events output
(Start+Delta+Done for tool calls, arg streaming preserved on yield/sync).
- stream_pydantic_ai_events builds the Turn with coalesce_tool_requests=True,
because the foundation auto_send currently DROPS tool requests delivered as
Start+Delta+Done (AGX1-377). Comment cites AGX1-377 as a temporary workaround
to be removed once auto_send handles the streamed tool-request shape natively.
- Tests: default-off Turn yields a ToolRequestDelta for streamed args (matches
bare converter); coalesce-on Turn yields a single Full(tool_request) with
fully-accumulated args and no ToolRequestDelta. Async characterization test
still passes (goes through coalesce=True).
- Add parts-manager invariant comment to the two corrected async tests.
auto_send.py is unchanged (final_text last-segment fix stays; AGX1-377 covers
the Start+Delta+Done handling).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments