Skip to content

ToolResultTrimmingMode

When the results of earlier tool calls are replaced, to save space in the conversation.

Kind: a string enum, used in requests and responses.

ValueDescription
"Never"Never: tool results are kept as they came back.
"OnOverflow"When the conversation no longer fits the context window.
"AfterCycles"Once an agent has had a set number of turns: every result but the latest.
"Both"Both: after a set number of turns, and whenever the conversation no longer fits.

New values can appear, so treat one you don’t know as “something else”, not as an error.