StopReason#

Understand request ownership, phases, and runtime limits. See the guide.

class zett_agent.stop.StopReason(*values)[源代码]#

Provider-neutral reason a model step ended.

Only END_TURN and TOOL_USE are normal. Everything else means the output may be incomplete, absent, or not what the model would have said.

END_TURN = 'end_turn'#

The model finished its answer, or hit a stop sequence you set.

TOOL_USE = 'tool_use'#

The model asked for tools to run.

MAX_OUTPUT = 'max_output'#

The output limit was reached; the text, or a tool call's arguments, is cut off.

CONTEXT_FULL = 'context_full'#

The context window was filled; the output is cut off.

REFUSAL = 'refusal'#

The model, or a safety system in front of it, declined. The output is partial or empty, and a tool call that came with it is withheld.

PAUSED = 'paused'#

The provider handed control back and wants the turn continued, as Anthropic does when a server-tool loop reaches its limit.

INTERRUPTED = 'interrupted'#

the provider failed, dropped the stream, or ran out of capacity. It is not a decision of the model, so the output cannot be trusted to be complete and a tool call that came with it is withheld.

Type:

Infrastructure ended the response

OTHER = 'other'#

A value this library does not know. StopInfo.raw holds it unchanged.