fix: handle PartEndEvent from pydantic-ai 1.9.0+ #1240
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes "Unknown event type: PartEndEvent" warnings that started appearing after pydantic-ai was updated to v1.9.0+.
Background
PartEndEvent was added in pydantic-ai v1.9.0 (PR pydantic/pydantic-ai#2923) as part of the Vercel AI Data Stream Protocol support. This event signals when a part is complete during streaming.
Changes
PartEndEventfrompydantic_ai.messages_process_pydantic_event()to acknowledge PartEndEvent without emitting a Marvin event (completion is handled via other events like FunctionToolCallEvent and FinalResultEvent)>=0.7.2to>=1.9.0to ensure PartEndEvent is availableTest plan
🤖 Generated with Claude Code