Docs
CodeRabbit
Cloudflare
Railway
OpenRouter
Clerk
AG Grid
Netlify
WorkOS
SerpAPI
Unkey
Prisma
Sentry
Electric
CodeRabbit
Cloudflare
Railway
OpenRouter
Clerk
AG Grid
Netlify
WorkOS
SerpAPI
Unkey
Prisma
Sentry
Electric
Class References
Function References
Interface References
Type Alias References
Variable References

StructuredOutputPart

Interface: StructuredOutputPart<TData>

Defined in: packages/ai/src/types.ts:403

StructuredOutputPart — a typed structured response attached to the assistant message that produced it. Generic over the schema-inferred data type so consumers can thread 's schema all the way down to . Defaults to so untyped consumers (e.g. internal codepaths that don't know about TSchema) keep working.

Type Parameters

TData

=

Properties

data?

ts
optional data: TData;
optional data: TData;

Defined in: packages/ai/src/types.ts:409

Validated final object — only set when .


errorMessage?

ts
optional errorMessage: string;
optional errorMessage: string;

Defined in: packages/ai/src/types.ts:415

Populated when .


partial?

ts
optional partial: DeepPartial<TData>;
optional partial: DeepPartial<TData>;

Defined in: packages/ai/src/types.ts:407

Progressive parse of via parsePartialJSON — populated while streaming and after complete.


raw

ts
raw: string;
raw: string;

Defined in: packages/ai/src/types.ts:411

Accumulating JSON buffer. Source of truth for wire round-trip.


reasoning?

ts
optional reasoning: string;
optional reasoning: string;

Defined in: packages/ai/src/types.ts:413

Optional chain-of-thought surfaced by reasoning models alongside the structured output.


status

ts
status: "error" | "complete" | "streaming";
status: "error" | "complete" | "streaming";

Defined in: packages/ai/src/types.ts:405


type

ts
type: "structured-output";
type: "structured-output";

Defined in: packages/ai/src/types.ts:404