Skip to content

Conversation

@zzstoatzz
Copy link
Collaborator

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

  • Import PartEndEvent from pydantic_ai.messages
  • Add handler in _process_pydantic_event() to acknowledge PartEndEvent without emitting a Marvin event (completion is handled via other events like FunctionToolCallEvent and FinalResultEvent)
  • Update pydantic-ai dependency from >=0.7.2 to >=1.9.0 to ensure PartEndEvent is available

Test plan

  • Tested with reproduction script that uses MCP servers and agents
  • Verified no "Unknown event type" warnings appear
  • Pre-commit hooks pass

🤖 Generated with Claude Code

PartEndEvent was added in pydantic-ai v1.9.0 (PR #2923) as part of the
Vercel AI Data Stream Protocol support. This event signals when a part
is complete during streaming.

Changes:
- Import PartEndEvent from pydantic_ai.messages
- Add handler in _process_pydantic_event to acknowledge PartEndEvent
  without emitting a Marvin event (completion is handled via other
  events like FunctionToolCallEvent and FinalResultEvent)
- Update pydantic-ai dependency from >=0.7.2 to >=1.9.0 to ensure
  PartEndEvent is available

This fixes the "Unknown event type: PartEndEvent" warnings that started
appearing after pydantic-ai was updated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings November 3, 2025 03:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request upgrades the pydantic-ai dependency from version 0.7.2 to 1.9.0, which represents a major version bump. The upgrade includes handling a new PartEndEvent type that was introduced in the newer version of pydantic-ai.

  • Updated pydantic-ai dependency from >=0.7.2 to >=1.9.0
  • Added import and handling for the new PartEndEvent type in the streaming module
  • Updated lock file to reflect new versions of pydantic-ai, pydantic-ai-slim, pydantic-evals, and pydantic-graph packages

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
pyproject.toml Updated pydantic-ai dependency version constraint from >=0.7.2 to >=1.9.0
uv.lock Updated lock file with new versions and hashes for pydantic-ai packages (1.6.0 → 1.9.1) and added onnxruntime wheel entries for additional platforms
src/marvin/engine/streaming.py Added PartEndEvent import and handling in _process_pydantic_event function to support new event type from upgraded pydantic-ai

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zzstoatzz zzstoatzz merged commit fa70cc9 into main Nov 3, 2025
10 checks passed
@zzstoatzz zzstoatzz deleted the fix/handle-part-end-event branch November 3, 2025 03:27
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.

2 participants