You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cdcee16
Browse filesBrowse the repository at this point in the historyBrowse files
Agents: a 409 that is no cancellation fails the turn; an approval denied with 'no' says so (#304)
* Agents: a 409 that is no cancellation fails the turn, rather than stopping it
A turn took any TerminalError with status 409 for Restate's cancellation,
and closed as stopped: but a call fails with 409 for other reasons too.
refund_graph.py's payout workflow, run a second time for an order, failed
with 409 'the workflow method was already invoked', and the turn said
'Cancelled: the turn was stopped before it finished.'. is_cancellation
takes Restate's cancellation error only: 409 'cancelled', which a stopped
turn fails with too. The same for a Pydantic AI tool's terminal error,
which the model now sees.
* Tests: a stopped turn fails with Restate's cancellation error, 409 'cancelled'
Three tests stood a TerminalError('stopped', 409) in for a stop. A stop,
or Restate cancelling the invocation, fails with 409 'cancelled', which
is_cancellation now tells from other 409s.
* Pydantic AI: an approval denied with 'no' tells the model the call was denied
Any text but an approving one denied the call, with that text as the
reason: a manager's 'no' reached the model as the call's result, and it
answered that 'the tool returned no'. A text that only says no ('no',
'denied', 'rejected'...) denies with Pydantic AI's own message, 'The
tool call was denied.'; any other text is still the reason.
0 commit comments