@opencode/ai 2.1.4 → 2.2.0
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/README.md +283 -114
- package/dist/ai-client.d.ts +2 -2
- package/dist/ai-client.js +2 -1
- package/dist/cache-policy.d.ts +4 -0
- package/dist/cache-policy.js +20 -6
- package/dist/decision-client.d.ts +21 -0
- package/dist/decision-client.js +55 -0
- package/dist/decision.d.ts +472 -0
- package/dist/decision.js +158 -0
- package/dist/effect.d.ts +38 -0
- package/dist/effect.js +27 -0
- package/dist/effort-updates.d.ts +2 -2
- package/dist/experimental/cloudflare-run-extraction.d.ts +13 -0
- package/dist/experimental/cloudflare-run-extraction.js +83 -0
- package/dist/experimental/extraction.d.ts +183 -0
- package/dist/experimental/extraction.js +102 -0
- package/dist/experimental/realtime.d.ts +7 -2
- package/dist/experimental/realtime.js +5 -5
- package/dist/experimental.d.ts +2 -3
- package/dist/experimental.js +1 -2
- package/dist/image-client.d.ts +5 -14
- package/dist/image-client.js +0 -1
- package/dist/image.d.ts +6 -176
- package/dist/image.js +4 -11
- package/dist/index.d.ts +1426 -34
- package/dist/index.js +127 -24
- package/dist/llm.d.ts +16 -1
- package/dist/llm.js +34 -0
- package/dist/media-client.d.ts +2 -1
- package/dist/media-model.d.ts +3 -0
- package/dist/media-model.js +4 -1
- package/dist/media.d.ts +0 -7
- package/dist/media.js +0 -6
- package/dist/protocols/alibaba-chat.d.ts +20 -0
- package/dist/protocols/alibaba-images.d.ts +22 -0
- package/dist/protocols/alibaba-images.js +77 -0
- package/dist/protocols/alibaba-messages.d.ts +52 -17
- package/dist/protocols/alibaba-responses.d.ts +6 -3
- package/dist/protocols/anthropic-messages.d.ts +160 -54
- package/dist/protocols/anthropic-messages.js +44 -13
- package/dist/protocols/bedrock-converse.d.ts +110 -15
- package/dist/protocols/bedrock-converse.js +112 -15
- package/dist/protocols/bedrock-event-stream.js +1 -0
- package/dist/protocols/bfl-images.d.ts +9 -0
- package/dist/protocols/bfl-images.js +17 -15
- package/dist/protocols/cartesia-speech.d.ts +0 -18
- package/dist/protocols/cloudflare-run-decisions.d.ts +9 -0
- package/dist/protocols/cloudflare-run-decisions.js +36 -0
- package/dist/protocols/cloudflare-workers-ai-images.d.ts +23 -0
- package/dist/protocols/cloudflare-workers-ai-images.js +80 -0
- package/dist/protocols/deepgram-speech.d.ts +0 -18
- package/dist/protocols/elevenlabs-speech.d.ts +0 -18
- package/dist/protocols/fal-images.d.ts +10 -1
- package/dist/protocols/fal-images.js +16 -25
- package/dist/protocols/fal-video.js +1 -1
- package/dist/protocols/gemini.d.ts +3 -0
- package/dist/protocols/gemini.js +11 -6
- package/dist/protocols/google-images.d.ts +2 -2
- package/dist/protocols/google-images.js +8 -37
- package/dist/protocols/google-interactions.d.ts +4 -0
- package/dist/protocols/google-interactions.js +12 -5
- package/dist/protocols/google-speech.d.ts +0 -18
- package/dist/protocols/google-speech.js +0 -1
- package/dist/protocols/google-transcription.d.ts +0 -18
- package/dist/protocols/google-transcription.js +0 -1
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/google-video.js +2 -7
- package/dist/protocols/index.d.ts +3 -0
- package/dist/protocols/index.js +3 -0
- package/dist/protocols/meta-images.d.ts +7 -1
- package/dist/protocols/meta-images.js +10 -8
- package/dist/protocols/meta-messages.d.ts +52 -17
- package/dist/protocols/meta-messages.js +14 -1
- package/dist/protocols/meta-responses.d.ts +6 -0
- package/dist/protocols/meta-responses.js +29 -1
- package/dist/protocols/open-responses.d.ts +30 -0
- package/dist/protocols/open-responses.js +8 -18
- package/dist/protocols/openai-chat.d.ts +713 -1
- package/dist/protocols/openai-chat.js +35 -22
- package/dist/protocols/openai-compatible-chat.d.ts +22 -1
- package/dist/protocols/openai-compatible-responses.d.ts +8 -5
- package/dist/protocols/openai-decisions.d.ts +22 -0
- package/dist/protocols/openai-decisions.js +128 -0
- package/dist/protocols/openai-images.d.ts +21 -24
- package/dist/protocols/openai-images.js +100 -34
- package/dist/protocols/openai-responses.d.ts +82 -24
- package/dist/protocols/openai-responses.js +32 -2
- package/dist/protocols/openai-speech.d.ts +0 -18
- package/dist/protocols/openai-speech.js +15 -5
- package/dist/protocols/openai-transcription.d.ts +0 -18
- package/dist/protocols/openai-transcription.js +3 -4
- package/dist/protocols/replicate-images.js +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/runway-video.js +1 -1
- package/dist/protocols/shared.d.ts +9 -1
- package/dist/protocols/shared.js +13 -2
- package/dist/protocols/stability-images.d.ts +5 -0
- package/dist/protocols/stability-images.js +4 -9
- package/dist/protocols/system-one.d.ts +101 -0
- package/dist/protocols/system-one.js +230 -0
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.js +7 -6
- package/dist/protocols/utils/cache.d.ts +14 -3
- package/dist/protocols/utils/cache.js +11 -4
- package/dist/protocols/utils/gemini-generate-content.d.ts +3 -3
- package/dist/protocols/utils/gemini-generate-content.js +10 -16
- package/dist/protocols/utils/gemini-json-schema.d.ts +5 -0
- package/dist/protocols/utils/gemini-json-schema.js +3 -3
- package/dist/protocols/utils/image-sizing.d.ts +31 -0
- package/dist/protocols/utils/image-sizing.js +73 -0
- package/dist/protocols/utils/media-input.d.ts +4 -5
- package/dist/protocols/utils/media-input.js +8 -5
- package/dist/protocols/utils/speech-stream.d.ts +0 -1
- package/dist/protocols/utils/speech-stream.js +0 -1
- package/dist/protocols/utils/tool-schema.js +15 -5
- package/dist/protocols/utils/tool-stream.d.ts +9 -0
- package/dist/protocols/venice-chat.d.ts +19 -0
- package/dist/protocols/venice-chat.js +1 -1
- package/dist/protocols/xai-images.d.ts +1 -2
- package/dist/protocols/xai-images.js +9 -2
- package/dist/protocols/xai-responses.d.ts +10 -0
- package/dist/protocols/xai-responses.js +28 -2
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/xai-video.js +11 -8
- package/dist/protocols/zai-chat.d.ts +21 -0
- package/dist/protocols/zai-images.d.ts +3 -1
- package/dist/protocols/zai-images.js +12 -11
- package/dist/protocols/zai-messages.d.ts +52 -17
- package/dist/provider-error.js +19 -4
- package/dist/providers/alibaba/images.d.ts +2 -0
- package/dist/providers/alibaba/images.js +1 -0
- package/dist/providers/alibaba.d.ts +79 -18
- package/dist/providers/alibaba.js +16 -8
- package/dist/providers/amazon-bedrock-mantle.d.ts +197 -138
- package/dist/providers/amazon-bedrock.d.ts +34 -14
- package/dist/providers/amazon-bedrock.js +11 -11
- package/dist/providers/anthropic-compatible.d.ts +52 -17
- package/dist/providers/anthropic.d.ts +52 -17
- package/dist/providers/azure/images.d.ts +2 -0
- package/dist/providers/azure/images.js +1 -0
- package/dist/providers/azure.d.ts +50 -9
- package/dist/providers/azure.js +19 -1
- package/dist/providers/baseten/decisions.d.ts +2 -0
- package/dist/providers/baseten/decisions.js +1 -0
- package/dist/providers/baseten.d.ts +51 -1
- package/dist/providers/baseten.js +41 -8
- package/dist/providers/cerebras.d.ts +42 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-ai-gateway/decisions.js +1 -0
- package/dist/providers/cloudflare-ai-gateway.d.ts +177 -43
- package/dist/providers/cloudflare-ai-gateway.js +32 -4
- package/dist/providers/cloudflare-workers-ai/decisions.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/decisions.js +1 -0
- package/dist/providers/cloudflare-workers-ai/images.d.ts +2 -0
- package/dist/providers/cloudflare-workers-ai/images.js +1 -0
- package/dist/providers/cloudflare-workers-ai.d.ts +55 -1
- package/dist/providers/cloudflare-workers-ai.js +45 -9
- package/dist/providers/cohere.d.ts +42 -0
- package/dist/providers/deepinfra.d.ts +42 -0
- package/dist/providers/deepseek.d.ts +42 -0
- package/dist/providers/digitalocean/decisions.d.ts +2 -0
- package/dist/providers/digitalocean/decisions.js +1 -0
- package/dist/providers/digitalocean/images.d.ts +2 -0
- package/dist/providers/digitalocean/images.js +1 -0
- package/dist/providers/digitalocean.d.ts +72 -1
- package/dist/providers/digitalocean.js +39 -8
- package/dist/providers/fireworks.d.ts +42 -0
- package/dist/providers/google/images.d.ts +2 -0
- package/dist/providers/google/images.js +1 -0
- package/dist/providers/google-vertex/images.d.ts +2 -0
- package/dist/providers/google-vertex/images.js +1 -0
- package/dist/providers/google-vertex-chat.d.ts +21 -0
- package/dist/providers/google-vertex-messages.d.ts +52 -17
- package/dist/providers/google-vertex-responses.d.ts +3 -0
- package/dist/providers/google-vertex.d.ts +3 -1
- package/dist/providers/google-vertex.js +30 -13
- package/dist/providers/google.d.ts +5 -4
- package/dist/providers/google.js +15 -8
- package/dist/providers/groq.d.ts +42 -4
- package/dist/providers/groq.js +0 -6
- package/dist/providers/meta.d.ts +197 -138
- package/dist/providers/minimax.d.ts +76 -17
- package/dist/providers/moonshot.d.ts +76 -17
- package/dist/providers/openai/images.d.ts +2 -0
- package/dist/providers/openai/images.js +1 -0
- package/dist/providers/openai-compatible/images.d.ts +2 -0
- package/dist/providers/openai-compatible/images.js +1 -0
- package/dist/providers/openai-compatible-responses.d.ts +3 -0
- package/dist/providers/openai-compatible.d.ts +24 -1
- package/dist/providers/openai-compatible.js +21 -9
- package/dist/providers/openai-options.d.ts +3 -1
- package/dist/providers/openai.d.ts +46 -9
- package/dist/providers/openai.js +20 -4
- package/dist/providers/opencode/decisions.d.ts +2 -0
- package/dist/providers/opencode/decisions.js +1 -0
- package/dist/providers/opencode.d.ts +9 -10
- package/dist/providers/opencode.js +10 -8
- package/dist/providers/openrouter/decisions.d.ts +2 -0
- package/dist/providers/openrouter/decisions.js +1 -0
- package/dist/providers/openrouter/images.d.ts +2 -0
- package/dist/providers/openrouter/images.js +1 -0
- package/dist/providers/openrouter.d.ts +92 -11
- package/dist/providers/openrouter.js +38 -16
- package/dist/providers/togetherai.d.ts +42 -0
- package/dist/providers/typesafe-ai/decisions.d.ts +2 -0
- package/dist/providers/typesafe-ai/decisions.js +1 -0
- package/dist/providers/typesafe-ai.d.ts +9 -10
- package/dist/providers/typesafe-ai.js +10 -8
- package/dist/providers/venice.d.ts +19 -0
- package/dist/providers/vercel-ai-gateway/decisions.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/decisions.js +1 -0
- package/dist/providers/vercel-ai-gateway/images.d.ts +2 -0
- package/dist/providers/vercel-ai-gateway/images.js +1 -0
- package/dist/providers/vercel-ai-gateway.d.ts +10 -16
- package/dist/providers/vercel-ai-gateway.js +31 -85
- package/dist/providers/xai/images.d.ts +2 -0
- package/dist/providers/xai/images.js +1 -0
- package/dist/providers/xai.d.ts +28 -5
- package/dist/providers/xai.js +15 -8
- package/dist/providers/zai/images.d.ts +2 -0
- package/dist/providers/zai/images.js +1 -0
- package/dist/providers/zai-coding-plan.d.ts +76 -17
- package/dist/providers/zai.d.ts +26 -4
- package/dist/providers/zai.js +15 -8
- package/dist/route/client.d.ts +2 -2
- package/dist/route/client.js +26 -4
- package/dist/route/decision.d.ts +58 -0
- package/dist/route/decision.js +75 -0
- package/dist/route/executor.d.ts +1 -1
- package/dist/route/framing.d.ts +2 -0
- package/dist/route/index.d.ts +3 -0
- package/dist/route/index.js +3 -0
- package/dist/route/media-protocol.d.ts +1 -0
- package/dist/route/media-protocol.js +12 -8
- package/dist/route/media.d.ts +5 -1
- package/dist/route/media.js +6 -2
- package/dist/route/transport/http.js +1 -0
- package/dist/route/transport/index.d.ts +1 -0
- package/dist/schema/events.d.ts +148 -6
- package/dist/schema/events.js +20 -0
- package/dist/schema/messages.d.ts +6 -2
- package/dist/schema/messages.js +3 -0
- package/dist/schema/options.d.ts +5 -3
- package/dist/schema/options.js +8 -3
- package/dist/speech-client.d.ts +5 -14
- package/dist/speech-client.js +0 -1
- package/dist/speech.d.ts +0 -135
- package/dist/speech.js +2 -4
- package/dist/testing.d.ts +25 -24
- package/dist/testing.js +3 -21
- package/dist/transcription-client.d.ts +5 -14
- package/dist/transcription.d.ts +0 -135
- package/dist/transcription.js +1 -1
- package/dist/utils/media-type.js +22 -1
- package/dist/video-client.d.ts +5 -14
- package/dist/video-client.js +0 -1
- package/dist/video.d.ts +1 -136
- package/dist/video.js +3 -5
- package/package.json +513 -11
- package/dist/experimental/evaluation-client.d.ts +0 -21
- package/dist/experimental/evaluation-client.js +0 -64
- package/dist/experimental/evaluation.d.ts +0 -242
- package/dist/experimental/evaluation.js +0 -108
- package/dist/experimental/system-one.d.ts +0 -16
- package/dist/experimental/system-one.js +0 -135
- package/dist/promise.d.ts +0 -1021
- package/dist/promise.js +0 -101
- package/dist/provider.d.ts +0 -23
- package/dist/provider.js +0 -2
|
@@ -77,6 +77,11 @@ export declare const OpenAIChatMessage: Schema.toTaggedUnion<"role", readonly [S
|
|
|
77
77
|
readonly image_url: Schema.Struct<{
|
|
78
78
|
readonly url: Schema.String;
|
|
79
79
|
}>;
|
|
80
|
+
}>, Schema.Struct<{
|
|
81
|
+
readonly type: Schema.Literal<"video_url">;
|
|
82
|
+
readonly video_url: Schema.Struct<{
|
|
83
|
+
readonly url: Schema.String;
|
|
84
|
+
}>;
|
|
80
85
|
}>, Schema.Struct<{
|
|
81
86
|
readonly type: Schema.Literal<"file">;
|
|
82
87
|
readonly file: Schema.Struct<{
|
|
@@ -98,6 +103,11 @@ export declare const OpenAIChatMessage: Schema.toTaggedUnion<"role", readonly [S
|
|
|
98
103
|
readonly image_url: Schema.Struct<{
|
|
99
104
|
readonly url: Schema.String;
|
|
100
105
|
}>;
|
|
106
|
+
}>, Schema.Struct<{
|
|
107
|
+
readonly type: Schema.Literal<"video_url">;
|
|
108
|
+
readonly video_url: Schema.Struct<{
|
|
109
|
+
readonly url: Schema.String;
|
|
110
|
+
}>;
|
|
101
111
|
}>, Schema.Struct<{
|
|
102
112
|
readonly type: Schema.Literal<"file">;
|
|
103
113
|
readonly file: Schema.Struct<{
|
|
@@ -161,6 +171,11 @@ export declare const bodyFields: {
|
|
|
161
171
|
readonly image_url: Schema.Struct<{
|
|
162
172
|
readonly url: Schema.String;
|
|
163
173
|
}>;
|
|
174
|
+
}>, Schema.Struct<{
|
|
175
|
+
readonly type: Schema.Literal<"video_url">;
|
|
176
|
+
readonly video_url: Schema.Struct<{
|
|
177
|
+
readonly url: Schema.String;
|
|
178
|
+
}>;
|
|
164
179
|
}>, Schema.Struct<{
|
|
165
180
|
readonly type: Schema.Literal<"file">;
|
|
166
181
|
readonly file: Schema.Struct<{
|
|
@@ -182,6 +197,11 @@ export declare const bodyFields: {
|
|
|
182
197
|
readonly image_url: Schema.Struct<{
|
|
183
198
|
readonly url: Schema.String;
|
|
184
199
|
}>;
|
|
200
|
+
}>, Schema.Struct<{
|
|
201
|
+
readonly type: Schema.Literal<"video_url">;
|
|
202
|
+
readonly video_url: Schema.Struct<{
|
|
203
|
+
readonly url: Schema.String;
|
|
204
|
+
}>;
|
|
185
205
|
}>, Schema.Struct<{
|
|
186
206
|
readonly type: Schema.Literal<"file">;
|
|
187
207
|
readonly file: Schema.Struct<{
|
|
@@ -253,7 +273,16 @@ export declare const bodyFields: {
|
|
|
253
273
|
}>>;
|
|
254
274
|
store: Schema.optional<Schema.Boolean>;
|
|
255
275
|
prompt_cache_key: Schema.optional<Schema.String>;
|
|
276
|
+
prompt_cache_retention: Schema.optional<Schema.String>;
|
|
277
|
+
prompt_cache_options: Schema.optional<Schema.Struct<{
|
|
278
|
+
readonly ttl: Schema.optional<Schema.String>;
|
|
279
|
+
}>>;
|
|
256
280
|
reasoning_effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
|
|
281
|
+
verbosity: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium">, import("../schema/options.js").OpenString<"high" | "low" | "medium">>>;
|
|
282
|
+
service_tier: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">, import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">>>;
|
|
283
|
+
parallel_tool_calls: Schema.optional<Schema.Boolean>;
|
|
284
|
+
metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
285
|
+
safety_identifier: Schema.optional<Schema.String>;
|
|
257
286
|
tool_stream: Schema.optional<Schema.Boolean>;
|
|
258
287
|
max_completion_tokens: Schema.optional<Schema.Number>;
|
|
259
288
|
max_tokens: Schema.optional<Schema.Number>;
|
|
@@ -280,6 +309,11 @@ declare const OpenAIChatBody: Schema.Struct<{
|
|
|
280
309
|
readonly image_url: Schema.Struct<{
|
|
281
310
|
readonly url: Schema.String;
|
|
282
311
|
}>;
|
|
312
|
+
}>, Schema.Struct<{
|
|
313
|
+
readonly type: Schema.Literal<"video_url">;
|
|
314
|
+
readonly video_url: Schema.Struct<{
|
|
315
|
+
readonly url: Schema.String;
|
|
316
|
+
}>;
|
|
283
317
|
}>, Schema.Struct<{
|
|
284
318
|
readonly type: Schema.Literal<"file">;
|
|
285
319
|
readonly file: Schema.Struct<{
|
|
@@ -301,6 +335,11 @@ declare const OpenAIChatBody: Schema.Struct<{
|
|
|
301
335
|
readonly image_url: Schema.Struct<{
|
|
302
336
|
readonly url: Schema.String;
|
|
303
337
|
}>;
|
|
338
|
+
}>, Schema.Struct<{
|
|
339
|
+
readonly type: Schema.Literal<"video_url">;
|
|
340
|
+
readonly video_url: Schema.Struct<{
|
|
341
|
+
readonly url: Schema.String;
|
|
342
|
+
}>;
|
|
304
343
|
}>, Schema.Struct<{
|
|
305
344
|
readonly type: Schema.Literal<"file">;
|
|
306
345
|
readonly file: Schema.Struct<{
|
|
@@ -372,7 +411,16 @@ declare const OpenAIChatBody: Schema.Struct<{
|
|
|
372
411
|
}>>;
|
|
373
412
|
store: Schema.optional<Schema.Boolean>;
|
|
374
413
|
prompt_cache_key: Schema.optional<Schema.String>;
|
|
414
|
+
prompt_cache_retention: Schema.optional<Schema.String>;
|
|
415
|
+
prompt_cache_options: Schema.optional<Schema.Struct<{
|
|
416
|
+
readonly ttl: Schema.optional<Schema.String>;
|
|
417
|
+
}>>;
|
|
375
418
|
reasoning_effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
|
|
419
|
+
verbosity: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium">, import("../schema/options.js").OpenString<"high" | "low" | "medium">>>;
|
|
420
|
+
service_tier: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">, import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority">>>;
|
|
421
|
+
parallel_tool_calls: Schema.optional<Schema.Boolean>;
|
|
422
|
+
metadata: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
423
|
+
safety_identifier: Schema.optional<Schema.String>;
|
|
376
424
|
tool_stream: Schema.optional<Schema.Boolean>;
|
|
377
425
|
max_completion_tokens: Schema.optional<Schema.Number>;
|
|
378
426
|
max_tokens: Schema.optional<Schema.Number>;
|
|
@@ -564,9 +612,437 @@ interface LoweringOptions {
|
|
|
564
612
|
export declare const fromRequest: (request: LLMRequest<import("../schema/options.js").LanguageModel<{
|
|
565
613
|
readonly [x: string]: unknown;
|
|
566
614
|
}, import("../route/client.js").CompactionOperations | undefined>>, options?: LoweringOptions | undefined) => Effect.Effect<{
|
|
615
|
+
prompt_cache_retention?: undefined;
|
|
616
|
+
prompt_cache_options?: undefined;
|
|
617
|
+
store?: boolean | undefined;
|
|
618
|
+
prompt_cache_key?: string | undefined;
|
|
619
|
+
reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
620
|
+
verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
621
|
+
service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
622
|
+
parallel_tool_calls?: boolean | undefined;
|
|
623
|
+
metadata?: {
|
|
624
|
+
readonly [x: string]: string;
|
|
625
|
+
} | undefined;
|
|
626
|
+
safety_identifier?: string | undefined;
|
|
627
|
+
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
628
|
+
messages: ({
|
|
629
|
+
readonly role: "system";
|
|
630
|
+
readonly content: string | readonly ({
|
|
631
|
+
readonly type: "image_url";
|
|
632
|
+
readonly image_url: {
|
|
633
|
+
readonly url: string;
|
|
634
|
+
};
|
|
635
|
+
} | {
|
|
636
|
+
readonly type: "video_url";
|
|
637
|
+
readonly video_url: {
|
|
638
|
+
readonly url: string;
|
|
639
|
+
};
|
|
640
|
+
} | {
|
|
641
|
+
readonly type: "file";
|
|
642
|
+
readonly file: {
|
|
643
|
+
readonly filename: string;
|
|
644
|
+
readonly file_data: string;
|
|
645
|
+
};
|
|
646
|
+
} | {
|
|
647
|
+
readonly type: "text";
|
|
648
|
+
readonly text: string;
|
|
649
|
+
readonly cache_control?: {
|
|
650
|
+
readonly type: "ephemeral";
|
|
651
|
+
readonly ttl?: string | undefined;
|
|
652
|
+
} | undefined;
|
|
653
|
+
})[];
|
|
654
|
+
} | {
|
|
655
|
+
readonly role: "user";
|
|
656
|
+
readonly content: string | readonly ({
|
|
657
|
+
readonly type: "image_url";
|
|
658
|
+
readonly image_url: {
|
|
659
|
+
readonly url: string;
|
|
660
|
+
};
|
|
661
|
+
} | {
|
|
662
|
+
readonly type: "video_url";
|
|
663
|
+
readonly video_url: {
|
|
664
|
+
readonly url: string;
|
|
665
|
+
};
|
|
666
|
+
} | {
|
|
667
|
+
readonly type: "file";
|
|
668
|
+
readonly file: {
|
|
669
|
+
readonly filename: string;
|
|
670
|
+
readonly file_data: string;
|
|
671
|
+
};
|
|
672
|
+
} | {
|
|
673
|
+
readonly type: "text";
|
|
674
|
+
readonly text: string;
|
|
675
|
+
readonly cache_control?: {
|
|
676
|
+
readonly type: "ephemeral";
|
|
677
|
+
readonly ttl?: string | undefined;
|
|
678
|
+
} | undefined;
|
|
679
|
+
})[];
|
|
680
|
+
} | {
|
|
681
|
+
readonly role: "tool";
|
|
682
|
+
readonly tool_call_id: string;
|
|
683
|
+
readonly content: string | readonly {
|
|
684
|
+
readonly type: "text";
|
|
685
|
+
readonly text: string;
|
|
686
|
+
readonly cache_control?: {
|
|
687
|
+
readonly type: "ephemeral";
|
|
688
|
+
readonly ttl?: string | undefined;
|
|
689
|
+
} | undefined;
|
|
690
|
+
}[];
|
|
691
|
+
} | {
|
|
692
|
+
readonly [x: string]: unknown;
|
|
693
|
+
readonly role: "assistant";
|
|
694
|
+
readonly content: string | readonly {
|
|
695
|
+
readonly type: "text";
|
|
696
|
+
readonly text: string;
|
|
697
|
+
readonly cache_control?: {
|
|
698
|
+
readonly type: "ephemeral";
|
|
699
|
+
readonly ttl?: string | undefined;
|
|
700
|
+
} | undefined;
|
|
701
|
+
}[] | null;
|
|
702
|
+
readonly tool_calls?: readonly {
|
|
703
|
+
readonly id: string;
|
|
704
|
+
readonly type: "function";
|
|
705
|
+
readonly function: {
|
|
706
|
+
readonly name: string;
|
|
707
|
+
readonly arguments: string;
|
|
708
|
+
};
|
|
709
|
+
readonly extra_content?: {
|
|
710
|
+
readonly google: {
|
|
711
|
+
readonly thought_signature: string;
|
|
712
|
+
};
|
|
713
|
+
} | undefined;
|
|
714
|
+
}[] | undefined;
|
|
715
|
+
readonly reasoning_content?: string | undefined;
|
|
716
|
+
readonly reasoning?: string | undefined;
|
|
717
|
+
readonly reasoning_text?: string | undefined;
|
|
718
|
+
readonly reasoning_details?: unknown;
|
|
719
|
+
})[];
|
|
720
|
+
tools: {
|
|
721
|
+
readonly type: "function";
|
|
722
|
+
readonly function: {
|
|
723
|
+
readonly name: string;
|
|
724
|
+
readonly description: string;
|
|
725
|
+
readonly parameters: {
|
|
726
|
+
readonly [x: string]: unknown;
|
|
727
|
+
};
|
|
728
|
+
readonly strict?: boolean | undefined;
|
|
729
|
+
};
|
|
730
|
+
readonly cache_control?: {
|
|
731
|
+
readonly type: "ephemeral";
|
|
732
|
+
readonly ttl?: string | undefined;
|
|
733
|
+
} | undefined;
|
|
734
|
+
}[] | undefined;
|
|
735
|
+
tool_choice: "auto" | "none" | "required" | {
|
|
736
|
+
type: "function";
|
|
737
|
+
function: {
|
|
738
|
+
name: string;
|
|
739
|
+
};
|
|
740
|
+
} | undefined;
|
|
741
|
+
stream: true;
|
|
742
|
+
stream_options?: {
|
|
743
|
+
include_usage: boolean;
|
|
744
|
+
} | undefined;
|
|
745
|
+
tool_stream?: boolean | undefined;
|
|
746
|
+
max_completion_tokens: number | undefined;
|
|
747
|
+
temperature: number | undefined;
|
|
748
|
+
top_p: number | undefined;
|
|
749
|
+
frequency_penalty: number | undefined;
|
|
750
|
+
presence_penalty: number | undefined;
|
|
751
|
+
seed: number | undefined;
|
|
752
|
+
stop: readonly string[] | undefined;
|
|
753
|
+
} | {
|
|
754
|
+
prompt_cache_retention: string;
|
|
755
|
+
prompt_cache_options?: undefined;
|
|
756
|
+
store?: boolean | undefined;
|
|
757
|
+
prompt_cache_key?: string | undefined;
|
|
758
|
+
reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
759
|
+
verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
760
|
+
service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
761
|
+
parallel_tool_calls?: boolean | undefined;
|
|
762
|
+
metadata?: {
|
|
763
|
+
readonly [x: string]: string;
|
|
764
|
+
} | undefined;
|
|
765
|
+
safety_identifier?: string | undefined;
|
|
766
|
+
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
767
|
+
messages: ({
|
|
768
|
+
readonly role: "system";
|
|
769
|
+
readonly content: string | readonly ({
|
|
770
|
+
readonly type: "image_url";
|
|
771
|
+
readonly image_url: {
|
|
772
|
+
readonly url: string;
|
|
773
|
+
};
|
|
774
|
+
} | {
|
|
775
|
+
readonly type: "video_url";
|
|
776
|
+
readonly video_url: {
|
|
777
|
+
readonly url: string;
|
|
778
|
+
};
|
|
779
|
+
} | {
|
|
780
|
+
readonly type: "file";
|
|
781
|
+
readonly file: {
|
|
782
|
+
readonly filename: string;
|
|
783
|
+
readonly file_data: string;
|
|
784
|
+
};
|
|
785
|
+
} | {
|
|
786
|
+
readonly type: "text";
|
|
787
|
+
readonly text: string;
|
|
788
|
+
readonly cache_control?: {
|
|
789
|
+
readonly type: "ephemeral";
|
|
790
|
+
readonly ttl?: string | undefined;
|
|
791
|
+
} | undefined;
|
|
792
|
+
})[];
|
|
793
|
+
} | {
|
|
794
|
+
readonly role: "user";
|
|
795
|
+
readonly content: string | readonly ({
|
|
796
|
+
readonly type: "image_url";
|
|
797
|
+
readonly image_url: {
|
|
798
|
+
readonly url: string;
|
|
799
|
+
};
|
|
800
|
+
} | {
|
|
801
|
+
readonly type: "video_url";
|
|
802
|
+
readonly video_url: {
|
|
803
|
+
readonly url: string;
|
|
804
|
+
};
|
|
805
|
+
} | {
|
|
806
|
+
readonly type: "file";
|
|
807
|
+
readonly file: {
|
|
808
|
+
readonly filename: string;
|
|
809
|
+
readonly file_data: string;
|
|
810
|
+
};
|
|
811
|
+
} | {
|
|
812
|
+
readonly type: "text";
|
|
813
|
+
readonly text: string;
|
|
814
|
+
readonly cache_control?: {
|
|
815
|
+
readonly type: "ephemeral";
|
|
816
|
+
readonly ttl?: string | undefined;
|
|
817
|
+
} | undefined;
|
|
818
|
+
})[];
|
|
819
|
+
} | {
|
|
820
|
+
readonly role: "tool";
|
|
821
|
+
readonly tool_call_id: string;
|
|
822
|
+
readonly content: string | readonly {
|
|
823
|
+
readonly type: "text";
|
|
824
|
+
readonly text: string;
|
|
825
|
+
readonly cache_control?: {
|
|
826
|
+
readonly type: "ephemeral";
|
|
827
|
+
readonly ttl?: string | undefined;
|
|
828
|
+
} | undefined;
|
|
829
|
+
}[];
|
|
830
|
+
} | {
|
|
831
|
+
readonly [x: string]: unknown;
|
|
832
|
+
readonly role: "assistant";
|
|
833
|
+
readonly content: string | readonly {
|
|
834
|
+
readonly type: "text";
|
|
835
|
+
readonly text: string;
|
|
836
|
+
readonly cache_control?: {
|
|
837
|
+
readonly type: "ephemeral";
|
|
838
|
+
readonly ttl?: string | undefined;
|
|
839
|
+
} | undefined;
|
|
840
|
+
}[] | null;
|
|
841
|
+
readonly tool_calls?: readonly {
|
|
842
|
+
readonly id: string;
|
|
843
|
+
readonly type: "function";
|
|
844
|
+
readonly function: {
|
|
845
|
+
readonly name: string;
|
|
846
|
+
readonly arguments: string;
|
|
847
|
+
};
|
|
848
|
+
readonly extra_content?: {
|
|
849
|
+
readonly google: {
|
|
850
|
+
readonly thought_signature: string;
|
|
851
|
+
};
|
|
852
|
+
} | undefined;
|
|
853
|
+
}[] | undefined;
|
|
854
|
+
readonly reasoning_content?: string | undefined;
|
|
855
|
+
readonly reasoning?: string | undefined;
|
|
856
|
+
readonly reasoning_text?: string | undefined;
|
|
857
|
+
readonly reasoning_details?: unknown;
|
|
858
|
+
})[];
|
|
859
|
+
tools: {
|
|
860
|
+
readonly type: "function";
|
|
861
|
+
readonly function: {
|
|
862
|
+
readonly name: string;
|
|
863
|
+
readonly description: string;
|
|
864
|
+
readonly parameters: {
|
|
865
|
+
readonly [x: string]: unknown;
|
|
866
|
+
};
|
|
867
|
+
readonly strict?: boolean | undefined;
|
|
868
|
+
};
|
|
869
|
+
readonly cache_control?: {
|
|
870
|
+
readonly type: "ephemeral";
|
|
871
|
+
readonly ttl?: string | undefined;
|
|
872
|
+
} | undefined;
|
|
873
|
+
}[] | undefined;
|
|
874
|
+
tool_choice: "auto" | "none" | "required" | {
|
|
875
|
+
type: "function";
|
|
876
|
+
function: {
|
|
877
|
+
name: string;
|
|
878
|
+
};
|
|
879
|
+
} | undefined;
|
|
880
|
+
stream: true;
|
|
881
|
+
stream_options?: {
|
|
882
|
+
include_usage: boolean;
|
|
883
|
+
} | undefined;
|
|
884
|
+
tool_stream?: boolean | undefined;
|
|
885
|
+
max_completion_tokens: number | undefined;
|
|
886
|
+
temperature: number | undefined;
|
|
887
|
+
top_p: number | undefined;
|
|
888
|
+
frequency_penalty: number | undefined;
|
|
889
|
+
presence_penalty: number | undefined;
|
|
890
|
+
seed: number | undefined;
|
|
891
|
+
stop: readonly string[] | undefined;
|
|
892
|
+
} | {
|
|
893
|
+
prompt_cache_retention?: undefined;
|
|
894
|
+
prompt_cache_options: {
|
|
895
|
+
ttl: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s`;
|
|
896
|
+
};
|
|
897
|
+
store?: boolean | undefined;
|
|
898
|
+
prompt_cache_key?: string | undefined;
|
|
899
|
+
reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
900
|
+
verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
901
|
+
service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
902
|
+
parallel_tool_calls?: boolean | undefined;
|
|
903
|
+
metadata?: {
|
|
904
|
+
readonly [x: string]: string;
|
|
905
|
+
} | undefined;
|
|
906
|
+
safety_identifier?: string | undefined;
|
|
907
|
+
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
908
|
+
messages: ({
|
|
909
|
+
readonly role: "system";
|
|
910
|
+
readonly content: string | readonly ({
|
|
911
|
+
readonly type: "image_url";
|
|
912
|
+
readonly image_url: {
|
|
913
|
+
readonly url: string;
|
|
914
|
+
};
|
|
915
|
+
} | {
|
|
916
|
+
readonly type: "video_url";
|
|
917
|
+
readonly video_url: {
|
|
918
|
+
readonly url: string;
|
|
919
|
+
};
|
|
920
|
+
} | {
|
|
921
|
+
readonly type: "file";
|
|
922
|
+
readonly file: {
|
|
923
|
+
readonly filename: string;
|
|
924
|
+
readonly file_data: string;
|
|
925
|
+
};
|
|
926
|
+
} | {
|
|
927
|
+
readonly type: "text";
|
|
928
|
+
readonly text: string;
|
|
929
|
+
readonly cache_control?: {
|
|
930
|
+
readonly type: "ephemeral";
|
|
931
|
+
readonly ttl?: string | undefined;
|
|
932
|
+
} | undefined;
|
|
933
|
+
})[];
|
|
934
|
+
} | {
|
|
935
|
+
readonly role: "user";
|
|
936
|
+
readonly content: string | readonly ({
|
|
937
|
+
readonly type: "image_url";
|
|
938
|
+
readonly image_url: {
|
|
939
|
+
readonly url: string;
|
|
940
|
+
};
|
|
941
|
+
} | {
|
|
942
|
+
readonly type: "video_url";
|
|
943
|
+
readonly video_url: {
|
|
944
|
+
readonly url: string;
|
|
945
|
+
};
|
|
946
|
+
} | {
|
|
947
|
+
readonly type: "file";
|
|
948
|
+
readonly file: {
|
|
949
|
+
readonly filename: string;
|
|
950
|
+
readonly file_data: string;
|
|
951
|
+
};
|
|
952
|
+
} | {
|
|
953
|
+
readonly type: "text";
|
|
954
|
+
readonly text: string;
|
|
955
|
+
readonly cache_control?: {
|
|
956
|
+
readonly type: "ephemeral";
|
|
957
|
+
readonly ttl?: string | undefined;
|
|
958
|
+
} | undefined;
|
|
959
|
+
})[];
|
|
960
|
+
} | {
|
|
961
|
+
readonly role: "tool";
|
|
962
|
+
readonly tool_call_id: string;
|
|
963
|
+
readonly content: string | readonly {
|
|
964
|
+
readonly type: "text";
|
|
965
|
+
readonly text: string;
|
|
966
|
+
readonly cache_control?: {
|
|
967
|
+
readonly type: "ephemeral";
|
|
968
|
+
readonly ttl?: string | undefined;
|
|
969
|
+
} | undefined;
|
|
970
|
+
}[];
|
|
971
|
+
} | {
|
|
972
|
+
readonly [x: string]: unknown;
|
|
973
|
+
readonly role: "assistant";
|
|
974
|
+
readonly content: string | readonly {
|
|
975
|
+
readonly type: "text";
|
|
976
|
+
readonly text: string;
|
|
977
|
+
readonly cache_control?: {
|
|
978
|
+
readonly type: "ephemeral";
|
|
979
|
+
readonly ttl?: string | undefined;
|
|
980
|
+
} | undefined;
|
|
981
|
+
}[] | null;
|
|
982
|
+
readonly tool_calls?: readonly {
|
|
983
|
+
readonly id: string;
|
|
984
|
+
readonly type: "function";
|
|
985
|
+
readonly function: {
|
|
986
|
+
readonly name: string;
|
|
987
|
+
readonly arguments: string;
|
|
988
|
+
};
|
|
989
|
+
readonly extra_content?: {
|
|
990
|
+
readonly google: {
|
|
991
|
+
readonly thought_signature: string;
|
|
992
|
+
};
|
|
993
|
+
} | undefined;
|
|
994
|
+
}[] | undefined;
|
|
995
|
+
readonly reasoning_content?: string | undefined;
|
|
996
|
+
readonly reasoning?: string | undefined;
|
|
997
|
+
readonly reasoning_text?: string | undefined;
|
|
998
|
+
readonly reasoning_details?: unknown;
|
|
999
|
+
})[];
|
|
1000
|
+
tools: {
|
|
1001
|
+
readonly type: "function";
|
|
1002
|
+
readonly function: {
|
|
1003
|
+
readonly name: string;
|
|
1004
|
+
readonly description: string;
|
|
1005
|
+
readonly parameters: {
|
|
1006
|
+
readonly [x: string]: unknown;
|
|
1007
|
+
};
|
|
1008
|
+
readonly strict?: boolean | undefined;
|
|
1009
|
+
};
|
|
1010
|
+
readonly cache_control?: {
|
|
1011
|
+
readonly type: "ephemeral";
|
|
1012
|
+
readonly ttl?: string | undefined;
|
|
1013
|
+
} | undefined;
|
|
1014
|
+
}[] | undefined;
|
|
1015
|
+
tool_choice: "auto" | "none" | "required" | {
|
|
1016
|
+
type: "function";
|
|
1017
|
+
function: {
|
|
1018
|
+
name: string;
|
|
1019
|
+
};
|
|
1020
|
+
} | undefined;
|
|
1021
|
+
stream: true;
|
|
1022
|
+
stream_options?: {
|
|
1023
|
+
include_usage: boolean;
|
|
1024
|
+
} | undefined;
|
|
1025
|
+
tool_stream?: boolean | undefined;
|
|
1026
|
+
max_completion_tokens: number | undefined;
|
|
1027
|
+
temperature: number | undefined;
|
|
1028
|
+
top_p: number | undefined;
|
|
1029
|
+
frequency_penalty: number | undefined;
|
|
1030
|
+
presence_penalty: number | undefined;
|
|
1031
|
+
seed: number | undefined;
|
|
1032
|
+
stop: readonly string[] | undefined;
|
|
1033
|
+
} | {
|
|
1034
|
+
prompt_cache_retention?: undefined;
|
|
1035
|
+
prompt_cache_options?: undefined;
|
|
567
1036
|
store?: boolean | undefined;
|
|
568
1037
|
prompt_cache_key?: string | undefined;
|
|
569
1038
|
reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1039
|
+
verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1040
|
+
service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1041
|
+
parallel_tool_calls?: boolean | undefined;
|
|
1042
|
+
metadata?: {
|
|
1043
|
+
readonly [x: string]: string;
|
|
1044
|
+
} | undefined;
|
|
1045
|
+
safety_identifier?: string | undefined;
|
|
570
1046
|
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
571
1047
|
messages: ({
|
|
572
1048
|
readonly role: "system";
|
|
@@ -575,6 +1051,11 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
|
|
|
575
1051
|
readonly image_url: {
|
|
576
1052
|
readonly url: string;
|
|
577
1053
|
};
|
|
1054
|
+
} | {
|
|
1055
|
+
readonly type: "video_url";
|
|
1056
|
+
readonly video_url: {
|
|
1057
|
+
readonly url: string;
|
|
1058
|
+
};
|
|
578
1059
|
} | {
|
|
579
1060
|
readonly type: "file";
|
|
580
1061
|
readonly file: {
|
|
@@ -596,6 +1077,11 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
|
|
|
596
1077
|
readonly image_url: {
|
|
597
1078
|
readonly url: string;
|
|
598
1079
|
};
|
|
1080
|
+
} | {
|
|
1081
|
+
readonly type: "video_url";
|
|
1082
|
+
readonly video_url: {
|
|
1083
|
+
readonly url: string;
|
|
1084
|
+
};
|
|
599
1085
|
} | {
|
|
600
1086
|
readonly type: "file";
|
|
601
1087
|
readonly file: {
|
|
@@ -676,7 +1162,146 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
|
|
|
676
1162
|
include_usage: boolean;
|
|
677
1163
|
} | undefined;
|
|
678
1164
|
tool_stream?: boolean | undefined;
|
|
679
|
-
|
|
1165
|
+
max_tokens: number | undefined;
|
|
1166
|
+
temperature: number | undefined;
|
|
1167
|
+
top_p: number | undefined;
|
|
1168
|
+
frequency_penalty: number | undefined;
|
|
1169
|
+
presence_penalty: number | undefined;
|
|
1170
|
+
seed: number | undefined;
|
|
1171
|
+
stop: readonly string[] | undefined;
|
|
1172
|
+
} | {
|
|
1173
|
+
prompt_cache_retention: string;
|
|
1174
|
+
prompt_cache_options?: undefined;
|
|
1175
|
+
store?: boolean | undefined;
|
|
1176
|
+
prompt_cache_key?: string | undefined;
|
|
1177
|
+
reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1178
|
+
verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1179
|
+
service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1180
|
+
parallel_tool_calls?: boolean | undefined;
|
|
1181
|
+
metadata?: {
|
|
1182
|
+
readonly [x: string]: string;
|
|
1183
|
+
} | undefined;
|
|
1184
|
+
safety_identifier?: string | undefined;
|
|
1185
|
+
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
1186
|
+
messages: ({
|
|
1187
|
+
readonly role: "system";
|
|
1188
|
+
readonly content: string | readonly ({
|
|
1189
|
+
readonly type: "image_url";
|
|
1190
|
+
readonly image_url: {
|
|
1191
|
+
readonly url: string;
|
|
1192
|
+
};
|
|
1193
|
+
} | {
|
|
1194
|
+
readonly type: "video_url";
|
|
1195
|
+
readonly video_url: {
|
|
1196
|
+
readonly url: string;
|
|
1197
|
+
};
|
|
1198
|
+
} | {
|
|
1199
|
+
readonly type: "file";
|
|
1200
|
+
readonly file: {
|
|
1201
|
+
readonly filename: string;
|
|
1202
|
+
readonly file_data: string;
|
|
1203
|
+
};
|
|
1204
|
+
} | {
|
|
1205
|
+
readonly type: "text";
|
|
1206
|
+
readonly text: string;
|
|
1207
|
+
readonly cache_control?: {
|
|
1208
|
+
readonly type: "ephemeral";
|
|
1209
|
+
readonly ttl?: string | undefined;
|
|
1210
|
+
} | undefined;
|
|
1211
|
+
})[];
|
|
1212
|
+
} | {
|
|
1213
|
+
readonly role: "user";
|
|
1214
|
+
readonly content: string | readonly ({
|
|
1215
|
+
readonly type: "image_url";
|
|
1216
|
+
readonly image_url: {
|
|
1217
|
+
readonly url: string;
|
|
1218
|
+
};
|
|
1219
|
+
} | {
|
|
1220
|
+
readonly type: "video_url";
|
|
1221
|
+
readonly video_url: {
|
|
1222
|
+
readonly url: string;
|
|
1223
|
+
};
|
|
1224
|
+
} | {
|
|
1225
|
+
readonly type: "file";
|
|
1226
|
+
readonly file: {
|
|
1227
|
+
readonly filename: string;
|
|
1228
|
+
readonly file_data: string;
|
|
1229
|
+
};
|
|
1230
|
+
} | {
|
|
1231
|
+
readonly type: "text";
|
|
1232
|
+
readonly text: string;
|
|
1233
|
+
readonly cache_control?: {
|
|
1234
|
+
readonly type: "ephemeral";
|
|
1235
|
+
readonly ttl?: string | undefined;
|
|
1236
|
+
} | undefined;
|
|
1237
|
+
})[];
|
|
1238
|
+
} | {
|
|
1239
|
+
readonly role: "tool";
|
|
1240
|
+
readonly tool_call_id: string;
|
|
1241
|
+
readonly content: string | readonly {
|
|
1242
|
+
readonly type: "text";
|
|
1243
|
+
readonly text: string;
|
|
1244
|
+
readonly cache_control?: {
|
|
1245
|
+
readonly type: "ephemeral";
|
|
1246
|
+
readonly ttl?: string | undefined;
|
|
1247
|
+
} | undefined;
|
|
1248
|
+
}[];
|
|
1249
|
+
} | {
|
|
1250
|
+
readonly [x: string]: unknown;
|
|
1251
|
+
readonly role: "assistant";
|
|
1252
|
+
readonly content: string | readonly {
|
|
1253
|
+
readonly type: "text";
|
|
1254
|
+
readonly text: string;
|
|
1255
|
+
readonly cache_control?: {
|
|
1256
|
+
readonly type: "ephemeral";
|
|
1257
|
+
readonly ttl?: string | undefined;
|
|
1258
|
+
} | undefined;
|
|
1259
|
+
}[] | null;
|
|
1260
|
+
readonly tool_calls?: readonly {
|
|
1261
|
+
readonly id: string;
|
|
1262
|
+
readonly type: "function";
|
|
1263
|
+
readonly function: {
|
|
1264
|
+
readonly name: string;
|
|
1265
|
+
readonly arguments: string;
|
|
1266
|
+
};
|
|
1267
|
+
readonly extra_content?: {
|
|
1268
|
+
readonly google: {
|
|
1269
|
+
readonly thought_signature: string;
|
|
1270
|
+
};
|
|
1271
|
+
} | undefined;
|
|
1272
|
+
}[] | undefined;
|
|
1273
|
+
readonly reasoning_content?: string | undefined;
|
|
1274
|
+
readonly reasoning?: string | undefined;
|
|
1275
|
+
readonly reasoning_text?: string | undefined;
|
|
1276
|
+
readonly reasoning_details?: unknown;
|
|
1277
|
+
})[];
|
|
1278
|
+
tools: {
|
|
1279
|
+
readonly type: "function";
|
|
1280
|
+
readonly function: {
|
|
1281
|
+
readonly name: string;
|
|
1282
|
+
readonly description: string;
|
|
1283
|
+
readonly parameters: {
|
|
1284
|
+
readonly [x: string]: unknown;
|
|
1285
|
+
};
|
|
1286
|
+
readonly strict?: boolean | undefined;
|
|
1287
|
+
};
|
|
1288
|
+
readonly cache_control?: {
|
|
1289
|
+
readonly type: "ephemeral";
|
|
1290
|
+
readonly ttl?: string | undefined;
|
|
1291
|
+
} | undefined;
|
|
1292
|
+
}[] | undefined;
|
|
1293
|
+
tool_choice: "auto" | "none" | "required" | {
|
|
1294
|
+
type: "function";
|
|
1295
|
+
function: {
|
|
1296
|
+
name: string;
|
|
1297
|
+
};
|
|
1298
|
+
} | undefined;
|
|
1299
|
+
stream: true;
|
|
1300
|
+
stream_options?: {
|
|
1301
|
+
include_usage: boolean;
|
|
1302
|
+
} | undefined;
|
|
1303
|
+
tool_stream?: boolean | undefined;
|
|
1304
|
+
max_tokens: number | undefined;
|
|
680
1305
|
temperature: number | undefined;
|
|
681
1306
|
top_p: number | undefined;
|
|
682
1307
|
frequency_penalty: number | undefined;
|
|
@@ -684,9 +1309,20 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
|
|
|
684
1309
|
seed: number | undefined;
|
|
685
1310
|
stop: readonly string[] | undefined;
|
|
686
1311
|
} | {
|
|
1312
|
+
prompt_cache_retention?: undefined;
|
|
1313
|
+
prompt_cache_options: {
|
|
1314
|
+
ttl: `${number}d` | `${number}h` | `${number}m` | `${number}ms` | `${number}s`;
|
|
1315
|
+
};
|
|
687
1316
|
store?: boolean | undefined;
|
|
688
1317
|
prompt_cache_key?: string | undefined;
|
|
689
1318
|
reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1319
|
+
verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1320
|
+
service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1321
|
+
parallel_tool_calls?: boolean | undefined;
|
|
1322
|
+
metadata?: {
|
|
1323
|
+
readonly [x: string]: string;
|
|
1324
|
+
} | undefined;
|
|
1325
|
+
safety_identifier?: string | undefined;
|
|
690
1326
|
model: string & import("effect/Brand").Brand<"AI.ModelID">;
|
|
691
1327
|
messages: ({
|
|
692
1328
|
readonly role: "system";
|
|
@@ -695,6 +1331,11 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
|
|
|
695
1331
|
readonly image_url: {
|
|
696
1332
|
readonly url: string;
|
|
697
1333
|
};
|
|
1334
|
+
} | {
|
|
1335
|
+
readonly type: "video_url";
|
|
1336
|
+
readonly video_url: {
|
|
1337
|
+
readonly url: string;
|
|
1338
|
+
};
|
|
698
1339
|
} | {
|
|
699
1340
|
readonly type: "file";
|
|
700
1341
|
readonly file: {
|
|
@@ -716,6 +1357,11 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
|
|
|
716
1357
|
readonly image_url: {
|
|
717
1358
|
readonly url: string;
|
|
718
1359
|
};
|
|
1360
|
+
} | {
|
|
1361
|
+
readonly type: "video_url";
|
|
1362
|
+
readonly video_url: {
|
|
1363
|
+
readonly url: string;
|
|
1364
|
+
};
|
|
719
1365
|
} | {
|
|
720
1366
|
readonly type: "file";
|
|
721
1367
|
readonly file: {
|
|
@@ -807,6 +1453,9 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
|
|
|
807
1453
|
export declare const finishEvents: (state: ParserState) => Effect.Effect<({
|
|
808
1454
|
readonly type: "step-start";
|
|
809
1455
|
readonly index: number;
|
|
1456
|
+
} | {
|
|
1457
|
+
readonly type: "raw";
|
|
1458
|
+
readonly data: unknown;
|
|
810
1459
|
} | {
|
|
811
1460
|
readonly type: "text-start";
|
|
812
1461
|
readonly id: string;
|
|
@@ -1035,6 +1684,11 @@ export declare const protocol: Protocol<{
|
|
|
1035
1684
|
readonly image_url: {
|
|
1036
1685
|
readonly url: string;
|
|
1037
1686
|
};
|
|
1687
|
+
} | {
|
|
1688
|
+
readonly type: "video_url";
|
|
1689
|
+
readonly video_url: {
|
|
1690
|
+
readonly url: string;
|
|
1691
|
+
};
|
|
1038
1692
|
} | {
|
|
1039
1693
|
readonly type: "file";
|
|
1040
1694
|
readonly file: {
|
|
@@ -1056,6 +1710,11 @@ export declare const protocol: Protocol<{
|
|
|
1056
1710
|
readonly image_url: {
|
|
1057
1711
|
readonly url: string;
|
|
1058
1712
|
};
|
|
1713
|
+
} | {
|
|
1714
|
+
readonly type: "video_url";
|
|
1715
|
+
readonly video_url: {
|
|
1716
|
+
readonly url: string;
|
|
1717
|
+
};
|
|
1059
1718
|
} | {
|
|
1060
1719
|
readonly type: "file";
|
|
1061
1720
|
readonly file: {
|
|
@@ -1137,7 +1796,18 @@ export declare const protocol: Protocol<{
|
|
|
1137
1796
|
} | undefined;
|
|
1138
1797
|
readonly store?: boolean | undefined;
|
|
1139
1798
|
readonly prompt_cache_key?: string | undefined;
|
|
1799
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
1800
|
+
readonly prompt_cache_options?: {
|
|
1801
|
+
readonly ttl?: string | undefined;
|
|
1802
|
+
} | undefined;
|
|
1140
1803
|
readonly reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
1804
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
1805
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
1806
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
1807
|
+
readonly metadata?: {
|
|
1808
|
+
readonly [x: string]: string;
|
|
1809
|
+
} | undefined;
|
|
1810
|
+
readonly safety_identifier?: string | undefined;
|
|
1141
1811
|
readonly tool_stream?: boolean | undefined;
|
|
1142
1812
|
readonly max_completion_tokens?: number | undefined;
|
|
1143
1813
|
readonly max_tokens?: number | undefined;
|
|
@@ -1230,6 +1900,11 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1230
1900
|
readonly image_url: {
|
|
1231
1901
|
readonly url: string;
|
|
1232
1902
|
};
|
|
1903
|
+
} | {
|
|
1904
|
+
readonly type: "video_url";
|
|
1905
|
+
readonly video_url: {
|
|
1906
|
+
readonly url: string;
|
|
1907
|
+
};
|
|
1233
1908
|
} | {
|
|
1234
1909
|
readonly type: "file";
|
|
1235
1910
|
readonly file: {
|
|
@@ -1251,6 +1926,11 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1251
1926
|
readonly image_url: {
|
|
1252
1927
|
readonly url: string;
|
|
1253
1928
|
};
|
|
1929
|
+
} | {
|
|
1930
|
+
readonly type: "video_url";
|
|
1931
|
+
readonly video_url: {
|
|
1932
|
+
readonly url: string;
|
|
1933
|
+
};
|
|
1254
1934
|
} | {
|
|
1255
1935
|
readonly type: "file";
|
|
1256
1936
|
readonly file: {
|
|
@@ -1332,7 +2012,18 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
|
|
|
1332
2012
|
} | undefined;
|
|
1333
2013
|
readonly store?: boolean | undefined;
|
|
1334
2014
|
readonly prompt_cache_key?: string | undefined;
|
|
2015
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
2016
|
+
readonly prompt_cache_options?: {
|
|
2017
|
+
readonly ttl?: string | undefined;
|
|
2018
|
+
} | undefined;
|
|
1335
2019
|
readonly reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
2020
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
2021
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
2022
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
2023
|
+
readonly metadata?: {
|
|
2024
|
+
readonly [x: string]: string;
|
|
2025
|
+
} | undefined;
|
|
2026
|
+
readonly safety_identifier?: string | undefined;
|
|
1336
2027
|
readonly tool_stream?: boolean | undefined;
|
|
1337
2028
|
readonly max_completion_tokens?: number | undefined;
|
|
1338
2029
|
readonly max_tokens?: number | undefined;
|
|
@@ -1352,6 +2043,11 @@ export declare const route: Route<{
|
|
|
1352
2043
|
readonly image_url: {
|
|
1353
2044
|
readonly url: string;
|
|
1354
2045
|
};
|
|
2046
|
+
} | {
|
|
2047
|
+
readonly type: "video_url";
|
|
2048
|
+
readonly video_url: {
|
|
2049
|
+
readonly url: string;
|
|
2050
|
+
};
|
|
1355
2051
|
} | {
|
|
1356
2052
|
readonly type: "file";
|
|
1357
2053
|
readonly file: {
|
|
@@ -1373,6 +2069,11 @@ export declare const route: Route<{
|
|
|
1373
2069
|
readonly image_url: {
|
|
1374
2070
|
readonly url: string;
|
|
1375
2071
|
};
|
|
2072
|
+
} | {
|
|
2073
|
+
readonly type: "video_url";
|
|
2074
|
+
readonly video_url: {
|
|
2075
|
+
readonly url: string;
|
|
2076
|
+
};
|
|
1376
2077
|
} | {
|
|
1377
2078
|
readonly type: "file";
|
|
1378
2079
|
readonly file: {
|
|
@@ -1454,7 +2155,18 @@ export declare const route: Route<{
|
|
|
1454
2155
|
} | undefined;
|
|
1455
2156
|
readonly store?: boolean | undefined;
|
|
1456
2157
|
readonly prompt_cache_key?: string | undefined;
|
|
2158
|
+
readonly prompt_cache_retention?: string | undefined;
|
|
2159
|
+
readonly prompt_cache_options?: {
|
|
2160
|
+
readonly ttl?: string | undefined;
|
|
2161
|
+
} | undefined;
|
|
1457
2162
|
readonly reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
|
|
2163
|
+
readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
|
|
2164
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
|
|
2165
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
2166
|
+
readonly metadata?: {
|
|
2167
|
+
readonly [x: string]: string;
|
|
2168
|
+
} | undefined;
|
|
2169
|
+
readonly safety_identifier?: string | undefined;
|
|
1458
2170
|
readonly tool_stream?: boolean | undefined;
|
|
1459
2171
|
readonly max_completion_tokens?: number | undefined;
|
|
1460
2172
|
readonly max_tokens?: number | undefined;
|