ReadonlytypeReadonlyagentOptional ReadonlystopOptional ReadonlyerrorOptionalretryOptional flag that can be set by hook callbacks to request a retry of the model call. Only valid when an error is present. When set to true, the agent will retry the model invocation. Typically used after reducing context size in response to a ContextWindowOverflowError.
Event triggered after the model invocation completes. Fired after the model finishes generating a response, whether successful or failed. Uses reverse callback ordering for proper cleanup semantics.
Note: stopData may be undefined if an error occurs before the model completes.