FinishReason
Namespace: Vercel.AI.Provider
public enum FinishReasonWhy a language-model call stopped.
Fields
Section titled “Fields”ContentFilter
Section titled “ContentFilter”ContentFilter = 2The provider filtered the content.
Value: FinishReason
Error = 4The call failed.
Value: FinishReason
Interrupted
Section titled “Interrupted”Interrupted = 6The provider stream ended without a completion signal. Output may be incomplete.
Value: FinishReason
Length
Section titled “Length”Length = 1The output token limit was reached.
Value: FinishReason
Other = 5A provider-specific reason.
Value: FinishReason
Stop = 0The model finished naturally.
Value: FinishReason
ToolCalls
Section titled “ToolCalls”ToolCalls = 3The model called one or more tools.
Value: FinishReason
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product