Async iterable yielding partial objects as the LLM builds the JSON
response token by token. Each yielded value has the same shape as T
but with all fields optional (DeepPartial).
for await (const partial of result.partialObjectStream) {
console.log('partial:', partial);
}
Resolves to the final Zod-validated object when the stream completes.
When the final JSON fails validation.
Resolves to the raw text when the stream completes.
Resolves to aggregated token usage when the stream completes.
The result object returned immediately by streamObject.
Consumers iterate
partialObjectStreamfor incremental partial objects, orawaitthe promise properties for the final validated result.