import { z } from 'zod'; /** * Zod schema for a complete OpenAI Chat Completion response. * Validates the core fields that lumic-utils depends on. * Uses .passthrough() to allow additional fields from newer API versions. */ export declare const openAIChatCompletionSchema: z.ZodObject<{ id: z.ZodString; object: z.ZodLiteral<"chat.completion">; created: z.ZodNumber; model: z.ZodString; choices: z.ZodArray; content: z.ZodNullable; tool_calls: z.ZodOptional; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; arguments: string; }, { name: string; arguments: string; }>; }, "strip", z.ZodTypeAny, { function: { name: string; arguments: string; }; type: "function"; id: string; }, { function: { name: string; arguments: string; }; type: "function"; id: string; }>, "many">>; refusal: z.ZodOptional>; }, "strip", z.ZodTypeAny, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }>; finish_reason: z.ZodNullable>; }, "strip", z.ZodTypeAny, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }>, "many">; usage: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">>>; system_fingerprint: z.ZodOptional>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ id: z.ZodString; object: z.ZodLiteral<"chat.completion">; created: z.ZodNumber; model: z.ZodString; choices: z.ZodArray; content: z.ZodNullable; tool_calls: z.ZodOptional; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; arguments: string; }, { name: string; arguments: string; }>; }, "strip", z.ZodTypeAny, { function: { name: string; arguments: string; }; type: "function"; id: string; }, { function: { name: string; arguments: string; }; type: "function"; id: string; }>, "many">>; refusal: z.ZodOptional>; }, "strip", z.ZodTypeAny, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }>; finish_reason: z.ZodNullable>; }, "strip", z.ZodTypeAny, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }>, "many">; usage: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">>>; system_fingerprint: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ id: z.ZodString; object: z.ZodLiteral<"chat.completion">; created: z.ZodNumber; model: z.ZodString; choices: z.ZodArray; content: z.ZodNullable; tool_calls: z.ZodOptional; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; arguments: string; }, { name: string; arguments: string; }>; }, "strip", z.ZodTypeAny, { function: { name: string; arguments: string; }; type: "function"; id: string; }, { function: { name: string; arguments: string; }; type: "function"; id: string; }>, "many">>; refusal: z.ZodOptional>; }, "strip", z.ZodTypeAny, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }>; finish_reason: z.ZodNullable>; }, "strip", z.ZodTypeAny, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }>, "many">; usage: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">>>; system_fingerprint: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>; /** * Zod schema for an OpenAI Image Generation response. */ export declare const openAIImageResponseSchema: z.ZodObject<{ created: z.ZodNumber; data: z.ZodArray; b64_json: z.ZodOptional; revised_prompt: z.ZodOptional; }, "strip", z.ZodTypeAny, { url?: string | undefined; b64_json?: string | undefined; revised_prompt?: string | undefined; }, { url?: string | undefined; b64_json?: string | undefined; revised_prompt?: string | undefined; }>, "many">; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ created: z.ZodNumber; data: z.ZodArray; b64_json: z.ZodOptional; revised_prompt: z.ZodOptional; }, "strip", z.ZodTypeAny, { url?: string | undefined; b64_json?: string | undefined; revised_prompt?: string | undefined; }, { url?: string | undefined; b64_json?: string | undefined; revised_prompt?: string | undefined; }>, "many">; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ created: z.ZodNumber; data: z.ZodArray; b64_json: z.ZodOptional; revised_prompt: z.ZodOptional; }, "strip", z.ZodTypeAny, { url?: string | undefined; b64_json?: string | undefined; revised_prompt?: string | undefined; }, { url?: string | undefined; b64_json?: string | undefined; revised_prompt?: string | undefined; }>, "many">; }, z.ZodTypeAny, "passthrough">>; /** Type inferred from the Chat Completion schema */ export type OpenAIChatCompletion = z.infer; /** Type inferred from the Image Response schema */ export type OpenAIImageResponse = z.infer; /** Strict validator for OpenAI Chat Completion responses. Throws on failure. */ export declare const validateOpenAIChatCompletion: (data: unknown) => z.objectInputType<{ id: z.ZodString; object: z.ZodLiteral<"chat.completion">; created: z.ZodNumber; model: z.ZodString; choices: z.ZodArray; content: z.ZodNullable; tool_calls: z.ZodOptional; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; arguments: string; }, { name: string; arguments: string; }>; }, "strip", z.ZodTypeAny, { function: { name: string; arguments: string; }; type: "function"; id: string; }, { function: { name: string; arguments: string; }; type: "function"; id: string; }>, "many">>; refusal: z.ZodOptional>; }, "strip", z.ZodTypeAny, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }>; finish_reason: z.ZodNullable>; }, "strip", z.ZodTypeAny, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }>, "many">; usage: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">>>; system_fingerprint: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">; /** Safe validator for OpenAI Chat Completion responses. Never throws. */ export declare const safeValidateOpenAIChatCompletion: (data: unknown) => import("./validation-helpers").ValidationResult; created: z.ZodNumber; model: z.ZodString; choices: z.ZodArray; content: z.ZodNullable; tool_calls: z.ZodOptional; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; arguments: string; }, { name: string; arguments: string; }>; }, "strip", z.ZodTypeAny, { function: { name: string; arguments: string; }; type: "function"; id: string; }, { function: { name: string; arguments: string; }; type: "function"; id: string; }>, "many">>; refusal: z.ZodOptional>; }, "strip", z.ZodTypeAny, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }, { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }>; finish_reason: z.ZodNullable>; }, "strip", z.ZodTypeAny, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }, { message: { content: string | null; role: "function" | "system" | "user" | "assistant" | "tool"; tool_calls?: { function: { name: string; arguments: string; }; type: "function"; id: string; }[] | undefined; refusal?: string | null | undefined; }; index: number; finish_reason: "length" | "tool_calls" | "function_call" | "stop" | "content_filter" | null; }>, "many">; usage: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; prompt_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { cached_tokens?: number | undefined; }, { cached_tokens?: number | undefined; }>>; completion_tokens_details: z.ZodOptional; }, "strip", z.ZodTypeAny, { reasoning_tokens?: number | undefined; }, { reasoning_tokens?: number | undefined; }>>; }, z.ZodTypeAny, "passthrough">>>; system_fingerprint: z.ZodOptional>; }, z.ZodTypeAny, "passthrough">>;