Enum: FinishReason
Reason the model stopped generating (mirrors provider conventions).
URI: dspy:FinishReason
Permissible Values
| Value | Meaning | Description |
|---|---|---|
| stop | None | Natural stop or end-of-text token |
| length | None | max_tokens reached |
| tool_calls | None | Model issued one or more tool calls |
| content_filter | None | Provider content filter triggered |
| function_call | None | Legacy function-call termination |
| refusal | None | Model refusal returned |
| other | None | Provider-specific reason not in this enum |
Slots
| Name | Description |
|---|---|
| finish_reason | Why the model stopped generating this candidate |
Identifier and Mapping Information
Schema Source
- from schema: https://w3id.org/lmodel/dspy
LinkML Source
name: FinishReason
description: Reason the model stopped generating (mirrors provider conventions).
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
permissible_values:
stop:
text: stop
description: Natural stop or end-of-text token.
length:
text: length
description: max_tokens reached.
tool_calls:
text: tool_calls
description: Model issued one or more tool calls.
content_filter:
text: content_filter
description: Provider content filter triggered.
function_call:
text: function_call
description: Legacy function-call termination.
refusal:
text: refusal
description: Model refusal returned.
other:
text: other
description: Provider-specific reason not in this enum.