FinishReason enum

Reason a model stopped generating per OTEL gen-ai semantic conventions.

Fields

CONTENT_FILTER

Generation was stopped by a content filter.

ERROR

Generation stopped because of an error.

LENGTH

Generation stopped because the maximum token limit was reached.

STOP

The model reached a natural stopping point or a provided stop sequence.

TOOL_CALL

The model emitted a tool call and is awaiting its result.