Skip to content

Port pydantic-ai v1.106.0 parity fixes for event stream observers and non-base64 data URIs#107

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/chore-port-pydantic-ai-v1-106-0
Draft

Port pydantic-ai v1.106.0 parity fixes for event stream observers and non-base64 data URIs#107
Copilot wants to merge 2 commits into
mainfrom
copilot/chore-port-pydantic-ai-v1-106-0

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 5, 2026

This updates the SDK parity baseline from pydantic-ai v1.87.0 to v1.106.0 and ports the relevant runtime bugfix behavior from that range. The changes focus on stream-handler resilience and data URI decoding behavior in multimodal image output extraction.

  • Version alignment

    • Bumped .github/pydantic-ai-version.txt to 1.106.0.
  • Multimodal data URI parsing fix

    • Updated extractBinaryImageFromToolOutput() to support both:
      • data:<mime>;base64,<...> payloads
      • valid non-base64 data:<mime>,<percent-encoded...> payloads
    • Added defensive decode handling so malformed payloads return null instead of throwing.
  • Event stream handler resilience parity

    • Added regression coverage to ensure runStreamEvents() downstream iteration still completes when an observer-form eventStreamHandler is provided but does not consume the stream.
  • Feature parity documentation updates

    • Updated packages/sdk/docs/reference/features.mdx notes for:
      • BinaryImage output behavior (base64 + non-base64 data URI support)
      • ProcessEventStream behavior when observers do not consume events.
// now handled in extractBinaryImageFromToolOutput:
{
  type: "image",
  image: "data:image/svg+xml,%3Csvg%20...%3E%3C/svg%3E",
  mimeType: "image/svg+xml",
}

Copilot AI assigned Copilot and a7ul Jun 5, 2026
Copilot AI linked an issue Jun 5, 2026 that may be closed by this pull request
11 tasks
Copilot AI changed the title [WIP] Chore: port pydantic-ai changes from v1.87.0 to v1.106.0 Port pydantic-ai v1.106.0 parity fixes for event stream observers and non-base64 data URIs Jun 5, 2026
Copilot finished work on behalf of a7ul June 5, 2026 10:34
Copilot AI requested a review from a7ul June 5, 2026 10:34
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.

chore: port pydantic-ai v1.106.0 changes

2 participants