InvokeLimits
Defined in: src/types/agent.ts:182
Limits for the request a top-level invoke() / stream() call starts. Each
is optional; omit a field for no limit on that dimension. Token limits count
every model call in the request, unlike a provider’s per-call maxTokens, and
are checked before each turn, so the last turn can go over a limit, more so
when nested calls run in parallel. See InvokeOptions.limits for what
they cover.
Properties
Section titled “Properties”turns?
Section titled “turns?”optional turns?: number;Defined in: src/types/agent.ts:184
Maximum turns (one model call plus the tool calls it requests) across the request.
outputTokens?
Section titled “outputTokens?”optional outputTokens?: number;Defined in: src/types/agent.ts:187
Maximum model-generated tokens across every model call in the request.
totalTokens?
Section titled “totalTokens?”optional totalTokens?: number;Defined in: src/types/agent.ts:190
Maximum input + output tokens across every model call in the request; input grows each turn, so this compounds.