Interface GenerateObjectResult<T>

The completed result returned by generateObject.

interface GenerateObjectResult<T> {
    object: T;
    text: string;
    usage: TokenUsage;
    finishReason: string;
    provider: string;
    model: string;
}

Type Parameters

  • T

    The inferred type from the Zod schema, representing the validated object.

Properties

object: T

The parsed, Zod-validated object matching the provided schema.

text: string

The raw LLM output text before parsing.

usage: TokenUsage

Aggregated token usage across all attempts (including retries).

finishReason: string

Reason the model stopped generating on the final successful attempt. Mirrors the finish reasons from generateText.

provider: string

Provider identifier used for the run.

model: string

Resolved model identifier used for the run.