Regression Case Files
Regression Case FileIndependent OSS replay

A streaming response could end before the model did.

Pydantic AI v1.92.0 could return an incomplete or empty agent response when a supplied stream handler returned early. Fourteen releases were affected before v1.106.0 restored the behavior.

The release looked complete.The response was not.
Baselinev1.91.0
analyzed change
Releasedv1.92.0
14 releases affected
Restoredv1.106.0
The case file

The anatomy of a regression

  1. 01 Project
  2. 02 Regression & fix
  3. 03 Early replay
The project

An open-source framework for production AI agents.

Pydantic AI is the Pydantic team's open-source Python framework for building production-grade AI agents with typed models, tools, and outputs.

Project repository
The regression & fix

Agent responses could be incomplete.

A cancellation cleanup removed the normal completion-path drain loop. If an event stream handler returned before consuming every event, remaining events were not drained into the final response. Tool calls could disappear and usage could read zero.

Model provider → event stream → event_stream_handler → ModelResponse
Before v1.92.0 the remaining model stream was drained after a handler returned, while v1.92.0 could preserve an incomplete response.
The behavior changed when a handler returned before consuming the full stream.
Compared
v1.91.0 → v1.92.0
Affected
v1.92.0–v1.105.0 · 14 releases
Public report
User · 26 days after release
Fixed
v1.106.0 · 28 days later
Early finding titled Removed forced drain truncates usage on early exit, classified as a Regression.
The actual Regression finding from the Early product.
The Early replay

Early found the regression.

1Regression
5Expected changes
Early verdict · Regression

“Removed forced drain truncates usage on early exit”

Early traced the incomplete response to the removed drain loop and proposed a focused verification. The reproduction passed on v1.91.0, failed on v1.92.0, and passed again on v1.106.0.

Primary evidence

Follow the record.

Independent replay. Not affiliated with Pydantic.

Explore more Case Files
Your case file

Remember your last regression?

Let Early trace it