Skip to content

FinishReason

Namespace: Vercel.AI.Provider

public enum FinishReason

Why a language-model call stopped.

View source

ContentFilter = 2

The provider filtered the content.

Value: FinishReason

View source

Error = 4

The call failed.

Value: FinishReason

View source

Interrupted = 6

The provider stream ended without a completion signal. Output may be incomplete.

Value: FinishReason

View source

Length = 1

The output token limit was reached.

Value: FinishReason

View source

Other = 5

A provider-specific reason.

Value: FinishReason

View source

Stop = 0

The model finished naturally.

Value: FinishReason

View source

ToolCalls = 3

The model called one or more tools.

Value: FinishReason

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product