Skip to content

Conversation

DouweM
Copy link
Collaborator

@DouweM DouweM commented Aug 26, 2025

This simplifies the event_stream_handler signature from AsyncIterable[AgentStreamEvent | HandleResponseEvent] to AsyncIterable[AgentStreamEvent]. It was always quite wordy and confusing that AgentStreamEvent really referred to the model response stream events, rather than all agent stream events.

Breaking change in typing, but existing code will continue to work as the new AgentStreamEvent now absorbs HandleResponseEvent, which it was always used in a union with.

@DouweM DouweM self-assigned this Aug 26, 2025
Copy link

github-actions bot commented Aug 26, 2025

Docs Preview

commit: 5b763af
Preview URL: https://0ec06a43-pydantic-ai-previews.pydantic.workers.dev

@DouweM DouweM merged commit fc6b1e5 into main Aug 26, 2025
34 checks passed
@DouweM DouweM deleted the agent-stream-event branch August 26, 2025 21:37
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.

1 participant