UNPKG

@mastra/core

Version:
15 lines • 953 B
import type { SharedProviderOptions } from '../../llm/model/shared.types.js'; import { toStandardSchema } from '../../schema/index.js'; import { usesOpenAIStrictJsonSchema } from '../../stream/aisdk/v5/execute.js'; type StrictModel = Parameters<typeof usesOpenAIStrictJsonSchema>[0]; /** * Mirrors the check in `Agent.#execute`: OpenAI-style strict JSON schema models answer * omitted optional fields with `null`, so the live schema must map `null` back to `undefined`. */ export declare function needsNullToUndefined(model: StrictModel & { modelId?: string; }, providerOptions?: SharedProviderOptions): boolean; /** Builds a live standard schema from a persisted JSON Schema, applying the null transform when flagged. */ export declare function toLiveStructuredOutputSchema<T = unknown>(schema: unknown, nullToUndefined?: boolean): ReturnType<typeof toStandardSchema<T>>; export {}; //# sourceMappingURL=structured-output-null-transform.d.ts.map