Module Ai_provider.Finish_reasonSource

Reason why model generation finished.

Sourcetype t =
  1. | Stop
  2. | Length
  3. | Tool_calls
  4. | Content_filter
  5. | Error
  6. | Other of string
  7. | Unknown
Sourceval to_string : t -> string

Serializes to the upstream AI SDK v6 hyphenated format (e.g. "tool-calls", "content-filter", "other"). Matches the Zod enum in ui-message-chunks.ts.

Sourceval of_string : string -> t