In this article
Accept the adapter when roles and order survive persistence and provider conversion.
Pydantic AI v2.77.0 on November 27 introduced CompactionReceiptPart in the application’s voice. The release distinguishes that receipt from a UserPromptPart. Transcript and model adapters need to preserve what the notice represents.
What the source establishes
A compaction receipt marks an application operation. When history is serialized, its message position and role affect how later parts interpret the text. The record should retain the original user turn. Keep the model, task and tool definitions fixed while you change the session behavior.
Design the comparison
Save a synthetic conversation before and after compaction. Pass the restored history through the provider adapter and inspect the event sequence. Compare it with an ordinary user message sent at the same point. Use simulated state and authorized no-op tools for the decision points in the example. Trace the structured result as well as the visible text. Use a stable control, change the condition you are investigating and repeat both cases in the same environment. Keep the request or data distribution, software revisions and hardware allocation in the run record. Include the route you normally use and the case in which the expected prerequisite is absent. This helps localize a discrepancy when the test produces a different result.
Read the results
Verify that the receipt appears as application activity in the timeline and that the new request retains its own identity. Compare stored history with the inputs actually sent to the provider. Check exactly which state the next turn receives. Classify decisions made by the runtime separately from those made by the model.
Decide what goes into service
Accept the adapter when roles and order survive persistence and provider conversion. Make the compaction message distinguishable from the user’s words. State the acceptance threshold before choosing the implementation. Add the tested boundary and conditions for revisiting it to the release record. If an observed behavior differs from expectations, narrow the scope of the rollout while collecting evidence for that case. Keep the prior artifact or configuration available so the comparison remains repeatable.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.