@gajae-code/ai 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2644 -0
- package/README.md +1181 -0
- package/dist/types/api-registry.d.ts +30 -0
- package/dist/types/auth-broker/client.d.ts +66 -0
- package/dist/types/auth-broker/index.d.ts +5 -0
- package/dist/types/auth-broker/refresher.d.ts +25 -0
- package/dist/types/auth-broker/remote-store.d.ts +96 -0
- package/dist/types/auth-broker/server.d.ts +32 -0
- package/dist/types/auth-broker/types.d.ts +105 -0
- package/dist/types/auth-broker/wire-schemas.d.ts +412 -0
- package/dist/types/auth-gateway/http.d.ts +39 -0
- package/dist/types/auth-gateway/index.d.ts +3 -0
- package/dist/types/auth-gateway/server.d.ts +17 -0
- package/dist/types/auth-gateway/types.d.ts +115 -0
- package/dist/types/auth-storage.d.ts +641 -0
- package/dist/types/cli.d.ts +2 -0
- package/dist/types/index.d.ts +49 -0
- package/dist/types/model-cache.d.ts +17 -0
- package/dist/types/model-manager.d.ts +62 -0
- package/dist/types/model-thinking.d.ts +71 -0
- package/dist/types/models.d.ts +12 -0
- package/dist/types/provider-details.d.ts +24 -0
- package/dist/types/provider-models/bundled-references.d.ts +4 -0
- package/dist/types/provider-models/descriptors.d.ts +48 -0
- package/dist/types/provider-models/google.d.ts +20 -0
- package/dist/types/provider-models/index.d.ts +5 -0
- package/dist/types/provider-models/ollama.d.ts +7 -0
- package/dist/types/provider-models/openai-compat.d.ts +237 -0
- package/dist/types/provider-models/special.d.ts +16 -0
- package/dist/types/providers/amazon-bedrock.d.ts +36 -0
- package/dist/types/providers/anthropic-messages-server-schema.d.ts +450 -0
- package/dist/types/providers/anthropic-messages-server.d.ts +17 -0
- package/dist/types/providers/anthropic.d.ts +188 -0
- package/dist/types/providers/aws-credentials.d.ts +43 -0
- package/dist/types/providers/aws-eventstream.d.ts +38 -0
- package/dist/types/providers/aws-sigv4.d.ts +55 -0
- package/dist/types/providers/azure-openai-responses.d.ts +15 -0
- package/dist/types/providers/cursor/gen/agent_pb.d.ts +13022 -0
- package/dist/types/providers/cursor.d.ts +42 -0
- package/dist/types/providers/error-message.d.ts +27 -0
- package/dist/types/providers/github-copilot-headers.d.ts +40 -0
- package/dist/types/providers/gitlab-duo.d.ts +27 -0
- package/dist/types/providers/google-auth.d.ts +24 -0
- package/dist/types/providers/google-gemini-cli.d.ts +72 -0
- package/dist/types/providers/google-gemini-headers.d.ts +18 -0
- package/dist/types/providers/google-shared.d.ts +163 -0
- package/dist/types/providers/google-types.d.ts +138 -0
- package/dist/types/providers/google-vertex.d.ts +7 -0
- package/dist/types/providers/google.d.ts +4 -0
- package/dist/types/providers/grammar.d.ts +1 -0
- package/dist/types/providers/kimi.d.ts +27 -0
- package/dist/types/providers/mock.d.ts +175 -0
- package/dist/types/providers/ollama.d.ts +6 -0
- package/dist/types/providers/openai-anthropic-shim.d.ts +31 -0
- package/dist/types/providers/openai-chat-server-schema.d.ts +814 -0
- package/dist/types/providers/openai-chat-server.d.ts +16 -0
- package/dist/types/providers/openai-codex/constants.d.ts +26 -0
- package/dist/types/providers/openai-codex/request-transformer.d.ts +49 -0
- package/dist/types/providers/openai-codex/response-handler.d.ts +17 -0
- package/dist/types/providers/openai-codex-responses.d.ts +67 -0
- package/dist/types/providers/openai-completions-compat.d.ts +25 -0
- package/dist/types/providers/openai-completions.d.ts +33 -0
- package/dist/types/providers/openai-responses-server-schema.d.ts +392 -0
- package/dist/types/providers/openai-responses-server.d.ts +17 -0
- package/dist/types/providers/openai-responses-shared.d.ts +89 -0
- package/dist/types/providers/openai-responses.d.ts +32 -0
- package/dist/types/providers/pi-native-client.d.ts +13 -0
- package/dist/types/providers/pi-native-server.d.ts +68 -0
- package/dist/types/providers/register-builtins.d.ts +31 -0
- package/dist/types/providers/synthetic.d.ts +26 -0
- package/dist/types/providers/transform-messages.d.ts +12 -0
- package/dist/types/providers/vision-guard.d.ts +8 -0
- package/dist/types/rate-limit-utils.d.ts +19 -0
- package/dist/types/stream.d.ts +24 -0
- package/dist/types/types.d.ts +746 -0
- package/dist/types/usage/claude.d.ts +3 -0
- package/dist/types/usage/gemini.d.ts +2 -0
- package/dist/types/usage/github-copilot.d.ts +7 -0
- package/dist/types/usage/google-antigravity.d.ts +2 -0
- package/dist/types/usage/kimi.d.ts +2 -0
- package/dist/types/usage/minimax-code.d.ts +2 -0
- package/dist/types/usage/openai-codex.d.ts +3 -0
- package/dist/types/usage/shared.d.ts +1 -0
- package/dist/types/usage/zai.d.ts +2 -0
- package/dist/types/usage.d.ts +258 -0
- package/dist/types/utils/abort.d.ts +19 -0
- package/dist/types/utils/anthropic-auth.d.ts +31 -0
- package/dist/types/utils/discovery/antigravity.d.ts +61 -0
- package/dist/types/utils/discovery/codex.d.ts +38 -0
- package/dist/types/utils/discovery/cursor.d.ts +23 -0
- package/dist/types/utils/discovery/gemini.d.ts +25 -0
- package/dist/types/utils/discovery/index.d.ts +4 -0
- package/dist/types/utils/discovery/openai-compatible.d.ts +72 -0
- package/dist/types/utils/event-stream.d.ts +28 -0
- package/dist/types/utils/fireworks-model-id.d.ts +10 -0
- package/dist/types/utils/foundry.d.ts +1 -0
- package/dist/types/utils/h2-fetch.d.ts +22 -0
- package/dist/types/utils/http-inspector.d.ts +31 -0
- package/dist/types/utils/idle-iterator.d.ts +67 -0
- package/dist/types/utils/json-parse.d.ts +10 -0
- package/dist/types/utils/oauth/alibaba-coding-plan.d.ts +18 -0
- package/dist/types/utils/oauth/anthropic.d.ts +22 -0
- package/dist/types/utils/oauth/api-key-login.d.ts +35 -0
- package/dist/types/utils/oauth/api-key-validation.d.ts +27 -0
- package/dist/types/utils/oauth/callback-server.d.ts +57 -0
- package/dist/types/utils/oauth/cerebras.d.ts +1 -0
- package/dist/types/utils/oauth/cloudflare-ai-gateway.d.ts +18 -0
- package/dist/types/utils/oauth/cursor.d.ts +15 -0
- package/dist/types/utils/oauth/deepseek.d.ts +10 -0
- package/dist/types/utils/oauth/firepass.d.ts +1 -0
- package/dist/types/utils/oauth/fireworks.d.ts +1 -0
- package/dist/types/utils/oauth/github-copilot.d.ts +38 -0
- package/dist/types/utils/oauth/gitlab-duo.d.ts +3 -0
- package/dist/types/utils/oauth/google-antigravity.d.ts +11 -0
- package/dist/types/utils/oauth/google-gemini-cli.d.ts +10 -0
- package/dist/types/utils/oauth/google-oauth-shared.d.ts +28 -0
- package/dist/types/utils/oauth/huggingface.d.ts +19 -0
- package/dist/types/utils/oauth/index.d.ts +38 -0
- package/dist/types/utils/oauth/kagi.d.ts +17 -0
- package/dist/types/utils/oauth/kilo.d.ts +5 -0
- package/dist/types/utils/oauth/kimi.d.ts +21 -0
- package/dist/types/utils/oauth/litellm.d.ts +18 -0
- package/dist/types/utils/oauth/lm-studio.d.ts +17 -0
- package/dist/types/utils/oauth/minimax-code.d.ts +28 -0
- package/dist/types/utils/oauth/moonshot.d.ts +1 -0
- package/dist/types/utils/oauth/nanogpt.d.ts +1 -0
- package/dist/types/utils/oauth/nvidia.d.ts +18 -0
- package/dist/types/utils/oauth/ollama-cloud.d.ts +2 -0
- package/dist/types/utils/oauth/ollama.d.ts +18 -0
- package/dist/types/utils/oauth/openai-codex.d.ts +21 -0
- package/dist/types/utils/oauth/opencode.d.ts +18 -0
- package/dist/types/utils/oauth/parallel.d.ts +17 -0
- package/dist/types/utils/oauth/perplexity.d.ts +9 -0
- package/dist/types/utils/oauth/pkce.d.ts +8 -0
- package/dist/types/utils/oauth/qianfan.d.ts +17 -0
- package/dist/types/utils/oauth/qwen-portal.d.ts +19 -0
- package/dist/types/utils/oauth/synthetic.d.ts +1 -0
- package/dist/types/utils/oauth/tavily.d.ts +17 -0
- package/dist/types/utils/oauth/together.d.ts +1 -0
- package/dist/types/utils/oauth/types.d.ts +44 -0
- package/dist/types/utils/oauth/venice.d.ts +18 -0
- package/dist/types/utils/oauth/vercel-ai-gateway.d.ts +18 -0
- package/dist/types/utils/oauth/vllm.d.ts +16 -0
- package/dist/types/utils/oauth/xiaomi.d.ts +19 -0
- package/dist/types/utils/oauth/zai.d.ts +18 -0
- package/dist/types/utils/oauth/zenmux.d.ts +1 -0
- package/dist/types/utils/overflow.d.ts +54 -0
- package/dist/types/utils/parse-bind.d.ts +23 -0
- package/dist/types/utils/provider-response.d.ts +3 -0
- package/dist/types/utils/retry-after.d.ts +3 -0
- package/dist/types/utils/retry.d.ts +26 -0
- package/dist/types/utils/schema/adapt.d.ts +24 -0
- package/dist/types/utils/schema/compatibility.d.ts +30 -0
- package/dist/types/utils/schema/dereference.d.ts +11 -0
- package/dist/types/utils/schema/draft.d.ts +10 -0
- package/dist/types/utils/schema/equality.d.ts +4 -0
- package/dist/types/utils/schema/fields.d.ts +49 -0
- package/dist/types/utils/schema/index.d.ts +13 -0
- package/dist/types/utils/schema/json-schema-validator.d.ts +12 -0
- package/dist/types/utils/schema/meta-validator.d.ts +2 -0
- package/dist/types/utils/schema/normalize.d.ts +93 -0
- package/dist/types/utils/schema/spill.d.ts +8 -0
- package/dist/types/utils/schema/stamps.d.ts +25 -0
- package/dist/types/utils/schema/types.d.ts +4 -0
- package/dist/types/utils/schema/wire.d.ts +54 -0
- package/dist/types/utils/schema/zod-decontaminate.d.ts +31 -0
- package/dist/types/utils/sse-debug.d.ts +10 -0
- package/dist/types/utils/tool-call-healing.d.ts +71 -0
- package/dist/types/utils/tool-choice.d.ts +50 -0
- package/dist/types/utils/validation.d.ts +17 -0
- package/dist/types/utils.d.ts +28 -0
- package/package.json +146 -0
- package/src/api-registry.ts +96 -0
- package/src/auth-broker/client.ts +358 -0
- package/src/auth-broker/index.ts +5 -0
- package/src/auth-broker/refresher.ts +127 -0
- package/src/auth-broker/remote-store.ts +623 -0
- package/src/auth-broker/server.ts +644 -0
- package/src/auth-broker/types.ts +127 -0
- package/src/auth-broker/wire-schemas.ts +200 -0
- package/src/auth-gateway/http.ts +194 -0
- package/src/auth-gateway/index.ts +3 -0
- package/src/auth-gateway/server.ts +717 -0
- package/src/auth-gateway/types.ts +134 -0
- package/src/auth-storage.ts +4104 -0
- package/src/cli.ts +262 -0
- package/src/index.ts +54 -0
- package/src/model-cache.ts +129 -0
- package/src/model-manager.ts +450 -0
- package/src/model-thinking.ts +691 -0
- package/src/models.json +73853 -0
- package/src/models.json.d.ts +9 -0
- package/src/models.ts +56 -0
- package/src/prompts/turn-aborted-guidance.md +4 -0
- package/src/provider-details.ts +90 -0
- package/src/provider-models/bundled-references.ts +38 -0
- package/src/provider-models/descriptors.ts +308 -0
- package/src/provider-models/google.ts +91 -0
- package/src/provider-models/index.ts +5 -0
- package/src/provider-models/ollama.ts +153 -0
- package/src/provider-models/openai-compat.ts +2275 -0
- package/src/provider-models/special.ts +67 -0
- package/src/providers/amazon-bedrock.ts +849 -0
- package/src/providers/anthropic-messages-server-schema.ts +229 -0
- package/src/providers/anthropic-messages-server.ts +677 -0
- package/src/providers/anthropic.ts +2696 -0
- package/src/providers/aws-credentials.ts +501 -0
- package/src/providers/aws-eventstream.ts +185 -0
- package/src/providers/aws-sigv4.ts +218 -0
- package/src/providers/azure-openai-responses.ts +337 -0
- package/src/providers/cursor/gen/agent_pb.ts +15274 -0
- package/src/providers/cursor/proto/agent.proto +3526 -0
- package/src/providers/cursor/proto/buf.gen.yaml +6 -0
- package/src/providers/cursor/proto/buf.yaml +17 -0
- package/src/providers/cursor.ts +2561 -0
- package/src/providers/error-message.ts +21 -0
- package/src/providers/github-copilot-headers.ts +140 -0
- package/src/providers/gitlab-duo.ts +372 -0
- package/src/providers/google-auth.ts +252 -0
- package/src/providers/google-gemini-cli.ts +795 -0
- package/src/providers/google-gemini-headers.ts +41 -0
- package/src/providers/google-shared.ts +902 -0
- package/src/providers/google-types.ts +167 -0
- package/src/providers/google-vertex.ts +88 -0
- package/src/providers/google.ts +41 -0
- package/src/providers/grammar.ts +70 -0
- package/src/providers/kimi.ts +52 -0
- package/src/providers/mock.ts +500 -0
- package/src/providers/ollama.ts +544 -0
- package/src/providers/openai-anthropic-shim.ts +138 -0
- package/src/providers/openai-chat-server-schema.ts +243 -0
- package/src/providers/openai-chat-server.ts +628 -0
- package/src/providers/openai-codex/constants.ts +43 -0
- package/src/providers/openai-codex/request-transformer.ts +161 -0
- package/src/providers/openai-codex/response-handler.ts +81 -0
- package/src/providers/openai-codex-responses.ts +2598 -0
- package/src/providers/openai-completions-compat.ts +279 -0
- package/src/providers/openai-completions.ts +1853 -0
- package/src/providers/openai-responses-server-schema.ts +290 -0
- package/src/providers/openai-responses-server.ts +1183 -0
- package/src/providers/openai-responses-shared.ts +800 -0
- package/src/providers/openai-responses.ts +621 -0
- package/src/providers/pi-native-client.ts +228 -0
- package/src/providers/pi-native-server.ts +210 -0
- package/src/providers/register-builtins.ts +412 -0
- package/src/providers/synthetic.ts +50 -0
- package/src/providers/transform-messages.ts +309 -0
- package/src/providers/vision-guard.ts +31 -0
- package/src/rate-limit-utils.ts +84 -0
- package/src/stream.ts +895 -0
- package/src/types.ts +884 -0
- package/src/usage/claude.ts +431 -0
- package/src/usage/gemini.ts +250 -0
- package/src/usage/github-copilot.ts +421 -0
- package/src/usage/google-antigravity.ts +201 -0
- package/src/usage/kimi.ts +271 -0
- package/src/usage/minimax-code.ts +31 -0
- package/src/usage/openai-codex.ts +503 -0
- package/src/usage/shared.ts +10 -0
- package/src/usage/zai.ts +247 -0
- package/src/usage.ts +183 -0
- package/src/utils/abort.ts +51 -0
- package/src/utils/anthropic-auth.ts +87 -0
- package/src/utils/discovery/antigravity.ts +261 -0
- package/src/utils/discovery/codex.ts +371 -0
- package/src/utils/discovery/cursor.ts +306 -0
- package/src/utils/discovery/gemini.ts +248 -0
- package/src/utils/discovery/index.ts +4 -0
- package/src/utils/discovery/openai-compatible.ts +224 -0
- package/src/utils/event-stream.ts +142 -0
- package/src/utils/fireworks-model-id.ts +30 -0
- package/src/utils/foundry.ts +8 -0
- package/src/utils/h2-fetch.ts +60 -0
- package/src/utils/http-inspector.ts +176 -0
- package/src/utils/idle-iterator.ts +250 -0
- package/src/utils/json-parse.ts +148 -0
- package/src/utils/oauth/alibaba-coding-plan.ts +59 -0
- package/src/utils/oauth/anthropic.ts +200 -0
- package/src/utils/oauth/api-key-login.ts +87 -0
- package/src/utils/oauth/api-key-validation.ts +92 -0
- package/src/utils/oauth/callback-server.ts +276 -0
- package/src/utils/oauth/cerebras.ts +16 -0
- package/src/utils/oauth/cloudflare-ai-gateway.ts +48 -0
- package/src/utils/oauth/cursor.ts +157 -0
- package/src/utils/oauth/deepseek.ts +53 -0
- package/src/utils/oauth/firepass.ts +24 -0
- package/src/utils/oauth/fireworks.ts +15 -0
- package/src/utils/oauth/github-copilot.ts +362 -0
- package/src/utils/oauth/gitlab-duo.ts +123 -0
- package/src/utils/oauth/google-antigravity.ts +200 -0
- package/src/utils/oauth/google-gemini-cli.ts +256 -0
- package/src/utils/oauth/google-oauth-shared.ts +110 -0
- package/src/utils/oauth/huggingface.ts +62 -0
- package/src/utils/oauth/index.ts +444 -0
- package/src/utils/oauth/kagi.ts +47 -0
- package/src/utils/oauth/kilo.ts +87 -0
- package/src/utils/oauth/kimi.ts +254 -0
- package/src/utils/oauth/litellm.ts +47 -0
- package/src/utils/oauth/lm-studio.ts +38 -0
- package/src/utils/oauth/minimax-code.ts +78 -0
- package/src/utils/oauth/moonshot.ts +16 -0
- package/src/utils/oauth/nanogpt.ts +15 -0
- package/src/utils/oauth/nvidia.ts +70 -0
- package/src/utils/oauth/oauth.html +199 -0
- package/src/utils/oauth/ollama-cloud.ts +28 -0
- package/src/utils/oauth/ollama.ts +47 -0
- package/src/utils/oauth/openai-codex.ts +299 -0
- package/src/utils/oauth/opencode.ts +49 -0
- package/src/utils/oauth/parallel.ts +46 -0
- package/src/utils/oauth/perplexity.ts +206 -0
- package/src/utils/oauth/pkce.ts +18 -0
- package/src/utils/oauth/qianfan.ts +58 -0
- package/src/utils/oauth/qwen-portal.ts +60 -0
- package/src/utils/oauth/synthetic.ts +16 -0
- package/src/utils/oauth/tavily.ts +46 -0
- package/src/utils/oauth/together.ts +16 -0
- package/src/utils/oauth/types.ts +94 -0
- package/src/utils/oauth/venice.ts +59 -0
- package/src/utils/oauth/vercel-ai-gateway.ts +47 -0
- package/src/utils/oauth/vllm.ts +40 -0
- package/src/utils/oauth/xiaomi.ts +137 -0
- package/src/utils/oauth/zai.ts +60 -0
- package/src/utils/oauth/zenmux.ts +15 -0
- package/src/utils/overflow.ts +137 -0
- package/src/utils/parse-bind.ts +54 -0
- package/src/utils/provider-response.ts +30 -0
- package/src/utils/retry-after.ts +110 -0
- package/src/utils/retry.ts +54 -0
- package/src/utils/schema/CONSTRAINTS.md +164 -0
- package/src/utils/schema/adapt.ts +36 -0
- package/src/utils/schema/compatibility.ts +435 -0
- package/src/utils/schema/dereference.ts +98 -0
- package/src/utils/schema/draft.ts +341 -0
- package/src/utils/schema/equality.ts +97 -0
- package/src/utils/schema/fields.ts +190 -0
- package/src/utils/schema/index.ts +13 -0
- package/src/utils/schema/json-schema-validator.ts +577 -0
- package/src/utils/schema/meta-validator.ts +167 -0
- package/src/utils/schema/normalize.ts +1588 -0
- package/src/utils/schema/spill.ts +43 -0
- package/src/utils/schema/stamps.ts +97 -0
- package/src/utils/schema/types.ts +11 -0
- package/src/utils/schema/wire.ts +213 -0
- package/src/utils/schema/zod-decontaminate.ts +331 -0
- package/src/utils/sse-debug.ts +289 -0
- package/src/utils/tool-call-healing.ts +271 -0
- package/src/utils/tool-choice.ts +99 -0
- package/src/utils/validation.ts +1019 -0
- package/src/utils.ts +166 -0
|
@@ -0,0 +1,814 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for the OpenAI chat-completions request shape we accept on the
|
|
3
|
+
* gateway. Mirrors https://platform.openai.com/docs/api-reference/chat — only
|
|
4
|
+
* the shapes the gateway translation layer understands. Unknown fields on
|
|
5
|
+
* permissive objects are accepted-and-stripped (via `z.unknown()` passthroughs
|
|
6
|
+
* or `.loose()`) so the official OpenAI SDK — which sends a growing pile of
|
|
7
|
+
* non-strict defaults (e.g. `stream_options.include_obfuscation`) — does not
|
|
8
|
+
* trip 400s on shapes we simply ignore.
|
|
9
|
+
*/
|
|
10
|
+
import type { ChatCompletionContentPart, ChatCompletionCreateParams, ChatCompletionMessageParam, ChatCompletionMessageToolCall, ChatCompletionTool, ChatCompletionToolChoiceOption } from "openai/resources/chat/completions";
|
|
11
|
+
import * as z from "zod/v4";
|
|
12
|
+
export declare const textPartSchema: z.ZodObject<{
|
|
13
|
+
type: z.ZodLiteral<"text">;
|
|
14
|
+
text: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/**
|
|
17
|
+
* OpenAI documents `image_url` as either `{ url: string, detail?: ... }` or —
|
|
18
|
+
* older clients — a bare string. Accept both shapes; downstream we extract a
|
|
19
|
+
* URL. `detail` is accepted for forward-compat but currently dropped (pi-ai's
|
|
20
|
+
* `ImageContent` has no detail field — TODO: plumb through if/when added).
|
|
21
|
+
*/
|
|
22
|
+
export declare const imagePartSchema: z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<"image_url">;
|
|
24
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
25
|
+
url: z.ZodString;
|
|
26
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
auto: "auto";
|
|
28
|
+
high: "high";
|
|
29
|
+
low: "low";
|
|
30
|
+
}>>;
|
|
31
|
+
}, z.core.$strip>]>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
/** OpenAI audio input block (gpt-4o-audio). Accepted; currently dropped downstream. */
|
|
34
|
+
export declare const inputAudioPartSchema: z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"input_audio">;
|
|
36
|
+
input_audio: z.ZodObject<{
|
|
37
|
+
data: z.ZodString;
|
|
38
|
+
format: z.ZodEnum<{
|
|
39
|
+
mp3: "mp3";
|
|
40
|
+
wav: "wav";
|
|
41
|
+
}>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
/** OpenAI file input block (file_search / vision-document). Accepted; currently dropped downstream. */
|
|
45
|
+
export declare const filePartSchema: z.ZodObject<{
|
|
46
|
+
type: z.ZodLiteral<"file">;
|
|
47
|
+
file: z.ZodObject<{
|
|
48
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
49
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
50
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/** Replayed assistant refusal block. Accepted; currently dropped downstream. */
|
|
54
|
+
export declare const refusalPartSchema: z.ZodObject<{
|
|
55
|
+
type: z.ZodLiteral<"refusal">;
|
|
56
|
+
refusal: z.ZodString;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
/**
|
|
59
|
+
* Forward-compat catch-all for unknown content-part types. Matches every other
|
|
60
|
+
* `{ type: string, ... }` object so a new OpenAI block kind does not 400 the
|
|
61
|
+
* whole request; the walker ignores parts whose `type` it does not know.
|
|
62
|
+
*/
|
|
63
|
+
export declare const unknownPartSchema: z.ZodObject<{
|
|
64
|
+
type: z.ZodString;
|
|
65
|
+
}, z.core.$loose>;
|
|
66
|
+
export declare const userContentPartSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
67
|
+
type: z.ZodLiteral<"text">;
|
|
68
|
+
text: z.ZodString;
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
+
type: z.ZodLiteral<"image_url">;
|
|
71
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
72
|
+
url: z.ZodString;
|
|
73
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
auto: "auto";
|
|
75
|
+
high: "high";
|
|
76
|
+
low: "low";
|
|
77
|
+
}>>;
|
|
78
|
+
}, z.core.$strip>]>;
|
|
79
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"input_audio">;
|
|
81
|
+
input_audio: z.ZodObject<{
|
|
82
|
+
data: z.ZodString;
|
|
83
|
+
format: z.ZodEnum<{
|
|
84
|
+
mp3: "mp3";
|
|
85
|
+
wav: "wav";
|
|
86
|
+
}>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<"file">;
|
|
90
|
+
file: z.ZodObject<{
|
|
91
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
92
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
93
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
type: z.ZodLiteral<"refusal">;
|
|
97
|
+
refusal: z.ZodString;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
type: z.ZodString;
|
|
100
|
+
}, z.core.$loose>]>;
|
|
101
|
+
export declare const toolCallSchema: z.ZodObject<{
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
type: z.ZodOptional<z.ZodLiteral<"function">>;
|
|
104
|
+
function: z.ZodObject<{
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
arguments: z.ZodString;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
export declare const toolSchema: z.ZodObject<{
|
|
110
|
+
type: z.ZodLiteral<"function">;
|
|
111
|
+
function: z.ZodObject<{
|
|
112
|
+
name: z.ZodString;
|
|
113
|
+
description: z.ZodOptional<z.ZodString>;
|
|
114
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
115
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export declare const toolChoiceSchema: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{
|
|
119
|
+
type: z.ZodLiteral<"function">;
|
|
120
|
+
function: z.ZodObject<{
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
+
type: z.ZodLiteral<"tool">;
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
}, z.core.$strip>]>;
|
|
127
|
+
export declare const systemMessageSchema: z.ZodObject<{
|
|
128
|
+
role: z.ZodLiteral<"system">;
|
|
129
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
130
|
+
type: z.ZodLiteral<"text">;
|
|
131
|
+
text: z.ZodString;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"image_url">;
|
|
134
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
135
|
+
url: z.ZodString;
|
|
136
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
auto: "auto";
|
|
138
|
+
high: "high";
|
|
139
|
+
low: "low";
|
|
140
|
+
}>>;
|
|
141
|
+
}, z.core.$strip>]>;
|
|
142
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
143
|
+
type: z.ZodLiteral<"input_audio">;
|
|
144
|
+
input_audio: z.ZodObject<{
|
|
145
|
+
data: z.ZodString;
|
|
146
|
+
format: z.ZodEnum<{
|
|
147
|
+
mp3: "mp3";
|
|
148
|
+
wav: "wav";
|
|
149
|
+
}>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
type: z.ZodLiteral<"file">;
|
|
153
|
+
file: z.ZodObject<{
|
|
154
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
155
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
156
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
type: z.ZodLiteral<"refusal">;
|
|
160
|
+
refusal: z.ZodString;
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
type: z.ZodString;
|
|
163
|
+
}, z.core.$loose>]>>]>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export declare const developerMessageSchema: z.ZodObject<{
|
|
166
|
+
role: z.ZodLiteral<"developer">;
|
|
167
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<"text">;
|
|
169
|
+
text: z.ZodString;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
type: z.ZodLiteral<"image_url">;
|
|
172
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
173
|
+
url: z.ZodString;
|
|
174
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
175
|
+
auto: "auto";
|
|
176
|
+
high: "high";
|
|
177
|
+
low: "low";
|
|
178
|
+
}>>;
|
|
179
|
+
}, z.core.$strip>]>;
|
|
180
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
181
|
+
type: z.ZodLiteral<"input_audio">;
|
|
182
|
+
input_audio: z.ZodObject<{
|
|
183
|
+
data: z.ZodString;
|
|
184
|
+
format: z.ZodEnum<{
|
|
185
|
+
mp3: "mp3";
|
|
186
|
+
wav: "wav";
|
|
187
|
+
}>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
+
type: z.ZodLiteral<"file">;
|
|
191
|
+
file: z.ZodObject<{
|
|
192
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
193
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
194
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"refusal">;
|
|
198
|
+
refusal: z.ZodString;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
type: z.ZodString;
|
|
201
|
+
}, z.core.$loose>]>>]>;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
export declare const userMessageSchema: z.ZodObject<{
|
|
204
|
+
role: z.ZodLiteral<"user">;
|
|
205
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
206
|
+
type: z.ZodLiteral<"text">;
|
|
207
|
+
text: z.ZodString;
|
|
208
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
209
|
+
type: z.ZodLiteral<"image_url">;
|
|
210
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
211
|
+
url: z.ZodString;
|
|
212
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
auto: "auto";
|
|
214
|
+
high: "high";
|
|
215
|
+
low: "low";
|
|
216
|
+
}>>;
|
|
217
|
+
}, z.core.$strip>]>;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
type: z.ZodLiteral<"input_audio">;
|
|
220
|
+
input_audio: z.ZodObject<{
|
|
221
|
+
data: z.ZodString;
|
|
222
|
+
format: z.ZodEnum<{
|
|
223
|
+
mp3: "mp3";
|
|
224
|
+
wav: "wav";
|
|
225
|
+
}>;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
228
|
+
type: z.ZodLiteral<"file">;
|
|
229
|
+
file: z.ZodObject<{
|
|
230
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
231
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
232
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
|
+
type: z.ZodLiteral<"refusal">;
|
|
236
|
+
refusal: z.ZodString;
|
|
237
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
238
|
+
type: z.ZodString;
|
|
239
|
+
}, z.core.$loose>]>>]>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export declare const assistantMessageSchema: z.ZodObject<{
|
|
242
|
+
role: z.ZodLiteral<"assistant">;
|
|
243
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
244
|
+
type: z.ZodLiteral<"text">;
|
|
245
|
+
text: z.ZodString;
|
|
246
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
247
|
+
type: z.ZodLiteral<"image_url">;
|
|
248
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
249
|
+
url: z.ZodString;
|
|
250
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
251
|
+
auto: "auto";
|
|
252
|
+
high: "high";
|
|
253
|
+
low: "low";
|
|
254
|
+
}>>;
|
|
255
|
+
}, z.core.$strip>]>;
|
|
256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
257
|
+
type: z.ZodLiteral<"input_audio">;
|
|
258
|
+
input_audio: z.ZodObject<{
|
|
259
|
+
data: z.ZodString;
|
|
260
|
+
format: z.ZodEnum<{
|
|
261
|
+
mp3: "mp3";
|
|
262
|
+
wav: "wav";
|
|
263
|
+
}>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
266
|
+
type: z.ZodLiteral<"file">;
|
|
267
|
+
file: z.ZodObject<{
|
|
268
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
269
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
270
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.core.$strip>;
|
|
272
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
273
|
+
type: z.ZodLiteral<"refusal">;
|
|
274
|
+
refusal: z.ZodString;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
type: z.ZodString;
|
|
277
|
+
}, z.core.$loose>]>>]>>;
|
|
278
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
279
|
+
id: z.ZodString;
|
|
280
|
+
type: z.ZodOptional<z.ZodLiteral<"function">>;
|
|
281
|
+
function: z.ZodObject<{
|
|
282
|
+
name: z.ZodString;
|
|
283
|
+
arguments: z.ZodString;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
}, z.core.$strip>>>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
export declare const toolMessageSchema: z.ZodObject<{
|
|
288
|
+
role: z.ZodLiteral<"tool">;
|
|
289
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
290
|
+
type: z.ZodLiteral<"text">;
|
|
291
|
+
text: z.ZodString;
|
|
292
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
293
|
+
type: z.ZodLiteral<"image_url">;
|
|
294
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
295
|
+
url: z.ZodString;
|
|
296
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
297
|
+
auto: "auto";
|
|
298
|
+
high: "high";
|
|
299
|
+
low: "low";
|
|
300
|
+
}>>;
|
|
301
|
+
}, z.core.$strip>]>;
|
|
302
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
303
|
+
type: z.ZodLiteral<"input_audio">;
|
|
304
|
+
input_audio: z.ZodObject<{
|
|
305
|
+
data: z.ZodString;
|
|
306
|
+
format: z.ZodEnum<{
|
|
307
|
+
mp3: "mp3";
|
|
308
|
+
wav: "wav";
|
|
309
|
+
}>;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
+
type: z.ZodLiteral<"file">;
|
|
313
|
+
file: z.ZodObject<{
|
|
314
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
315
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
316
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
317
|
+
}, z.core.$strip>;
|
|
318
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
319
|
+
type: z.ZodLiteral<"refusal">;
|
|
320
|
+
refusal: z.ZodString;
|
|
321
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
322
|
+
type: z.ZodString;
|
|
323
|
+
}, z.core.$loose>]>>]>>;
|
|
324
|
+
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
/**
|
|
327
|
+
* Legacy `function` role (pre-tools API). Translated to a `tool` role
|
|
328
|
+
* canonical message in the walker so downstream providers see one shape.
|
|
329
|
+
*/
|
|
330
|
+
export declare const functionMessageSchema: z.ZodObject<{
|
|
331
|
+
role: z.ZodLiteral<"function">;
|
|
332
|
+
name: z.ZodString;
|
|
333
|
+
content: z.ZodNullable<z.ZodString>;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
export declare const messageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
336
|
+
role: z.ZodLiteral<"system">;
|
|
337
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
338
|
+
type: z.ZodLiteral<"text">;
|
|
339
|
+
text: z.ZodString;
|
|
340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
341
|
+
type: z.ZodLiteral<"image_url">;
|
|
342
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
343
|
+
url: z.ZodString;
|
|
344
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
345
|
+
auto: "auto";
|
|
346
|
+
high: "high";
|
|
347
|
+
low: "low";
|
|
348
|
+
}>>;
|
|
349
|
+
}, z.core.$strip>]>;
|
|
350
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
351
|
+
type: z.ZodLiteral<"input_audio">;
|
|
352
|
+
input_audio: z.ZodObject<{
|
|
353
|
+
data: z.ZodString;
|
|
354
|
+
format: z.ZodEnum<{
|
|
355
|
+
mp3: "mp3";
|
|
356
|
+
wav: "wav";
|
|
357
|
+
}>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
360
|
+
type: z.ZodLiteral<"file">;
|
|
361
|
+
file: z.ZodObject<{
|
|
362
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
363
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
364
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
365
|
+
}, z.core.$strip>;
|
|
366
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
367
|
+
type: z.ZodLiteral<"refusal">;
|
|
368
|
+
refusal: z.ZodString;
|
|
369
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
370
|
+
type: z.ZodString;
|
|
371
|
+
}, z.core.$loose>]>>]>;
|
|
372
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
373
|
+
role: z.ZodLiteral<"developer">;
|
|
374
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
375
|
+
type: z.ZodLiteral<"text">;
|
|
376
|
+
text: z.ZodString;
|
|
377
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
378
|
+
type: z.ZodLiteral<"image_url">;
|
|
379
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
380
|
+
url: z.ZodString;
|
|
381
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
382
|
+
auto: "auto";
|
|
383
|
+
high: "high";
|
|
384
|
+
low: "low";
|
|
385
|
+
}>>;
|
|
386
|
+
}, z.core.$strip>]>;
|
|
387
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
388
|
+
type: z.ZodLiteral<"input_audio">;
|
|
389
|
+
input_audio: z.ZodObject<{
|
|
390
|
+
data: z.ZodString;
|
|
391
|
+
format: z.ZodEnum<{
|
|
392
|
+
mp3: "mp3";
|
|
393
|
+
wav: "wav";
|
|
394
|
+
}>;
|
|
395
|
+
}, z.core.$strip>;
|
|
396
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
397
|
+
type: z.ZodLiteral<"file">;
|
|
398
|
+
file: z.ZodObject<{
|
|
399
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
400
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
401
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
402
|
+
}, z.core.$strip>;
|
|
403
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
404
|
+
type: z.ZodLiteral<"refusal">;
|
|
405
|
+
refusal: z.ZodString;
|
|
406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
407
|
+
type: z.ZodString;
|
|
408
|
+
}, z.core.$loose>]>>]>;
|
|
409
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
410
|
+
role: z.ZodLiteral<"user">;
|
|
411
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
412
|
+
type: z.ZodLiteral<"text">;
|
|
413
|
+
text: z.ZodString;
|
|
414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
415
|
+
type: z.ZodLiteral<"image_url">;
|
|
416
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
417
|
+
url: z.ZodString;
|
|
418
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
419
|
+
auto: "auto";
|
|
420
|
+
high: "high";
|
|
421
|
+
low: "low";
|
|
422
|
+
}>>;
|
|
423
|
+
}, z.core.$strip>]>;
|
|
424
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
425
|
+
type: z.ZodLiteral<"input_audio">;
|
|
426
|
+
input_audio: z.ZodObject<{
|
|
427
|
+
data: z.ZodString;
|
|
428
|
+
format: z.ZodEnum<{
|
|
429
|
+
mp3: "mp3";
|
|
430
|
+
wav: "wav";
|
|
431
|
+
}>;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
434
|
+
type: z.ZodLiteral<"file">;
|
|
435
|
+
file: z.ZodObject<{
|
|
436
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
437
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
438
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
439
|
+
}, z.core.$strip>;
|
|
440
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
441
|
+
type: z.ZodLiteral<"refusal">;
|
|
442
|
+
refusal: z.ZodString;
|
|
443
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
444
|
+
type: z.ZodString;
|
|
445
|
+
}, z.core.$loose>]>>]>;
|
|
446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
447
|
+
role: z.ZodLiteral<"assistant">;
|
|
448
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
449
|
+
type: z.ZodLiteral<"text">;
|
|
450
|
+
text: z.ZodString;
|
|
451
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
452
|
+
type: z.ZodLiteral<"image_url">;
|
|
453
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
454
|
+
url: z.ZodString;
|
|
455
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
456
|
+
auto: "auto";
|
|
457
|
+
high: "high";
|
|
458
|
+
low: "low";
|
|
459
|
+
}>>;
|
|
460
|
+
}, z.core.$strip>]>;
|
|
461
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
462
|
+
type: z.ZodLiteral<"input_audio">;
|
|
463
|
+
input_audio: z.ZodObject<{
|
|
464
|
+
data: z.ZodString;
|
|
465
|
+
format: z.ZodEnum<{
|
|
466
|
+
mp3: "mp3";
|
|
467
|
+
wav: "wav";
|
|
468
|
+
}>;
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
471
|
+
type: z.ZodLiteral<"file">;
|
|
472
|
+
file: z.ZodObject<{
|
|
473
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
474
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
475
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
478
|
+
type: z.ZodLiteral<"refusal">;
|
|
479
|
+
refusal: z.ZodString;
|
|
480
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
481
|
+
type: z.ZodString;
|
|
482
|
+
}, z.core.$loose>]>>]>>;
|
|
483
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
484
|
+
id: z.ZodString;
|
|
485
|
+
type: z.ZodOptional<z.ZodLiteral<"function">>;
|
|
486
|
+
function: z.ZodObject<{
|
|
487
|
+
name: z.ZodString;
|
|
488
|
+
arguments: z.ZodString;
|
|
489
|
+
}, z.core.$strip>;
|
|
490
|
+
}, z.core.$strip>>>;
|
|
491
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
492
|
+
role: z.ZodLiteral<"tool">;
|
|
493
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
494
|
+
type: z.ZodLiteral<"text">;
|
|
495
|
+
text: z.ZodString;
|
|
496
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
497
|
+
type: z.ZodLiteral<"image_url">;
|
|
498
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
499
|
+
url: z.ZodString;
|
|
500
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
501
|
+
auto: "auto";
|
|
502
|
+
high: "high";
|
|
503
|
+
low: "low";
|
|
504
|
+
}>>;
|
|
505
|
+
}, z.core.$strip>]>;
|
|
506
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
507
|
+
type: z.ZodLiteral<"input_audio">;
|
|
508
|
+
input_audio: z.ZodObject<{
|
|
509
|
+
data: z.ZodString;
|
|
510
|
+
format: z.ZodEnum<{
|
|
511
|
+
mp3: "mp3";
|
|
512
|
+
wav: "wav";
|
|
513
|
+
}>;
|
|
514
|
+
}, z.core.$strip>;
|
|
515
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
516
|
+
type: z.ZodLiteral<"file">;
|
|
517
|
+
file: z.ZodObject<{
|
|
518
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
519
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
520
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
523
|
+
type: z.ZodLiteral<"refusal">;
|
|
524
|
+
refusal: z.ZodString;
|
|
525
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
526
|
+
type: z.ZodString;
|
|
527
|
+
}, z.core.$loose>]>>]>>;
|
|
528
|
+
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
529
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
530
|
+
role: z.ZodLiteral<"function">;
|
|
531
|
+
name: z.ZodString;
|
|
532
|
+
content: z.ZodNullable<z.ZodString>;
|
|
533
|
+
}, z.core.$strip>], "role">;
|
|
534
|
+
/**
|
|
535
|
+
* Permissive: the official OpenAI SDK sets `include_obfuscation: false` by
|
|
536
|
+
* default. We only consume `include_usage`, so unknown keys are silently
|
|
537
|
+
* stripped rather than 400'd.
|
|
538
|
+
*/
|
|
539
|
+
export declare const streamOptionsSchema: z.ZodObject<{
|
|
540
|
+
include_usage: z.ZodOptional<z.ZodBoolean>;
|
|
541
|
+
}, z.core.$strip>;
|
|
542
|
+
export declare const stopSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
543
|
+
export declare const openaiChatRequestSchema: z.ZodObject<{
|
|
544
|
+
model: z.ZodString;
|
|
545
|
+
messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
546
|
+
role: z.ZodLiteral<"system">;
|
|
547
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
548
|
+
type: z.ZodLiteral<"text">;
|
|
549
|
+
text: z.ZodString;
|
|
550
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
551
|
+
type: z.ZodLiteral<"image_url">;
|
|
552
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
553
|
+
url: z.ZodString;
|
|
554
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
555
|
+
auto: "auto";
|
|
556
|
+
high: "high";
|
|
557
|
+
low: "low";
|
|
558
|
+
}>>;
|
|
559
|
+
}, z.core.$strip>]>;
|
|
560
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
561
|
+
type: z.ZodLiteral<"input_audio">;
|
|
562
|
+
input_audio: z.ZodObject<{
|
|
563
|
+
data: z.ZodString;
|
|
564
|
+
format: z.ZodEnum<{
|
|
565
|
+
mp3: "mp3";
|
|
566
|
+
wav: "wav";
|
|
567
|
+
}>;
|
|
568
|
+
}, z.core.$strip>;
|
|
569
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
570
|
+
type: z.ZodLiteral<"file">;
|
|
571
|
+
file: z.ZodObject<{
|
|
572
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
573
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
574
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
575
|
+
}, z.core.$strip>;
|
|
576
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
577
|
+
type: z.ZodLiteral<"refusal">;
|
|
578
|
+
refusal: z.ZodString;
|
|
579
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
580
|
+
type: z.ZodString;
|
|
581
|
+
}, z.core.$loose>]>>]>;
|
|
582
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
583
|
+
role: z.ZodLiteral<"developer">;
|
|
584
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
585
|
+
type: z.ZodLiteral<"text">;
|
|
586
|
+
text: z.ZodString;
|
|
587
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
588
|
+
type: z.ZodLiteral<"image_url">;
|
|
589
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
590
|
+
url: z.ZodString;
|
|
591
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
592
|
+
auto: "auto";
|
|
593
|
+
high: "high";
|
|
594
|
+
low: "low";
|
|
595
|
+
}>>;
|
|
596
|
+
}, z.core.$strip>]>;
|
|
597
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
598
|
+
type: z.ZodLiteral<"input_audio">;
|
|
599
|
+
input_audio: z.ZodObject<{
|
|
600
|
+
data: z.ZodString;
|
|
601
|
+
format: z.ZodEnum<{
|
|
602
|
+
mp3: "mp3";
|
|
603
|
+
wav: "wav";
|
|
604
|
+
}>;
|
|
605
|
+
}, z.core.$strip>;
|
|
606
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
607
|
+
type: z.ZodLiteral<"file">;
|
|
608
|
+
file: z.ZodObject<{
|
|
609
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
610
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
611
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
612
|
+
}, z.core.$strip>;
|
|
613
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
614
|
+
type: z.ZodLiteral<"refusal">;
|
|
615
|
+
refusal: z.ZodString;
|
|
616
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
617
|
+
type: z.ZodString;
|
|
618
|
+
}, z.core.$loose>]>>]>;
|
|
619
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
620
|
+
role: z.ZodLiteral<"user">;
|
|
621
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
622
|
+
type: z.ZodLiteral<"text">;
|
|
623
|
+
text: z.ZodString;
|
|
624
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
625
|
+
type: z.ZodLiteral<"image_url">;
|
|
626
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
627
|
+
url: z.ZodString;
|
|
628
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
629
|
+
auto: "auto";
|
|
630
|
+
high: "high";
|
|
631
|
+
low: "low";
|
|
632
|
+
}>>;
|
|
633
|
+
}, z.core.$strip>]>;
|
|
634
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
635
|
+
type: z.ZodLiteral<"input_audio">;
|
|
636
|
+
input_audio: z.ZodObject<{
|
|
637
|
+
data: z.ZodString;
|
|
638
|
+
format: z.ZodEnum<{
|
|
639
|
+
mp3: "mp3";
|
|
640
|
+
wav: "wav";
|
|
641
|
+
}>;
|
|
642
|
+
}, z.core.$strip>;
|
|
643
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
644
|
+
type: z.ZodLiteral<"file">;
|
|
645
|
+
file: z.ZodObject<{
|
|
646
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
647
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
648
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
649
|
+
}, z.core.$strip>;
|
|
650
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
651
|
+
type: z.ZodLiteral<"refusal">;
|
|
652
|
+
refusal: z.ZodString;
|
|
653
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
654
|
+
type: z.ZodString;
|
|
655
|
+
}, z.core.$loose>]>>]>;
|
|
656
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
657
|
+
role: z.ZodLiteral<"assistant">;
|
|
658
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
659
|
+
type: z.ZodLiteral<"text">;
|
|
660
|
+
text: z.ZodString;
|
|
661
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
662
|
+
type: z.ZodLiteral<"image_url">;
|
|
663
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
664
|
+
url: z.ZodString;
|
|
665
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
666
|
+
auto: "auto";
|
|
667
|
+
high: "high";
|
|
668
|
+
low: "low";
|
|
669
|
+
}>>;
|
|
670
|
+
}, z.core.$strip>]>;
|
|
671
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
672
|
+
type: z.ZodLiteral<"input_audio">;
|
|
673
|
+
input_audio: z.ZodObject<{
|
|
674
|
+
data: z.ZodString;
|
|
675
|
+
format: z.ZodEnum<{
|
|
676
|
+
mp3: "mp3";
|
|
677
|
+
wav: "wav";
|
|
678
|
+
}>;
|
|
679
|
+
}, z.core.$strip>;
|
|
680
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
681
|
+
type: z.ZodLiteral<"file">;
|
|
682
|
+
file: z.ZodObject<{
|
|
683
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
684
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
685
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
686
|
+
}, z.core.$strip>;
|
|
687
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
688
|
+
type: z.ZodLiteral<"refusal">;
|
|
689
|
+
refusal: z.ZodString;
|
|
690
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
691
|
+
type: z.ZodString;
|
|
692
|
+
}, z.core.$loose>]>>]>>;
|
|
693
|
+
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
694
|
+
id: z.ZodString;
|
|
695
|
+
type: z.ZodOptional<z.ZodLiteral<"function">>;
|
|
696
|
+
function: z.ZodObject<{
|
|
697
|
+
name: z.ZodString;
|
|
698
|
+
arguments: z.ZodString;
|
|
699
|
+
}, z.core.$strip>;
|
|
700
|
+
}, z.core.$strip>>>;
|
|
701
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
702
|
+
role: z.ZodLiteral<"tool">;
|
|
703
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
704
|
+
type: z.ZodLiteral<"text">;
|
|
705
|
+
text: z.ZodString;
|
|
706
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
707
|
+
type: z.ZodLiteral<"image_url">;
|
|
708
|
+
image_url: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
709
|
+
url: z.ZodString;
|
|
710
|
+
detail: z.ZodOptional<z.ZodEnum<{
|
|
711
|
+
auto: "auto";
|
|
712
|
+
high: "high";
|
|
713
|
+
low: "low";
|
|
714
|
+
}>>;
|
|
715
|
+
}, z.core.$strip>]>;
|
|
716
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
717
|
+
type: z.ZodLiteral<"input_audio">;
|
|
718
|
+
input_audio: z.ZodObject<{
|
|
719
|
+
data: z.ZodString;
|
|
720
|
+
format: z.ZodEnum<{
|
|
721
|
+
mp3: "mp3";
|
|
722
|
+
wav: "wav";
|
|
723
|
+
}>;
|
|
724
|
+
}, z.core.$strip>;
|
|
725
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
726
|
+
type: z.ZodLiteral<"file">;
|
|
727
|
+
file: z.ZodObject<{
|
|
728
|
+
file_id: z.ZodOptional<z.ZodString>;
|
|
729
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
730
|
+
file_data: z.ZodOptional<z.ZodString>;
|
|
731
|
+
}, z.core.$strip>;
|
|
732
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
733
|
+
type: z.ZodLiteral<"refusal">;
|
|
734
|
+
refusal: z.ZodString;
|
|
735
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
736
|
+
type: z.ZodString;
|
|
737
|
+
}, z.core.$loose>]>>]>>;
|
|
738
|
+
tool_call_id: z.ZodOptional<z.ZodString>;
|
|
739
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
740
|
+
role: z.ZodLiteral<"function">;
|
|
741
|
+
name: z.ZodString;
|
|
742
|
+
content: z.ZodNullable<z.ZodString>;
|
|
743
|
+
}, z.core.$strip>], "role">>;
|
|
744
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
745
|
+
type: z.ZodLiteral<"function">;
|
|
746
|
+
function: z.ZodObject<{
|
|
747
|
+
name: z.ZodString;
|
|
748
|
+
description: z.ZodOptional<z.ZodString>;
|
|
749
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
750
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
751
|
+
}, z.core.$strip>;
|
|
752
|
+
}, z.core.$strip>>>;
|
|
753
|
+
tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{
|
|
754
|
+
type: z.ZodLiteral<"function">;
|
|
755
|
+
function: z.ZodObject<{
|
|
756
|
+
name: z.ZodString;
|
|
757
|
+
}, z.core.$strip>;
|
|
758
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
759
|
+
type: z.ZodLiteral<"tool">;
|
|
760
|
+
name: z.ZodString;
|
|
761
|
+
}, z.core.$strip>]>>;
|
|
762
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
763
|
+
max_completion_tokens: z.ZodOptional<z.ZodNumber>;
|
|
764
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
765
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
766
|
+
stop: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
767
|
+
stream: z.ZodOptional<z.ZodBoolean>;
|
|
768
|
+
stream_options: z.ZodOptional<z.ZodObject<{
|
|
769
|
+
include_usage: z.ZodOptional<z.ZodBoolean>;
|
|
770
|
+
}, z.core.$strip>>;
|
|
771
|
+
response_format: z.ZodOptional<z.ZodUnknown>;
|
|
772
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
773
|
+
presence_penalty: z.ZodOptional<z.ZodNumber>;
|
|
774
|
+
frequency_penalty: z.ZodOptional<z.ZodNumber>;
|
|
775
|
+
logit_bias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
776
|
+
user: z.ZodOptional<z.ZodString>;
|
|
777
|
+
reasoning_effort: z.ZodOptional<z.ZodEnum<{
|
|
778
|
+
high: "high";
|
|
779
|
+
low: "low";
|
|
780
|
+
medium: "medium";
|
|
781
|
+
minimal: "minimal";
|
|
782
|
+
xhigh: "xhigh";
|
|
783
|
+
}>>;
|
|
784
|
+
parallel_tool_calls: z.ZodOptional<z.ZodBoolean>;
|
|
785
|
+
service_tier: z.ZodOptional<z.ZodEnum<{
|
|
786
|
+
auto: "auto";
|
|
787
|
+
default: "default";
|
|
788
|
+
flex: "flex";
|
|
789
|
+
priority: "priority";
|
|
790
|
+
scale: "scale";
|
|
791
|
+
}>>;
|
|
792
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
793
|
+
logprobs: z.ZodOptional<z.ZodUnknown>;
|
|
794
|
+
top_logprobs: z.ZodOptional<z.ZodUnknown>;
|
|
795
|
+
prediction: z.ZodOptional<z.ZodUnknown>;
|
|
796
|
+
modalities: z.ZodOptional<z.ZodUnknown>;
|
|
797
|
+
audio: z.ZodOptional<z.ZodUnknown>;
|
|
798
|
+
store: z.ZodOptional<z.ZodUnknown>;
|
|
799
|
+
prompt_cache_key: z.ZodOptional<z.ZodUnknown>;
|
|
800
|
+
safety_identifier: z.ZodOptional<z.ZodUnknown>;
|
|
801
|
+
n: z.ZodOptional<z.ZodUnknown>;
|
|
802
|
+
web_search_options: z.ZodOptional<z.ZodUnknown>;
|
|
803
|
+
}, z.core.$strip>;
|
|
804
|
+
/**
|
|
805
|
+
* Public types are sourced from the OpenAI SDK so the gateway stays in
|
|
806
|
+
* lock-step with the canonical API surface; the schemas above are runtime
|
|
807
|
+
* validators for the subset we actually accept.
|
|
808
|
+
*/
|
|
809
|
+
export type OpenAIChatRequest = ChatCompletionCreateParams;
|
|
810
|
+
export type OpenAIChatMessage = ChatCompletionMessageParam;
|
|
811
|
+
export type OpenAIChatToolCall = ChatCompletionMessageToolCall;
|
|
812
|
+
export type OpenAIChatTool = ChatCompletionTool;
|
|
813
|
+
export type OpenAIChatToolChoice = ChatCompletionToolChoiceOption;
|
|
814
|
+
export type OpenAIChatContentPart = ChatCompletionContentPart;
|