Add `ModelResponseRejectedEvent` to set a rejected streamed response apart from the retry, in the event stream and the Vercel AI and AG-UI adapters
This pull request was posted by Claude Code using claude-opus-5-5 on behalf of David.
Researched and posted by Claude Code (claude-opus-5-5) on behalf of Richard (@rscholz98).
- Closes #9991
Why we make these changes
When a streamed response is rejected and the model is asked again, the rejected text and the retry stream back to back with nothing between them, so a UI shows both as one reply (#9991). This implements the event from Douwe's settled design for three of its four rejection sources: an output validator ModelRetry or a response with no usable output, an after_model_request (or wrap_model_request) ModelRetry, and a capability replacing the stream mid-way, like a parallel input guardrail. The fourth, re-attempting after a stream ended (RetryModelRequest from a hook, ModelFallback, FallbackModel response handlers), plus buffer_streams and the run_stream() accessor restart, are the half the design shares with #4140 and are left to it.
[!WARNING]
Compatibility impact: HandleResponseEvent, and with it AgentStreamEvent, gains ModelResponseRejectedEvent. Code that matches those unions exhaustively (with assert_never) sees a new member, and event-stream snapshots of a run that rejects a streamed response gain the event. Through the UI adapters, such a run also gains a data-model-response-rejected part in a step of its own (Vercel AI), or a CUSTOM event and a new assistant message for the retry (AG-UI).
Why this can ship in a minor release: the version policy lists new stream events as non-breaking and asks consumers of event streams to code defensively.
Migration: handle or skip ModelResponseRejectedEvent in exhaustive matches over the event unions, and update event-stream snapshots of runs that reject a streamed response.
New public surface
ModelResponseRejectedEvent(response,reason: RetryFeedbackPart | ModelRequestAttempt,run_step,attempt), aHandleResponseEventmember, exported frompydantic_ai.UIEventStream.handle_model_response_rejected().- Vercel AI
data-model-response-rejecteddata part; AG-UICUSTOMeventpydantic_ai_model_response_rejectedwith the rejected message'smessage_id. Both carryrun_step,attemptandoutcome('retried'with thecause, or'replaced'), not the feedback text.
User-visible behavior
PartEndEvent(part=TextPart("I'll look that up."))
+ ModelResponseRejectedEvent(response=..., reason=RetryFeedbackPart(...), run_step=1, attempt=1)
PartStartEvent(part=TextPart('The store opens at 9 am.'))
Vercel AI ends the rejected step after the data part and streams the retry in a new step. AG-UI streams the retry as a new assistant message.
Verification
tests/test_model_response_rejected.py: every source, retry-budget exhaustion, guardrail cut-short, consumer leaving the stream early, and no event for accepted responses.- Adapters:
tests/test_vercel_ai.py,tests/test_ag_ui.py,tests/test_ui.py;tests/ui_roundtrippasses unchanged through the real JS clients (its rejected-response scenarios now carry the new parts). - Order under durable execution: Temporal, DBOS and Prefect tests in
tests/durable_exec/. - Durable runs across the upgrade: a Temporal history recorded before the patch replays (
test_temporal_rejected_event_dispatch_is_gated_by_a_patch) and still publishes the event to its topic (test_rejection_is_published_with_or_without_the_dispatch_patch); a DBOS workflow recorded before the patch takes no handler step and recovers (test_dbos_rejected_event_dispatch_is_gated_by_a_patch,test_dbos_workflow_that_recorded_a_rejection_before_the_patch_recovers); a Prefect flow retried across the upgrade replays its later event handlers (test_prefect_flow_retry_after_the_rejection_dispatch_appears_replays_the_later_event_handlers). - A
wrap_model_requestretry that uses up the output retry budget reachesrun_stream_events(),run(event_stream_handler=...),run_stream(event_stream_handler=...), an@on_eventlistener underiter()andrun_stream(), the Vercel AI adapter and a DBOS durable handler beforeUnexpectedModelBehavior; a failing run with no rejection buffered delivers nothing new, and awrap_model_request-only agent withretries={'output': 0}keeps main's usage timing.
What changes for existing users
Runs with no rejection see the same events. On a streamed request with an after_model_request hook, the hook runs, and the run counts the response's usage, when the model stream ends rather than when the consumer leaves it; without such a hook the timing is unchanged, a wrap_model_request hook included. A ModelRetry that wrap_model_request raises after its handler returned is reported at the start of the next request's stream; when it uses up the output retry budget, the run delivers it to its event consumers (event_stream_handler under run() and run_stream(), run_stream_events(), the UI adapters, @on_event listeners, durable handlers) before UnexpectedModelBehavior propagates. A node stream read through iter() doesn't get that one, as with the other events main buffers after a node's stream closed. A failure with no rejection buffered leaves the buffer as before. StreamGuardrail forwards the event with the response's text, thinking and tool-call parts left out, so it can't carry a value the guard redacted from the stream. An AG-UI retry gets its own assistant message. Adding a member to HandleResponseEvent carries an API-check waiver against v2.76.0, .github/api-compatibility-waivers/0df8b4820d434d991de06b07058e0beac36578c5c577739b97664b11397b734f.json.
Durable runs in flight across the upgrade: Temporal and DBOS hand the event to the event_stream_handler only in workflows past the pydantic_ai:rejected_event_dispatch patch (workflow.patched(), DBOS.patch_async()), so a workflow started before it replays or recovers without a handler activity or step for the event. The event is still yielded either way, and Temporal still publishes it to an event_stream_topic. Prefect counts the event's handler task on its own key, so a flow retried across the upgrade replays its later event handlers. Absurd, pgtask and Render get no gate: on an Absurd or pgtask replay of a run started before the upgrade, the rejection isn't delivered and one event is delivered twice, which their idempotent-handler requirement covers. The AWS Lambda and Azure Durable Task READMEs say to let in-flight runs with an event_stream_handler drain before upgrading.
Overlaps: #11911 and #11496 conflict textually in _agent_graph.py. #10479 has landed, and this branch is merged with it.
PR decisions
2026-10-30 · pre-push review 1 of 3 at 3d2c3eb26ee1718ff50d060f5f2078b8d1c21f19 · iter -
- Decision: reserved: dispatching fresh reviewer
- Why: tree 7780be990f8f50f352f7c72ffbe52d15e64f00f1; scope full branch 79e157e8b..3d2c3eb26 (first review)
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · pre-push review 1 of 3 at 3d2c3eb26ee1718ff50d060f5f2078b8d1c21f19 · iter -
- Decision: remediated: AG-UI names only announced messages; docs scope output-tool retries out; Prefect and DBOS ordering tests; helper renamed
- Why: 10 findings; 4 fixed (unannounced message_id, output-tool docs, durable engines, naming), 6 dismissed with evidence (entries below)
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · Re-attempt source stays with #4140 · iter -
- Decision: RetryModelRequest after a streamed response, ModelFallback and FallbackModel response handlers on streams, buffer_streams and run_stream accessor restart are left to #4140; the PR body says so
- Why: Douwe's 2026-10-22 design bundles them with #4140, which is open and assigned to agnim25 and dsfaccini; stream re-attempt needs its own machinery
- Source: https://github.com/pydantic/pydantic-ai/issues/4140#issuecomment-6353375732
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · No AG-UI version gate for the rejection event · iter -
- Decision: Emit the CUSTOM event at every supported ag-ui version
- Why: handle_custom_event already emits AGUICustomEvent unconditionally at the floor version; CustomEvent predates the version floor
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · A wrapper recovering from the handler's retry isn't a rejection · iter -
- Decision: No event when wrap_model_request catches the handler's ModelRetry and returns a response
- Why: nothing streams in the response's place, and a wrapper returning its own response is ordinary hook behavior, like after_model_request returning a modified one
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · Cut-short verdict can't report a replacement before an error · iter -
- Decision: Keep the cut-short path as is, with a clarified comment
- Why: any error other than SkipModelRequest or ModelRetry is raised to the consumer by the replacement before the verdict runs
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · Builtin-return AG-UI test gets a text ending · iter -
- Decision: Give test_stream_failed_builtin_tool_return_outcome_roundtrip's model a closing text instead of asserting the event there
- Why: on main that run already ended in 'Exceeded maximum output retries (1)', so the retry was incidental to what the test checks; the event has its own AG-UI tests
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · No new UI round-trip scenario · iter -
- Decision: Rely on the existing output_validation_feedback and no_output_feedback scenarios
- Why: both stream rejected responses through the real AI SDK and AG-UI clients, so they carry the new data part and custom event; all 449 cases pass with the recorded gap diffs unchanged
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · pre-push review 2 of 3 at 1755f1b1b3ded26a8e93d4748643c2ac15f8d448 · iter -
- Decision: reserved: dispatching fresh reviewer
- Why: tree 73abbbe203adfc14a7226308d62e17e6cc927eeb; scope delta 3d2c3eb26..1755f1b1b since reviewed tree 7780be990, plus verifying call-1 fixes
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · pre-push review 2 of 3 at 1755f1b1b3ded26a8e93d4748643c2ac15f8d448 · iter -
- Decision: no remaining findings: F3/F4/F9/F10 verified fixed; its one new finding refuted by reproduction
- Why: tree 73abbbe203adfc14a7226308d62e17e6cc927eeb; the reviewer read main's ui/_event_stream.py, but this branch ends the response turn after every rejection, so a later message-less rejection can't match the earlier message
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · Exempt test-only delta after review 2 · iter -
- Decision: Push 369ae34d6 without a third review
- Why: delta from reviewed 1755f1b1b is one new test in tests/test_ag_ui.py pinning established behavior (test code only, affected tests run)
- Source: https://github.com/rscholz98/pydantic-ai/tree/model-response-rejected-event
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · pre-push review 3 of 3 at 243163f92053274c83391489022246605a7ed607 · iter -
- Decision: reserved: dispatching fresh reviewer
- Why: tree cb0785f8d765dd3aa645adb4fbd1cc181111a143; scope delta 1755f1b1b..243163f92 since reviewed tree 73abbbe20 (includes the exempt test commit 369ae34d6 and the CI fix)
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · pre-push review 3 of 3 at 243163f92053274c83391489022246605a7ed607 · iter -
- Decision: remediated: usage timing pinned with and without an after_model_request hook and documented in hooks.md and the PR body; waiver reason grounded in the version policy and the #11111 precedent; budget exhausted, pushing b7b31741d after local checks
- Why: tree cb0785f8d765dd3aa645adb4fbd1cc181111a143; no compatibility impact label: adding a stream event is listed as non-breaking and asks consumers to code defensively, as for ModelSettingsDeltaEvent in #11111
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · Exempt coverage-only delta after review 3 · iter -
- Decision: Push b27e4cc09 without another review
- Why: test-only: a pragma on a test loop that always breaks, from reviewed tree after b7b31741d; budget exhausted
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · Macroscope duplicate-usage finding is valid · iter -
- Decision: Skip the interrupted commit's billed usage when the handler already recorded it; regression test for both sides
- Why: reproduced: with an after_model_request hook, a consumer raising after draining the stream counted 100/10 tokens instead of 50/5; budget exhausted, pushed after local checks
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#discussion_r4420312045
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · API waiver moved out of the PR · iter -
- Decision: Drop the .github/api-compatibility-allowlist.json change and ask a maintainer to add the waiver
- Why: the .github directory guard accepts .github changes only from maintainers; the waiver is needed for the API check in CI to pass
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-30 · Merged main with #10479 · iter -
- Decision: Merge upstream main (no force-push) and rename the verdict's wrap_task reference to wrap.task
- Why: #10479 landed and renamed wrap_task to a ScopedTask; the stale name raised NameError inside the verdict, which its except swallowed, so three rejection tests failed in CI; budget exhausted, pushed after local checks
- Source: https://github.com/pydantic/pydantic-ai/pull/10479
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-10-31 · Merged main at d56fa5561 · iter -
- Decision: Kept both sides in every conflict: main's capability-load delta event beside the rejection event in the UI adapters and payload helpers, and main's capability-load record emission before the retry feedback in _build_retry_node
- Why: both sides added independent code at the same spots; no conflict changed either side's behavior; merge resolution, so not an exempt delta, and the review budget is exhausted: pushed after targeted tests, pyright and ui_roundtrip
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-11-01 · Merged main again · iter -
- Decision: Kept main's no_leaked_tasks() structure in test_block_cancels_run_stream_events and added the rejection to its expected events
- Why: the only conflict; main replaced the task-diff check with no_leaked_tasks(); targeted tests, pyright and ui_roundtrip pass; waiver fingerprint unchanged against v2.64.0
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 5ce4613d-c0d8-4846-91fb-8d5015cc6be3
2026-11-05 · Merged main at 8b455f222 with #12406 · iter -
- Decision: Resolved the one conflict in CallToolsNode by keeping main's _raise_if_cut_off_output check ahead of _retry_rejected_response; a response cut off by the token limit fails right away as on main and reports no rejection, since no retry follows it
- Why: main raises before the retry budget is touched (#12406) and the event marks a response the model is asked again about; conflict resolution, so not an exempt delta, and the review budget is exhausted: pushed after pyright on _agent_graph.py, the #12406 tests, and the rejection tests incl. DBOS, Prefect and Temporal (3.13)
- Source: https://github.com/pydantic/pydantic-ai/pull/12406
- Session: b37baa08-3c0d-4be4-b6e8-ae50f5865e8c
2026-11-05 · Cognitive complexity gate after the merge · iter -
- Decision: Moved this PR's additions out of the four flagged functions instead of ignoring them: _stream_rejection, _report_late_rejection and _HandlerVerdict for ModelRequestNode._stream; a sync _reject_response for CallToolsNode, which yields the rejection before consuming the retry it pre-stamps; _rejected for AgentStream._model_events; _handle_ui_custom_event for UIEventStream.handle_event, since each new case of that dispatcher costs 2 and the custom-event gate was the only block to move
- Why: the check landed on main after the last push and fails any growth of a function already over the limit; scores are back to main's or under 15; not an exempt delta and the review budget is exhausted: pushed after ruff, pyright, check_complexity.py --base upstream/main, and 2143 tests across the agent, streaming, hooks, UI and durable rejection suites
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/41976714278
- Session: b37baa08-3c0d-4be4-b6e8-ae50f5865e8c
2026-11-08 · Merged main at 0f7648a1b, exempt delta · iter -
- Decision: Pushed merge commit 25a35e837 without another review
- Why: no conflicts; git diff upstream/main...8eaf3af24 equals git diff upstream/main...HEAD apart from hunk offsets; pyright on the 14 changed source files clean, check_complexity.py --base upstream/main clean, 1726 tests in the 10 changed test modules pass; the API check against v2.66.0 still needs the maintainer-owned waiver 0df8b4820d434d991de06b07058e0beac36578c5c577739b97664b11397b734f.json
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: a13a492c-3214-490b-92a4-4f1c0f23dd18
2026-11-12 · Merged main at dad392fd4a, exempt delta · iter -
- Decision: Pushed merge commit 65a158b952 without another review; the review budget is exhausted.
- Why: Four conflicts, all mechanical: _event_stream.py kept this branch's _close_open_part helper and dropped the _dispatch_callback method that main replaced with the module-level dispatch_callback (#12326); test_ui.py keeps both sides' imports; test_ag_ui.py and test_vercel_ai.py keep both sides' appended tests. git diff upstream/main...25a35e837 and git diff upstream/main...HEAD have identical added and removed lines except the two blank separator lines between the appended tests. pyright on _event_stream.py and test_ui.py clean; 1360 tests in the 7 changed test modules pass, the one failure (test_ag_ui thinking cassette, line 4312) is an upstream test that needs ANTHROPIC_API_KEY set and passes with a placeholder key.
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 9e76cc01-9a9e-4486-aa36-ad9a539b46d2
2026-11-12 · Veria finding on rejected frontend tool calls escalated to maintainers · iter -
- Decision: No code change yet. Replied on discussion_r4551742654 with the reproduction and two options; recommended Option A (synthetic tool results for the rejected response's ToolCallParts, mirroring the error path's interrupted closeout). Thread left open until a maintainer decides.
- Why: Reproduced with a FunctionModel cut short after a frontend tool call delta: main emits START/ARGS then TEXT_MESSAGE_START (AG-UI protocol violation, client fails the run); the PR emits START/ARGS/END, CUSTOM rejection, replacement text, RUN_FINISHED success, and CopilotKit's processAgentResult executes every unanswered assistant tool call regardless of CUSTOM events (verified in run-handler.ts at d0f7fa78). Vercel AI leaves the part at input streaming. Answering the calls is new behavior outside Douwe's 2026-10-22 design, so it is a maintainer decision, not a scope widening I may make alone.
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#discussion_r4551742654
- Session: 9e76cc01-9a9e-4486-aa36-ad9a539b46d2
2026-11-12 · defer: unanswered tool calls of a replaced streamed response · iter -
- Decision: Filed as #13260 instead of fixing here; replied on the Veria thread with the link and resolved it.
- Why: Out of scope for this PR: answering the calls is new stream behavior with its own design decisions (outcome, content, both protocols), and the unanswered calls reproduce on main without this PR. No maintainer route: the author has no triage rights, so the issue stays in normal triage.
- Source: https://github.com/pydantic/pydantic-ai/issues/13260
- Session: 9e76cc01-9a9e-4486-aa36-ad9a539b46d2
2026-11-24 · adopted PR #11939 at 2026-11-24 · iter -
- Decision: Branch-context bootstrapped from existing PR + issue #9991. Entries above are the author's log imported verbatim from the PR body; both resolved threads (Macroscope usage, Veria frontend tool calls) are already covered there. Maintainers (dsfaccini) now finish it on the author's fork branch.
- Why: David took the PR over from rscholz98; the author's log is the history the PR body mirrors
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: c7f2787b-f95d-4dab-a837-bce56c46c82f
2026-11-24 · pre-push review 1 of 3 (takeover task) at aae930e9b3269dd08e520cd53aca86a26e59ce8a · iter -
- Decision: reserved: dispatching fresh reviewer (light tier, Haiku; douwebot has never reviewed this PR)
- Why: tree c1410a6e651324f569fcc10fe2501f79d02aa905; new task (maintainer takeover), so a fresh 3-review budget; scope: merge eb5825a6e1 conflict resolution + upstream interaction since pushed head 6c7d025, plus waiver commit aae930e9b3; full branch 4324378262...aae930e9b3 as context
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: c7f2787b-f95d-4dab-a837-bce56c46c82f
2026-11-24 · Merged main at 4324378262; waiver added; compatibility impact label · iter -
- Decision: Merge eb5825a6e1 kept both sides in both _agent_graph.py conflicts (ModelRequestNode fields: this PR's _attempt_start/_rejection_feedback beside main's step* recording fields; CallToolsNode: this PR's _reject_response beside main's _unanswered). Added the waiver against v2.73.0 and the compatibility impact label with a [!WARNING] section
- Why: The PR's added/removed lines are identical before and after the merge apart from the waiver. pr_gates.py compatibility-waiver gate fails a PR that adds a waiver without the compatibility impact label, and the same-shape precedents #11111 and #10090 carry it, so the author's earlier no-label call no longer holds
- Source: https://github.com/pydantic/pydantic-ai/pull/11111
- Session: c7f2787b-f95d-4dab-a837-bce56c46c82f
- Supersedes: pre-push review 3 of 3 at 243163f92053274c83391489022246605a7ed607 (no compatibility impact label)
2026-11-24 · pre-push review 1 of 3 (takeover task) at aae930e9b3269dd08e520cd53aca86a26e59ce8a · iter -
- Decision: remediated: 3 findings. F1 verification gap: ran DBOS, Prefect, durable compat, docs examples and the contract manifest test; Temporal is skipped on local Python 3.15 and left to CI. F2 after_model_request gate covers main's RetryOnModelErrors hook: skip, design-settled timing already in the PR body. F3 failed_attempt default kind: comment-only commit 516757715c
- Why: tree c1410a6e651324f569fcc10fe2501f79d02aa905. F2: ContentFilter and ModelFallback overrides predate the merge; RetryOnModelErrors.after_model_request returns a streamed response unchanged; the design says the step's stream waits for a verdict once the model stream ends. F3: kind is new on main (34b98898b2); 'retry' means another attempt at the same model, which a replacement is not. Delta 516757715c is one comment line, exempt (comments only)
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: c7f2787b-f95d-4dab-a837-bce56c46c82f
2026-11-24 · Pushed 516757715c to the author's fork branch · iter -
- Decision: Fast-forward push 6c7d025fef..516757715c; exempt delta chained from reviewed aae930e9b3 (tree c1410a6e65)
- Why: git diff aae930e9b3..516757715c adds one comment line only (comments-only exemption); targeted pytest, pyright, ruff, complexity and API check passed on the candidate
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: c7f2787b-f95d-4dab-a837-bce56c46c82f
2026-11-24 · .github guard blocks the waiver on this PR; stopped for the manager · iter -
- Decision: Stopped after the push per dispatch: the .github Directory Guard fails on 516757715c because it judges the PR author (rscholz98, permission read), not the pusher
- Why: Guard log: 'Author rscholz98 repo permission: read; not permitted to change .github/.' The main ruleset requires only the check status today, so the guard is advisory (.github/workflows/AGENTS.md); a separate waiver-only PR would fail the API check as an unused waiver against v2.73.0
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/45446407269/job/138631284290
- Session: c7f2787b-f95d-4dab-a837-bce56c46c82f
2026-11-24 · CI test-waits check: shared READINESS_WAIT_TIMEOUT, pushed aa46047763 · iter -
- Decision: Replaced the module-level READINESS_WAIT_TIMEOUT = 10 in tests/test_model_response_rejected.py with the import from tests/_timeouts.py; exempt test-harness repair chained from reviewed aae930e9b3
- Why: check_test_waits.py (new on main, #13969) failed the cognitive complexity job on 516757715c: a module-level readiness constant plus three waits bound by it; the shared constant is the check's own fix; the file's 18 tests pass
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/45446356337
- Session: c7f2787b-f95d-4dab-a837-bce56c46c82f
2026-11-24 · .github guard: keep the waiver on rscholz98's PR (David: a) · iter -
- Decision: David answered "a" at 2026-11-24 18:21Z. The waiver stays on this PR. trusted-mgr enqueues at the merge bar with the advisory .github Directory Guard red. First it checks that the waiver on the final head is byte-identical to the maintainer-pushed one: path .github/api-compatibility-waivers/0df8b4820d434d991de06b07058e0beac36578c5c577739b97664b11397b734f.json, blob 19a0a63882a27cc8a1155a5f8174f75ba28f8488, sha256 16813e4cdb08fe3717097a5549c4e3ae93385dbf8c096c647f577e146bf7a57e, from commit aae930e9b3.
- Why: The guard judges the PR author's read access, not the pusher, and main's ruleset requires only check. Carrying the PR forward into a maintainer PR would close the contributor's PR to satisfy an advisory check.
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 3cfcefc3-eff1-4e16-9ea1-aae214ac1065
2026-11-24 · review-branch at aa46047763 (3 waves) · iter -
- Decision: REVIEW BEFORE PUSHING: 2 blocking (late wrap_model_request ModelRetry that spends the budget emits no event; test helpers copied in 6 modules), 13 required (do); fixes held for the manager's fix loop
- Why: Gating lanes 0 after claim-check: runtime-behavior's event-reach and verdict-wait blockers refuted against the #9991 design and the 2026-10-30 usage decision. Late-budget gap reproduced (retries output 0 and 1). integration-impact's ACTION counted as a required test, not a gate blocker. Refuted by runtime/CI: CallToolsNode break hazard, stream cut-off ordering, dead _initial_includes_response, Vercel sdk_version gate, stream guardrail hold (pre-existing)
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7140975903
- Session: a76fde75-f57c-4d13-8680-216d099e3fe0
2026-11-24 · review-branch defer: unanswered tool calls of a replaced response · iter -
- Decision: defer, already tracked in https://github.com/pydantic/pydantic-ai/issues/13260
- Why: new stream behavior outside the #9991 design; reproduces on main
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7140975903
- Session: c95bdad5-35a8-4c94-b4e5-128dbd4d0f02
2026-11-24 · review-branch skips (aa46047763) · iter -
- Decision: skip: HandleResponseEvent member (waived, labeled, [!WARNING] section); per-event generator in UIEventStream._transform_events (~0.7 µs/event, same shape as _before_handle_event); reportPrivateUsage ignores (removal needs new public capability surface; match _has_wrap_model_request reads); dict[str, Any] payload (nine sibling helpers return it); usage flag across three modules and _stream under its noqa C901 (tests pin it; exemption predates the PR); pragma no cover on the base UI handler (sibling base handlers carry it); no VCR case (rejection is decided by the graph after the model stream); cut-short response.state 'suspended' (event not stored, no reader); Vercel load ignoring the data part (documented); kind='fallback' (settled 2026-11-24); no AG-UI version gate (settled 2026-10-30); after_model_request stream-end timing (settled design)
- Why: each skip's reason as the review report gave it; none changes what the PR ships
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7140975903
- Session: c95bdad5-35a8-4c94-b4e5-128dbd4d0f02
2026-11-24 · Pre-existing review findings outside the diff · iter -
- Decision: #3 StreamGuardrail hold routed to a follow-up issue; skip #1 load_messages joining a stream-shaped rejected message with its answer, #2 pax renderer marker, #4 consume_output_retry pragma no branch
- Why: #1 matches main; #2 is outside #9991's scope, which covers Vercel AI and AG-UI only; #4 is unconfirmed
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7140975903
- Session: c95bdad5-35a8-4c94-b4e5-128dbd4d0f02
2026-11-24 · Late wrap_model_request retry on a spent budget · iter -
- Decision: When a retry would use up the output budget and the root capability has wrap_model_request, the step's stream waits for the whole wrap_model_request verdict at model-stream end, so the exhausting rejection is reported before the run fails
- Why: the late path buffers for the next request's stream, which never comes once the budget is spent; waiting only then keeps the PR's no-wait-on-busy-wrappers choice for every other response and follows the design's 'the step's stream waits for a verdict once the model stream ends'; failure-path delivery from run.py would miss iter() consumers
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7140975903
- Session: c95bdad5-35a8-4c94-b4e5-128dbd4d0f02
2026-11-24 · defer: StreamGuardrail holds later events after a mid-part cut-short · iter -
- Decision: Filed as #14370 instead of fixing here; immediate route, assigned dsfaccini, pydanty:skip, p:3-mid
- Why: Out of scope for this PR — StreamGuardrail's own part tracking, reproduced with a probe on this head and the same on main; impact is latent until a live stream follows a cut-short response in one node stream (#4140)
- Source: https://github.com/pydantic/pydantic-ai/issues/14370
- Session: c95bdad5-35a8-4c94-b4e5-128dbd4d0f02
2026-11-24 · pre-push review 2 of 3 at ffe418358abca9494bf3ee4b8ee9a2ab68c8eac3 · iter -
- Decision: reserved: dispatching fresh reviewer (strong tier, Opus; hosted reviewers Macroscope and Veria commented on two earlier pushes)
- Why: tree ae81d254773c97d45d41b2012348222b2c529d8a; scope delta aae930e9b3..ffe418358abca9494bf3ee4b8ee9a2ab68c8eac3 since reviewed tree c1410a6e65, plus verifying the 15 review-branch findings; full branch 432437826277f39cbbc61988942902a39533af40..ffe418358abca9494bf3ee4b8ee9a2ab68c8eac3 as context
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: c95bdad5-35a8-4c94-b4e5-128dbd4d0f02
2026-11-24 · pre-push review 2 of 3 at ffe418358abca9494bf3ee4b8ee9a2ab68c8eac3 · iter -
- Decision: all 15 review-branch findings verified fixed; 3 new: F1 escalated (the item-1 fix waits for wrap_model_request at stream end for every wrapped agent whose output budget is spent, incl. Instrumentation and durability, moving stream-end and usage timing beyond the after_model_request decision); F2 fixed (skill names the run_stream() exception); F3 fixed (the rejection path's synthetic part end goes through handle_event, so AG-UI stamps its timestamp; the error path is unchanged)
- Why: tree ae81d254773c97d45d41b2012348222b2c529d8a; F1 is a behavior trade-off for a maintainer, push paused per the pre-push gate; F3 reproduced in the new AG-UI snapshot
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: c95bdad5-35a8-4c94-b4e5-128dbd4d0f02
2026-11-24 · F1 settled: option B, deliver a buffered rejection when the error ends the run · iter -
- Decision: Reverted the spent-budget wait (option A, last_retry_spent in ModelRequestNode._stream_rejection). When an error escapes AgentRun._run_node_with_hooks (after wrap_node_run and on_node_run_error had their chance) and event_stream_buffer holds a ModelResponseRejectedEvent, the buffer goes to the run's event consumers through leftover_event_stream (capability chain,
@on_event, durable dispatch) and events_handler, then the error re-raises; any other failure leaves the buffer as main does. Manual iter() + node.stream() does not get it; docs/agent.md says so - Why: Maintainer verdict: Douwe's 'the step's stream waits for a verdict once the model stream ends' covers after_model_request, not wrap_model_request; main accepts the same iter() gap for leftover events (AgentRun._deliver_leftover_events, #13054); A moved stream-end, usage and span timing for every wrapped agent on its last output retry. No durable engine-specific code needed
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 0d5af64f-ff23-4bfd-b2bc-f0b28005e57a
- Supersedes: Late wrap_model_request retry on a spent budget
2026-11-24 · pre-push review 3 of 3 at c6f6b33b7796a60323c3bf9264765932959996d3 · iter -
- Decision: reserved: dispatching fresh reviewer (strong tier, Opus, effort high)
- Why: tree 51043f3542b3bc54dabc75392aeb18ef10bd0359; scope delta ffe418358a..c6f6b33b77 since reviewed tree ae81d25477, plus verifying review 2's F1 (resolved by option B), F2, F3; full branch 432437826277..c6f6b33b77 as context
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 0d5af64f-ff23-4bfd-b2bc-f0b28005e57a
2026-11-24 · pre-push review 3 of 3 at c6f6b33b7796a60323c3bf9264765932959996d3 · iter -
- Decision: remediated: F1, F2, F3 verified resolved; one new finding fixed with the reviewer's option (a): run_stream() raised a run-ending wrap_model_request rejection from its own async with node.stream() exit, outside _run_node_with_hooks, so its event_stream_handler and
@on_eventlisteners missed it while the docs said they get it. The rejection gate is now one AgentRun._deliver_rejection_on_failure context manager, used by _run_node_with_hooks and by run_stream around its iter() context; budget exhausted, pushing after local checks - Why: tree 51043f3542b3bc54dabc75392aeb18ef10bd0359; (a) keeps option B's gate and delivery and matches its consumer list and the docs; (b) would have documented run_stream() as a second gap. Not a regression: main has no rejection event. Reproduced: the new run_stream test (tool call and final text) fails without the fix. The context manager deletes self in finally, as the run's other frames do, so a cached traceback doesn't retain the run
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 0d5af64f-ff23-4bfd-b2bc-f0b28005e57a
2026-11-24 · Pushed eb8eb68dcc to the author's fork branch · iter -
- Decision: Fast-forward push aa46047763..eb8eb68dcc; body mirrors the decisions log and describes the run-ending rejection delivery; added area:streaming and area:ui-adapters
- Why: Review 3 remediation after budget exhaustion; HEAD equals the locally checked commit: make format, make lint, pyright, check_complexity.py, and targeted tests (rejection, reference cycles, on_event, pending messages, streaming, hooks, UI subsets, DBOS, Prefect, Temporal on 3.13) pass. No durable source code changed, so no area:durable-exec label; needs-durable-exec-review stays
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 0d5af64f-ff23-4bfd-b2bc-f0b28005e57a
2026-11-24 · Veria: StreamGuardrail forwarded the rejected response's parts unscreened (first regression) · iter -
- Decision: Do: StreamGuardrail.wrap_run_event_stream forwards ModelResponseRejectedEvent with the response's text, thinking and tool-call parts left out; the history keeps the original response. Pushed 89b43bfc82; replied, reacted +1 and resolved discussion_r4685498131
- Why: Reproduced with a redacting guard and an output-validator rejection: the handler got TextPart('SSN 123') while the stream showed '[redacted]'. On main no event carried the raw response, so this is the PR's first regression. Stripping needs no state across node streams (a late rejection arrives in the next request's stream, under a new hold) and no second guard call. UI adapters already send metadata only. Runtime delta after the review budget: pushed after targeted guardrail and rejection tests, make format, make lint; hosted reviewers cover the head
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#discussion_r4685498131
- Session: 0d5af64f-ff23-4bfd-b2bc-f0b28005e57a
2026-11-24 · HOLD at 89b43bfc82: stream attempts design moves to a central build · iter -
- Decision: Push nothing past 89b43bfc82; no douwebot label; no DouweM durable-exec request. Let the CI wait on 89b43bfc82 finish, report its result, and stop until the manager returns with a plan once Douwe's notes are on the PR
- Why: Douwe, relayed by the manager: "the stream attempts design (#13739 / #13731 / #11939) is bigger than I first thought (new core public API), so my agent will build it centrally; I'll leave notes on #11939 for what it needs (a patch gate, and the decoder change first)."
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 0d5af64f-ff23-4bfd-b2bc-f0b28005e57a
2026-11-24 · CI on 89b43bfc82 red: lowest-versions AG-UI dump test (held, not fixed) · iter -
- Decision: Not fixed under the hold. tests/test_ag_ui.py::test_rejected_run_dumps_its_history_with_the_rejected_response fails on 'test on 3.14 (lowest-versions, shard 1/2)': AGUIAdapter.dump_messages warns (UserWarning, error under filterwarnings) that ag-ui-protocol 0.1.10 predates encrypted_value. Proposed fix when the hold lifts: pass ag_ui_version='0.1.11' to that dump, as the sibling retry-feedback dump test does; test-only, exempt delta
- Why: The test came from 454d0abfdd (review-branch item 6); the retry feedback in its history rides on encrypted_value, and the default dump version on the lowest lane is the installed 0.1.10. The 'check' job fails only as the aggregator
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/45475060533/job/138733317806
- Session: 0d5af64f-ff23-4bfd-b2bc-f0b28005e57a
2026-11-24 · Douwe's notes: durable patch gate for the rejected-event dispatch, decoder PR first · iter -
- Decision: Plan approved by the overmanager for David at 2026-11-24 20:33Z. (1) In durable runs, ModelResponseRejectedEvent goes to event_stream_handler only when the engine's patch is active; otherwise it is still yielded and published, just not dispatched. Temporal uses workflow.patched('pydantic-ai-rejected-event-dispatch'), Douwe's name. DBOS uses DBOS.patch_async(), following durable_exec/dbos/_function_toolset.py. Prefect and the harness engines get the same gate or a version check. Stop and report any engine with no versioning mechanism before building. Tests: a Temporal replay of a pre-patch history, plus a gated-off test per engine. (2) The same push carries the test-only CI fix (ag_ui_version='0.1.11'). (3) Douwe opens the stream_agent_events skip-unknown-kinds decoder PR himself, and #11939's enqueue waits until it has merged. (4) Then CI, douwebot, and the durable-exec review request to DouweM; enqueue at the bar after the waiver byte check.
- Why: Douwe's 20:05Z comment: an extra durable dispatch that the same run didn't record before the upgrade makes replay of in-flight runs nondeterministic, and an older subscriber's decoder rejects an unknown event_kind.
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7143028793
- Session: 3cfcefc3-eff1-4e16-9ea1-aae214ac1065
2026-11-24 · Durable gate scope: Temporal and DBOS only; asked Douwe to confirm the rest · iter -
- Decision: Plan approved by the manager for David (dispatch 20:55Z): gate the rejected-event dispatch with patch id 'pydantic_ai:rejected_event_dispatch' on Temporal (workflow.patched) and DBOS (DBOS.patch_async); Prefect gets its own counter key for the rejection dispatch, no gate; Absurd, pgtask, Render no gate; AWS Lambda and Azure get a README upgrade note. Asked DouweM to confirm the four non-gate choices and the id; Temporal/DBOS gates and the CI fix 99e6087751 are built locally and not pushed until he answers
- Why: Only Temporal and DBOS have a patch primitive. Prefect replays from an input-keyed cache, so the extra task only shifts the shared event counter; Absurd and pgtask match steps by name plus a per-name counter, so only handler checkpoints shift; Render doesn't replay; Lambda (SDK 3.x) and Azure raise nondeterminism errors and have no per-change patch API, matching the token-count precedent (Temporal patch only, Azure README note). The id follows the existing pydantic_ai: patch ids
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7144250845
- Session: c89f401b-2045-46b1-9032-6c290df9cf61
- Supersedes: Douwe's notes: durable patch gate for the rejected-event dispatch, decoder PR first
2026-11-24 · Gate placement and DBOS probe per rejection (local 0f3e0fadef) · iter -
- Decision: The gate lives in each engine's _dispatch_event_stream_event override (Temporal new, DBOS existing, after its legacy inline branch), not a new base hook; DBOS calls DBOS.patch_async on each rejection with no per-workflow cache, and treats DBOSPatchNondeterminismError as unpatched; one constant REJECTED_EVENT_DISPATCH_PATCH in durable_exec/_base.py
- Why: Only two engines gate, so a base hook would be surface for nothing; legacy DBOS runs call the handler inline and record no step, so they need no gate; without a cache each rejection records its own marker and replays the same, and rejections are rare, so the toolset gate's cached future isn't worth copying; an interrupted probe records nothing and recovery's probe finds the sibling step there, so both take the unpatched branch
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7144250845
- Session: c89f401b-2045-46b1-9032-6c290df9cf61
2026-11-25 · Ownership confirmed by Douwe; push still held · iter -
- Decision: Douwe (via his agent and David, 2026-11-25 01:51Z) confirms #11939 stays with trusted-mgr, together with his patch-gate comment. #13739 and #13731 belong to his agents under #14378. The four per-engine choices in the 20:56Z reply are unanswered, so the push stays held.
- Why: Relayed by the manager
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7144250845
- Session: 3cfcefc3-eff1-4e16-9ea1-aae214ac1065
2026-11-25 · Attribution lines always (David correction) · iter -
- Decision: Every PR description opens with the aica-identity --kind pull-request line and ends with the harness session link. Every commit keeps its Claude-Session trailer. Comments, reviews, replies and issues keep the aica-identity line. Don't edit this PR's body just for this; add the lines on its next body update.
- Why: David, about 2026-11-25 05:5xZ: "we use attribution lines always". The earlier no-attribution rule never came from David.
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 3cfcefc3-eff1-4e16-9ea1-aae214ac1065
2026-11-26 · Douwe confirmed the four durable choices; DBOS gate added to his list · iter -
- Decision: DouweM: "yes to all four choices … as proposed". Prefect: own counter key, no gate, plus a test that a retried flow doesn't re-run the later event handlers. Absurd, pgtask, Render: no gate (READMEs' idempotent-handler requirement covers it). Lambda and Azure: upgrade note in each README; Lambda says SDK 1.x silently returns another step's result, 2.0+ raises. Temporal: id pydantic_ai:rejected_event_dispatch, one workflow.patched() call only for a rejected event, both branches kept, replay test from a pre-change history. DBOS: gate with DBOS.patch_async under the same id, only for a rejected event, in dbos/_durability.py following dbos/_function_toolset.py, test like tests/test_dbos.py's patch test
- Why: Answers the held 2026-11-24 20:56Z question; settles the per-engine scope and lifts the push hold
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7198076789
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
- Supersedes: Durable gate scope: Temporal and DBOS only; asked Douwe to confirm the rest
2026-11-26 · Merged main at e402a26729 · iter -
- Decision: Kept both sides in all five conflicts: ModelRequestNode fields (main's _lowered_authorities and its docstring beside _attempt_start and _rejection_feedback), main's _end_with_submitted_output beside the rejection helpers, _build_retry_node runs main's _discard_output_submitted_during_step before this PR's _reported_feedback lookup, CallToolsNode keeps _reject_response beside main's _events_for_response and _end_with_run_submission, and the import lines in temporal/_durability.py and result.py
- Why: Both sides added independent code at the same spots. Main's run submission doesn't meet the rejection path: an accepted submission skips handle_response, so no rejection is built, and a rejected submit_output raises ModelRetry to its hook, which is an ordinary after_model_request retry. Conflict resolution, so not an exempt delta; review budget spent: pushed after pyright on the three files and the rejection, DBOS, AG-UI, Vercel AI, streaming, capability-hook and stream-teardown suites
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-26 · Douwe's remaining durable points built · iter -
- Decision: Prefect: a ModelResponseRejectedEvent handler task counts on its own key,
pydantic_ai_rejected_event_sequence:<event key>, in PrefectOperationBackend.execute; test retries a flow whose first attempt didn't dispatch the rejection and pins that the tool events' handlers ran once. Lambda: the upgrade joins the 'Changing the shape of the run' list, whose SDK 2.0+ raises / 1.x serves another step's result sentences cover it. Azure: a 'Rejected responses reach the handler in an activity' bullet beside 'Token counts are activities'. Both in the README and its docs/harness twin. Temporal: added a topic test that the unpatched branch still publishes the event. DBOS: added a crash-and-recover test like the function-toolset patch test - Why: The Prefect test failed on the shared counter (the tool handlers ran again on retry) and passes with the own key. The DBOS recovery test fails with the gate removed (the pre-patch start records a handler step). The Temporal call shape (one workflow.patched() call, only for a rejected event), its replay test and the DBOS gate already matched his answer in 0f3e0fadef
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7198076789
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-26 · Push of 71513deb2a blocked: push approvals don't match the retry · iter -
- Decision: Not pushed. Each approved retry of the identical push opened a new approval in the local push gate; stopped for the manager instead of retrying
- Why: Same HEAD and command each time. Local checks passed on 71513deb2a: make format, make lint, pyright on the changed files, check_complexity.py --base upstream/main, a fresh contract manifest, and targeted tests (Prefect, DBOS, contract manifest and touched, rejection, AG-UI, Vercel AI, streaming, capability hooks, stream teardown, Temporal rejection tests on 3.13)
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-26 · Push still blocked: the identical retry opened a fourth approval · iter -
- Decision: Not pushed; stopped as instructed
- Why: Raising http.postBuffer, so git sends one unchunked body, didn't make the retry match either, so chunking isn't the cause
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-26 · HOLD: push of 71513deb2a waits on the push-gate fix · iter -
- Decision: Push nothing until the fix is relayed; keep 71513deb2a committed, with the drafted PR body and the reply to Douwe
- Why: The same blocker hits another fork's push; the gate is being fixed at its source
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-26 · Attribution: none in commits, aica-identity line in PR bodies (David) · iter -
- Decision: Commit messages carry no attribution trailer. PR bodies, comments, reviews, replies and issues open with the aica-identity line, and PR bodies also end with the session link. Pushed commits stay as they are
- Why: David: "no attribution in commits messages (though i dont really care). yes attribution in pr bodies!"
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
- Supersedes: Attribution lines always (David correction)
2026-11-26 · Attribution refined: commits keep the Claude-Session trailer, no Co-Authored-By · iter -
- Decision: Commit messages never carry Co-Authored-By, and keep the 'Claude-Session: ' trailer whenever the harness asks for it. PR bodies, comments, reviews, replies and issues: the aica-identity line first, and PR bodies end with the session link
- Why: David kept the Claude-Session trailer
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
- Supersedes: Attribution: none in commits, aica-identity line in PR bodies (David)
2026-11-26 · Push loop cause found · iter -
- Decision: When the hold lifts, send the push once with a timeout of at least 100 s, so the approval lands while the gate holds that same request
- Why: An approved push goes through only while the gate holds it (90 s), so each later retry of an approved push opened a new approval
- Source: https://github.com/pydantic/pydantic-ai/pull/11939
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-26 · Pushed 71513deb2a to the author's fork branch · iter -
- Decision: Fast-forward push 89b43bfc82..71513deb2a. Carries the Prefect own counter key, the Lambda and Azure upgrade notes, the Temporal and DBOS patch gates with their tests, the AG-UI lowest-versions test fix, and the merge of main at e402a26729; adds area:durable-exec
- Why: Douwe's answer lifted the hold; review budget spent, so pushed after the local checks in 'Push of 71513deb2a blocked'
- Source: https://github.com/pydantic/pydantic-ai/pull/11939#issuecomment-7198076789
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-26 · Merged main at df73c99793 so CI can run · iter -
- Decision: Merge d3049cb51a: the one conflict, the _agent_graph.py import block, keeps both sides (this PR's failed_attempt, main's _parts_manager imports and last_response_index). No change to the rejection path for main's ui_visibility (#14645): the rejection payload is metadata only, a 'private' part is never marked open so the rejection's synthetic part end can't close one, and 'redacted' changes only tool returns
- Why: 71513deb2a was conflicted with main, so no pull_request workflow ran on it. Conflict resolution, not an exempt delta; review budget spent: pushed after the pre-commit hooks, pyright on the 12 overlapping source files, check_complexity.py --base upstream/main, an unchanged contract manifest, and the rejection, AG-UI, Vercel AI, UI, UI tool visibility, streaming, capability hooks, stream teardown, DBOS, Prefect, durable compat and contract suites; Temporal left to CI
- Source: https://github.com/pydantic/pydantic-ai/pull/14645
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-26 · API check moved to v2.75.0: waiver bumped · iter -
- Decision: 34bde38f06 changes the waiver's "against" from v2.73.0 to v2.75.0, reason unchanged; the enqueue check now compares the waiver against blob 2defd708c3044034f2bf83f6816e2a20b03276e9
- Why: quality checks failed on d3049cb51a once v2.75.0 shipped: the check said 'waives it against v2.73.0; replace its contents with a waiver against v2.75.0'; check_api_compatibility.py --against v2.75.0 passes. The waiver stays on this PR per David's 2026-11-24 call
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/45908972351/job/140219382224
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
2026-11-27 · Waiver at v2.76.0 · iter -
- Decision: ea5e39dfb0 changes the waiver's "against" from v2.75.0 to v2.76.0, reason unchanged (blob 2992c74da89775a1910cf579a4ff30c8d1baa722); until this PR merges, a bump the API check asks for, touching only the "against" line and naming a published stable tag, is pushed without a separate sign-off
- Why: v2.76.0 shipped while CI ran on 34bde38f06; check_api_compatibility.py --against v2.76.0 passes on the merge with main
- Source: https://github.com/pydantic/pydantic-ai/actions/runs/45913295412/job/140231016289
- Session: 598b7cda-ca22-4e66-9e2b-dab4235e3708
Checklist
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
- PR title is fit for the release changelog.