/** * Zod schemas for the OpenAI chat-completions request shape we accept on the * gateway. Mirrors https://platform.openai.com/docs/api-reference/chat — only * the shapes the gateway translation layer understands. Unknown fields on * permissive objects are accepted-and-stripped (via `z.unknown()` passthroughs * or `.loose()`) so the official OpenAI SDK — which sends a growing pile of * non-strict defaults (e.g. `stream_options.include_obfuscation`) — does not * trip 400s on shapes we simply ignore. */ import type { ChatCompletionContentPart, ChatCompletionCreateParams, ChatCompletionMessageParam, ChatCompletionMessageToolCall, ChatCompletionTool, ChatCompletionToolChoiceOption } from "openai/resources/chat/completions"; import * as z from "zod/v4"; export declare const textPartSchema: z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>; /** * OpenAI documents `image_url` as either `{ url: string, detail?: ... }` or — * older clients — a bare string. Accept both shapes; downstream we extract a * URL. `detail` is accepted for forward-compat but currently dropped (pi-ai's * `ImageContent` has no detail field — TODO: plumb through if/when added). */ export declare const imagePartSchema: z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>; /** OpenAI audio input block (gpt-4o-audio). Accepted; currently dropped downstream. */ export declare const inputAudioPartSchema: z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>; /** OpenAI file input block (file_search / vision-document). Accepted; currently dropped downstream. */ export declare const filePartSchema: z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; /** Replayed assistant refusal block. Accepted; currently dropped downstream. */ export declare const refusalPartSchema: z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>; /** * Forward-compat catch-all for unknown content-part types. Matches every other * `{ type: string, ... }` object so a new OpenAI block kind does not 400 the * whole request; the walker ignores parts whose `type` it does not know. */ export declare const unknownPartSchema: z.ZodObject<{ type: z.ZodString; }, z.core.$loose>; export declare const userContentPartSchema: z.ZodUnion; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>; export declare const toolCallSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodOptional>; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; export declare const toolSchema: z.ZodObject<{ type: z.ZodLiteral<"function">; function: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; parameters: z.ZodOptional>; strict: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; export declare const toolChoiceSchema: z.ZodUnion, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{ type: z.ZodLiteral<"function">; function: z.ZodObject<{ name: z.ZodString; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool">; name: z.ZodString; }, z.core.$strip>]>; export declare const systemMessageSchema: z.ZodObject<{ role: z.ZodLiteral<"system">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>; export declare const developerMessageSchema: z.ZodObject<{ role: z.ZodLiteral<"developer">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>; export declare const userMessageSchema: z.ZodObject<{ role: z.ZodLiteral<"user">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>; export declare const assistantMessageSchema: z.ZodObject<{ role: z.ZodLiteral<"assistant">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>>, z.ZodTransform | undefined, string | ({ type: "text"; text: string; } | { type: "image_url"; image_url: string | { url: string; detail?: "auto" | "high" | "low" | undefined; }; } | { type: "input_audio"; input_audio: { data: string; format: "mp3" | "wav"; }; } | { type: "file"; file: { file_id?: string | undefined; filename?: string | undefined; file_data?: string | undefined; }; } | { type: "refusal"; refusal: string; } | { [x: string]: unknown; type: string; })[] | null | undefined>>; tool_calls: z.ZodPipe>; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, z.core.$strip>; }, z.core.$strip>>>>, z.ZodTransform<{ id: string; type?: "function" | undefined; function: { name: string; arguments: string; }; }[] | undefined, { id: string; type?: "function" | undefined; function: { name: string; arguments: string; }; }[] | null | undefined>>; }, z.core.$strip>; export declare const toolMessageSchema: z.ZodObject<{ role: z.ZodLiteral<"tool">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>>, z.ZodTransform | undefined, string | ({ type: "text"; text: string; } | { type: "image_url"; image_url: string | { url: string; detail?: "auto" | "high" | "low" | undefined; }; } | { type: "input_audio"; input_audio: { data: string; format: "mp3" | "wav"; }; } | { type: "file"; file: { file_id?: string | undefined; filename?: string | undefined; file_data?: string | undefined; }; } | { type: "refusal"; refusal: string; } | { [x: string]: unknown; type: string; })[] | null | undefined>>; tool_call_id: z.ZodPipe>, z.ZodTransform>; }, z.core.$strip>; /** * Legacy `function` role (pre-tools API). Translated to a `tool` role * canonical message in the walker so downstream providers see one shape. */ export declare const functionMessageSchema: z.ZodObject<{ role: z.ZodLiteral<"function">; name: z.ZodString; content: z.ZodNullable; }, z.core.$strip>; export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ role: z.ZodLiteral<"system">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"developer">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"user">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"assistant">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>>, z.ZodTransform | undefined, string | ({ type: "text"; text: string; } | { type: "image_url"; image_url: string | { url: string; detail?: "auto" | "high" | "low" | undefined; }; } | { type: "input_audio"; input_audio: { data: string; format: "mp3" | "wav"; }; } | { type: "file"; file: { file_id?: string | undefined; filename?: string | undefined; file_data?: string | undefined; }; } | { type: "refusal"; refusal: string; } | { [x: string]: unknown; type: string; })[] | null | undefined>>; tool_calls: z.ZodPipe>; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, z.core.$strip>; }, z.core.$strip>>>>, z.ZodTransform<{ id: string; type?: "function" | undefined; function: { name: string; arguments: string; }; }[] | undefined, { id: string; type?: "function" | undefined; function: { name: string; arguments: string; }; }[] | null | undefined>>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"tool">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>>, z.ZodTransform | undefined, string | ({ type: "text"; text: string; } | { type: "image_url"; image_url: string | { url: string; detail?: "auto" | "high" | "low" | undefined; }; } | { type: "input_audio"; input_audio: { data: string; format: "mp3" | "wav"; }; } | { type: "file"; file: { file_id?: string | undefined; filename?: string | undefined; file_data?: string | undefined; }; } | { type: "refusal"; refusal: string; } | { [x: string]: unknown; type: string; })[] | null | undefined>>; tool_call_id: z.ZodPipe>, z.ZodTransform>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"function">; name: z.ZodString; content: z.ZodNullable; }, z.core.$strip>], "role">; /** * Permissive: the official OpenAI SDK sets `include_obfuscation: false` by * default. We only consume `include_usage`, so unknown keys are silently * stripped rather than 400'd. */ export declare const streamOptionsSchema: z.ZodObject<{ include_usage: z.ZodOptional; }, z.core.$strip>; export declare const stopSchema: z.ZodUnion]>; export declare const openaiChatRequestSchema: z.ZodObject<{ model: z.ZodString; messages: z.ZodArray; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"developer">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"user">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>, z.ZodTransform>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"assistant">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>>, z.ZodTransform | undefined, string | ({ type: "text"; text: string; } | { type: "image_url"; image_url: string | { url: string; detail?: "auto" | "high" | "low" | undefined; }; } | { type: "input_audio"; input_audio: { data: string; format: "mp3" | "wav"; }; } | { type: "file"; file: { file_id?: string | undefined; filename?: string | undefined; file_data?: string | undefined; }; } | { type: "refusal"; refusal: string; } | { [x: string]: unknown; type: string; })[] | null | undefined>>; tool_calls: z.ZodPipe>; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, z.core.$strip>; }, z.core.$strip>>>>, z.ZodTransform<{ id: string; type?: "function" | undefined; function: { name: string; arguments: string; }; }[] | undefined, { id: string; type?: "function" | undefined; function: { name: string; arguments: string; }; }[] | null | undefined>>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"tool">; content: z.ZodPipe; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion>; }, z.core.$strip>]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"input_audio">; input_audio: z.ZodObject<{ data: z.ZodString; format: z.ZodEnum<{ mp3: "mp3"; wav: "wav"; }>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodObject<{ file_id: z.ZodOptional; filename: z.ZodOptional; file_data: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"refusal">; refusal: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodString; }, z.core.$loose>]>>]>>>, z.ZodTransform | undefined, string | ({ type: "text"; text: string; } | { type: "image_url"; image_url: string | { url: string; detail?: "auto" | "high" | "low" | undefined; }; } | { type: "input_audio"; input_audio: { data: string; format: "mp3" | "wav"; }; } | { type: "file"; file: { file_id?: string | undefined; filename?: string | undefined; file_data?: string | undefined; }; } | { type: "refusal"; refusal: string; } | { [x: string]: unknown; type: string; })[] | null | undefined>>; tool_call_id: z.ZodPipe>, z.ZodTransform>; }, z.core.$strip>, z.ZodObject<{ role: z.ZodLiteral<"function">; name: z.ZodString; content: z.ZodNullable; }, z.core.$strip>], "role">>; tools: z.ZodPipe; function: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; parameters: z.ZodOptional>; strict: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>>>>, z.ZodTransform<{ type: "function"; function: { name: string; description?: string | undefined; parameters?: Record | undefined; strict?: boolean | undefined; }; }[] | undefined, { type: "function"; function: { name: string; description?: string | undefined; parameters?: Record | undefined; strict?: boolean | undefined; }; }[] | null | undefined>>; tool_choice: z.ZodPipe, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{ type: z.ZodLiteral<"function">; function: z.ZodObject<{ name: z.ZodString; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool">; name: z.ZodString; }, z.core.$strip>]>>>, z.ZodTransform | undefined, "auto" | "none" | "required" | { type: "function"; function: { name: string; }; } | { type: "tool"; name: string; } | null | undefined>>; max_tokens: z.ZodPipe>, z.ZodTransform>; max_completion_tokens: z.ZodPipe>, z.ZodTransform>; temperature: z.ZodPipe>, z.ZodTransform>; top_p: z.ZodPipe>, z.ZodTransform>; stop: z.ZodPipe]>>>, z.ZodTransform | undefined, string | string[] | null | undefined>>; stream: z.ZodPipe>, z.ZodTransform>; stream_options: z.ZodPipe; }, z.core.$strip>>>, z.ZodTransform<{ include_usage?: boolean | undefined; } | undefined, { include_usage?: boolean | undefined; } | null | undefined>>; response_format: z.ZodOptional; seed: z.ZodPipe>, z.ZodTransform>; presence_penalty: z.ZodPipe>, z.ZodTransform>; frequency_penalty: z.ZodPipe>, z.ZodTransform>; logit_bias: z.ZodPipe>>, z.ZodTransform | undefined, Record | null | undefined>>; user: z.ZodPipe>, z.ZodTransform>; reasoning_effort: z.ZodPipe>>, z.ZodTransform | undefined, "high" | "low" | "max" | "medium" | "minimal" | "xhigh" | null | undefined>>; parallel_tool_calls: z.ZodPipe>, z.ZodTransform>; service_tier: z.ZodPipe>>, z.ZodTransform | undefined, "auto" | "default" | "flex" | "priority" | "scale" | null | undefined>>; metadata: z.ZodPipe>>, z.ZodTransform | undefined, Record | null | undefined>>; logprobs: z.ZodOptional; top_logprobs: z.ZodOptional; prediction: z.ZodOptional; modalities: z.ZodOptional; audio: z.ZodOptional; store: z.ZodOptional; prompt_cache_key: z.ZodOptional; safety_identifier: z.ZodOptional; n: z.ZodOptional; web_search_options: z.ZodOptional; }, z.core.$strip>; /** * Public types are sourced from the OpenAI SDK so the gateway stays in * lock-step with the canonical API surface; the schemas above are runtime * validators for the subset we actually accept. */ export type OpenAIChatRequest = ChatCompletionCreateParams; export type OpenAIChatMessage = ChatCompletionMessageParam; export type OpenAIChatToolCall = ChatCompletionMessageToolCall; export type OpenAIChatTool = ChatCompletionTool; export type OpenAIChatToolChoice = ChatCompletionToolChoiceOption; export type OpenAIChatContentPart = ChatCompletionContentPart;