InvokeLimits
Defined in: src/types/agent.ts:184
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?”turns?: number;Defined in: src/types/agent.ts:186
Maximum turns (one model call plus the tool calls it requests) across the request.
outputTokens?
Section titled “outputTokens?”outputTokens?: number;Defined in: src/types/agent.ts:189
Maximum model-generated tokens across every model call in the request.
totalTokens?
Section titled “totalTokens?”totalTokens?: number;Defined in: src/types/agent.ts:192
Maximum input + output tokens across every model call in the request; input grows each turn, so this compounds.