Strands Agents Typescript SDK
    Preparing search index...

    Class AfterModelCallEvent

    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.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    type: "afterModelCallEvent" = ...
    agent: AgentData
    error?: Error
    retryModelCall?: boolean

    Optional 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.

    Methods