Documentation / @agentick/shared / StopReason
Enumeration: StopReason ​
Defined in: streaming.ts:119
Stop reason enumeration. Defines why model generation stopped.
Key distinction:
- NATURAL_COMPLETION: Model decided to stop (maps to provider's end_turn, stop, etc.)
- EXPLICIT_COMPLETION: Engine/runtime requested the stop (max ticks, abort, etc.)
Usage by layer:
- ModelStreamEvent (message_end): Model's stop reason (TOOL_USE, MAX_TOKENS, NATURAL_COMPLETION)
- OrchestrationStreamEvent (execution): May be EXPLICIT_COMPLETION if engine stopped early
Enumeration Members ​
CONTENT_FILTER ​
CONTENT_FILTER:
"content_filter"
Defined in: streaming.ts:122
EMPTY_RESPONSE ​
EMPTY_RESPONSE:
"empty_response"
Defined in: streaming.ts:130
ERROR ​
ERROR:
"error"
Defined in: streaming.ts:134
EXPLICIT_COMPLETION ​
EXPLICIT_COMPLETION:
"explicit_completion"
Defined in: streaming.ts:132
FORMAT_ERROR ​
FORMAT_ERROR:
"format_error"
Defined in: streaming.ts:129
FUNCTION_CALL ​
FUNCTION_CALL:
"function_call"
Defined in: streaming.ts:124
MAX_TOKENS ​
MAX_TOKENS:
"max_tokens"
Defined in: streaming.ts:120
NATURAL_COMPLETION ​
NATURAL_COMPLETION:
"natural_completion"
Defined in: streaming.ts:133
NO_CONTENT ​
NO_CONTENT:
"no_content"
Defined in: streaming.ts:131
OTHER ​
OTHER:
"other"
Defined in: streaming.ts:126
PAUSED ​
PAUSED:
"paused"
Defined in: streaming.ts:128
STOP ​
STOP:
"stop"
Defined in: streaming.ts:127
STOP_SEQUENCE ​
STOP_SEQUENCE:
"stop_sequence"
Defined in: streaming.ts:121
TOOL_USE ​
TOOL_USE:
"tool_use"
Defined in: streaming.ts:123
UNSPECIFIED ​
UNSPECIFIED:
"unspecified"
Defined in: streaming.ts:125