@opencode/ai 2.0.32 → 2.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/dist/ai-client.d.ts +2 -2
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation.d.ts +20 -20
- package/dist/experimental/realtime.d.ts +6 -14
- package/dist/experimental/realtime.js +28 -3
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +593 -437
- package/dist/llm.d.ts +51 -51
- package/dist/media-client.d.ts +1 -1
- package/dist/media.d.ts +4 -4
- package/dist/promise.d.ts +199 -198
- package/dist/protocols/alibaba-chat.d.ts +81 -82
- package/dist/protocols/alibaba-chat.js +0 -1
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +120 -120
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- package/dist/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/assemblyai-transcription.d.ts +1 -1
- package/dist/protocols/bedrock-converse.d.ts +75 -79
- package/dist/protocols/bfl-images.d.ts +1 -1
- package/dist/protocols/cartesia-speech.d.ts +17 -17
- package/dist/protocols/cohere-chat.d.ts +26 -23
- package/dist/protocols/cohere-chat.js +22 -1
- package/dist/protocols/deepgram-speech.d.ts +17 -17
- package/dist/protocols/deepgram-transcription.d.ts +1 -1
- package/dist/protocols/elevenlabs-speech.d.ts +17 -17
- package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
- package/dist/protocols/fal-images.d.ts +1 -1
- package/dist/protocols/fal-video.d.ts +1 -1
- package/dist/protocols/gemini.d.ts +55 -55
- package/dist/protocols/google-images.d.ts +1 -1
- package/dist/protocols/google-interactions.d.ts +64 -62
- package/dist/protocols/google-interactions.js +19 -1
- package/dist/protocols/google-speech.d.ts +17 -17
- package/dist/protocols/google-transcription.d.ts +47 -47
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +121 -121
- package/dist/protocols/meta-responses.d.ts +201 -201
- package/dist/protocols/mistral-chat.d.ts +45 -45
- package/dist/protocols/open-responses-channel.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +584 -450
- package/dist/protocols/open-responses.js +27 -35
- package/dist/protocols/openai-chat.d.ts +248 -248
- package/dist/protocols/openai-chat.js +11 -42
- package/dist/protocols/openai-compatible-chat.d.ts +32 -32
- package/dist/protocols/openai-compatible-responses.d.ts +88 -88
- package/dist/protocols/openai-images.d.ts +17 -17
- package/dist/protocols/openai-responses.d.ts +567 -567
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +17 -17
- package/dist/protocols/openai-transcription.d.ts +47 -47
- package/dist/protocols/replicate-images.d.ts +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/shared.d.ts +12 -1
- package/dist/protocols/shared.js +17 -1
- package/dist/protocols/stability-images.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +4 -4
- package/dist/protocols/utils/openai-options.d.ts +1 -1
- package/dist/protocols/utils/speech-stream.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.d.ts +10 -5
- package/dist/protocols/utils/tool-stream.d.ts +152 -152
- package/dist/protocols/venice-chat.d.ts +109 -110
- package/dist/protocols/venice-chat.js +0 -1
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +79 -79
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -78
- package/dist/protocols/zai-chat.js +0 -1
- package/dist/protocols/zai-images.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +97 -97
- package/dist/providers/alibaba.d.ts +222 -283
- package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
- package/dist/providers/amazon-bedrock.d.ts +22 -28
- package/dist/providers/anthropic-compatible.d.ts +86 -90
- package/dist/providers/anthropic.d.ts +86 -90
- package/dist/providers/assemblyai.d.ts +2 -6
- package/dist/providers/azure.d.ts +228 -238
- package/dist/providers/baseten.d.ts +66 -70
- package/dist/providers/black-forest-labs.d.ts +2 -6
- package/dist/providers/cartesia.d.ts +2 -6
- package/dist/providers/cerebras.d.ts +66 -70
- package/dist/providers/cerebras.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
- package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
- package/dist/providers/cohere.d.ts +122 -132
- package/dist/providers/cohere.js +0 -2
- package/dist/providers/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepinfra.js +0 -1
- package/dist/providers/deepseek.d.ts +66 -70
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/digitalocean.d.ts +137 -141
- package/dist/providers/elevenlabs.d.ts +2 -7
- package/dist/providers/fal.d.ts +2 -7
- package/dist/providers/fireworks.d.ts +66 -70
- package/dist/providers/google-vertex-chat.d.ts +34 -38
- package/dist/providers/google-vertex-interactions.d.ts +31 -41
- package/dist/providers/google-vertex-messages.d.ts +81 -85
- package/dist/providers/google-vertex-mistral.d.ts +23 -27
- package/dist/providers/google-vertex-responses.d.ts +90 -94
- package/dist/providers/google-vertex.d.ts +26 -30
- package/dist/providers/google.d.ts +94 -109
- package/dist/providers/groq.d.ts +111 -115
- package/dist/providers/groq.js +0 -1
- package/dist/providers/meta.d.ts +309 -317
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- package/dist/providers/moonshot.js +0 -1
- package/dist/providers/openai-compatible-responses.d.ts +90 -94
- package/dist/providers/openai-compatible.d.ts +34 -38
- package/dist/providers/openai.d.ts +93 -108
- package/dist/providers/opencode.d.ts +2 -8
- package/dist/providers/openrouter.d.ts +137 -144
- package/dist/providers/replicate.d.ts +2 -6
- package/dist/providers/runway.d.ts +2 -6
- package/dist/providers/stability.d.ts +2 -7
- package/dist/providers/togetherai.d.ts +66 -70
- package/dist/providers/togetherai.js +1 -1
- package/dist/providers/typesafe-ai.d.ts +2 -8
- package/dist/providers/venice.d.ts +58 -63
- package/dist/providers/vercel-ai-gateway.d.ts +2 -12
- package/dist/providers/xai.d.ts +38 -50
- package/dist/providers/zai-coding-plan.d.ts +206 -213
- package/dist/providers/zai.d.ts +40 -46
- package/dist/route/client.d.ts +51 -51
- package/dist/route/media-protocol.d.ts +1 -1
- package/dist/route/transport/http.d.ts +1 -1
- package/dist/route/transport/websocket.d.ts +8 -8
- package/dist/schema/errors.d.ts +19 -19
- package/dist/schema/events.d.ts +3090 -3288
- package/dist/schema/messages.d.ts +8 -7
- package/dist/schema/options.d.ts +2 -1
- package/dist/schema/options.js +2 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +434 -398
- package/dist/testing.d.ts +338 -338
- package/dist/tool-runtime.d.ts +1 -1
- package/dist/transcription-client.d.ts +23 -23
- package/dist/transcription.d.ts +562 -646
- package/dist/utils/sanitize.d.ts +4 -0
- package/dist/utils/sanitize.js +23 -6
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
|
@@ -22,64 +22,20 @@ export type Settings = ProviderPackage.Settings & OpenAIProviderOptionsInput & A
|
|
|
22
22
|
readonly useDeploymentBasedUrls?: boolean;
|
|
23
23
|
};
|
|
24
24
|
declare const responsesRoute: Route<{
|
|
25
|
+
readonly model: string;
|
|
25
26
|
readonly input: readonly ({
|
|
26
27
|
readonly [x: string]: unknown;
|
|
28
|
+
readonly type: string;
|
|
27
29
|
readonly id: string;
|
|
28
|
-
readonly type: "web_search_call";
|
|
29
|
-
readonly status?: string | undefined;
|
|
30
|
-
readonly action?: {
|
|
31
|
-
readonly [x: string]: unknown;
|
|
32
|
-
} | null | undefined;
|
|
33
|
-
} | {
|
|
34
|
-
readonly [x: string]: unknown;
|
|
35
|
-
readonly id: string;
|
|
36
|
-
readonly type: "file_search_call";
|
|
37
|
-
readonly status?: string | undefined;
|
|
38
|
-
readonly queries?: readonly string[] | undefined;
|
|
39
|
-
readonly results?: readonly {
|
|
40
|
-
readonly [x: string]: unknown;
|
|
41
|
-
}[] | null | undefined;
|
|
42
|
-
} | {
|
|
43
|
-
readonly [x: string]: unknown;
|
|
44
|
-
readonly id: string;
|
|
45
|
-
readonly type: "code_interpreter_call";
|
|
46
|
-
readonly status?: string | undefined;
|
|
47
|
-
readonly code?: string | null | undefined;
|
|
48
|
-
readonly container_id?: string | null | undefined;
|
|
49
|
-
readonly outputs?: readonly {
|
|
50
|
-
readonly [x: string]: unknown;
|
|
51
|
-
}[] | null | undefined;
|
|
52
30
|
} | {
|
|
53
|
-
readonly
|
|
54
|
-
readonly id
|
|
55
|
-
readonly
|
|
56
|
-
readonly status?: string | undefined;
|
|
57
|
-
readonly name?: string | undefined;
|
|
58
|
-
readonly output?: string | null | undefined;
|
|
59
|
-
readonly error?: unknown;
|
|
60
|
-
readonly arguments?: string | undefined;
|
|
61
|
-
readonly server_label?: string | undefined;
|
|
31
|
+
readonly type: "compaction";
|
|
32
|
+
readonly id?: string | null | undefined;
|
|
33
|
+
readonly encrypted_content: string;
|
|
62
34
|
} | {
|
|
63
35
|
readonly type: "configuration_update";
|
|
64
36
|
readonly reasoning: {
|
|
65
37
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
66
38
|
};
|
|
67
|
-
} | {
|
|
68
|
-
readonly [x: string]: unknown;
|
|
69
|
-
readonly type: string;
|
|
70
|
-
readonly id: string;
|
|
71
|
-
} | {
|
|
72
|
-
readonly type: "reasoning";
|
|
73
|
-
readonly summary: readonly {
|
|
74
|
-
readonly type: "summary_text";
|
|
75
|
-
readonly text: string;
|
|
76
|
-
}[];
|
|
77
|
-
readonly id?: string | undefined;
|
|
78
|
-
readonly encrypted_content?: string | null | undefined;
|
|
79
|
-
} | {
|
|
80
|
-
readonly type: "compaction";
|
|
81
|
-
readonly encrypted_content: string;
|
|
82
|
-
readonly id?: string | null | undefined;
|
|
83
39
|
} | {
|
|
84
40
|
readonly type: "message";
|
|
85
41
|
readonly role: "system";
|
|
@@ -90,6 +46,7 @@ declare const responsesRoute: Route<{
|
|
|
90
46
|
readonly content: string;
|
|
91
47
|
} | {
|
|
92
48
|
readonly type: "message";
|
|
49
|
+
readonly role: "user";
|
|
93
50
|
readonly content: readonly ({
|
|
94
51
|
readonly type: "input_image";
|
|
95
52
|
readonly image_url: string;
|
|
@@ -104,26 +61,33 @@ declare const responsesRoute: Route<{
|
|
|
104
61
|
readonly type: "input_text";
|
|
105
62
|
readonly text: string;
|
|
106
63
|
})[];
|
|
107
|
-
readonly role: "user";
|
|
108
64
|
readonly id?: string | undefined;
|
|
109
65
|
readonly status?: string | undefined;
|
|
110
66
|
} | {
|
|
111
67
|
readonly type: "message";
|
|
68
|
+
readonly id?: string | undefined;
|
|
69
|
+
readonly role: "assistant";
|
|
112
70
|
readonly content: readonly {
|
|
113
71
|
readonly type: "output_text";
|
|
114
72
|
readonly text: string;
|
|
115
73
|
}[];
|
|
116
|
-
readonly role: "assistant";
|
|
117
|
-
readonly id?: string | undefined;
|
|
118
|
-
readonly status?: string | undefined;
|
|
119
74
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
75
|
+
readonly status?: string | undefined;
|
|
76
|
+
} | {
|
|
77
|
+
readonly type: "reasoning";
|
|
78
|
+
readonly id?: string | undefined;
|
|
79
|
+
readonly summary: readonly {
|
|
80
|
+
readonly type: "summary_text";
|
|
81
|
+
readonly text: string;
|
|
82
|
+
}[];
|
|
83
|
+
readonly encrypted_content?: string | null | undefined;
|
|
120
84
|
} | {
|
|
121
85
|
readonly type: "function_call";
|
|
122
|
-
readonly name: string;
|
|
123
|
-
readonly arguments: string;
|
|
124
|
-
readonly call_id: string;
|
|
125
86
|
readonly id?: string | undefined;
|
|
87
|
+
readonly call_id: string;
|
|
88
|
+
readonly name: string;
|
|
126
89
|
readonly namespace?: string | undefined;
|
|
90
|
+
readonly arguments: string;
|
|
127
91
|
} | {
|
|
128
92
|
readonly type: "function_call_output";
|
|
129
93
|
readonly call_id: string;
|
|
@@ -144,64 +108,110 @@ declare const responsesRoute: Route<{
|
|
|
144
108
|
readonly type: "input_video";
|
|
145
109
|
readonly video_url: string;
|
|
146
110
|
})[];
|
|
111
|
+
} | {
|
|
112
|
+
readonly [x: string]: unknown;
|
|
113
|
+
readonly type: "web_search_call";
|
|
114
|
+
readonly id: string;
|
|
115
|
+
readonly status?: string | undefined;
|
|
116
|
+
readonly action?: {
|
|
117
|
+
readonly [x: string]: unknown;
|
|
118
|
+
} | null | undefined;
|
|
119
|
+
} | {
|
|
120
|
+
readonly [x: string]: unknown;
|
|
121
|
+
readonly type: "file_search_call";
|
|
122
|
+
readonly id: string;
|
|
123
|
+
readonly status?: string | undefined;
|
|
124
|
+
readonly queries?: readonly string[] | undefined;
|
|
125
|
+
readonly results?: readonly {
|
|
126
|
+
readonly [x: string]: unknown;
|
|
127
|
+
}[] | null | undefined;
|
|
128
|
+
} | {
|
|
129
|
+
readonly [x: string]: unknown;
|
|
130
|
+
readonly type: "code_interpreter_call";
|
|
131
|
+
readonly id: string;
|
|
132
|
+
readonly status?: string | undefined;
|
|
133
|
+
readonly code?: string | null | undefined;
|
|
134
|
+
readonly container_id?: string | null | undefined;
|
|
135
|
+
readonly outputs?: readonly {
|
|
136
|
+
readonly [x: string]: unknown;
|
|
137
|
+
}[] | null | undefined;
|
|
138
|
+
} | {
|
|
139
|
+
readonly [x: string]: unknown;
|
|
140
|
+
readonly type: "mcp_call";
|
|
141
|
+
readonly id: string;
|
|
142
|
+
readonly status?: string | undefined;
|
|
143
|
+
readonly server_label?: string | undefined;
|
|
144
|
+
readonly name?: string | undefined;
|
|
145
|
+
readonly arguments?: string | undefined;
|
|
146
|
+
readonly output?: string | null | undefined;
|
|
147
|
+
readonly error?: unknown;
|
|
147
148
|
})[];
|
|
148
|
-
readonly
|
|
149
|
-
readonly
|
|
149
|
+
readonly instructions?: string | undefined;
|
|
150
|
+
readonly store?: boolean | undefined;
|
|
150
151
|
readonly metadata?: {
|
|
151
152
|
readonly [x: string]: string;
|
|
152
153
|
} | undefined;
|
|
153
|
-
readonly
|
|
154
|
+
readonly safety_identifier?: string | undefined;
|
|
155
|
+
readonly stream_options?: {
|
|
156
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
157
|
+
} | undefined;
|
|
158
|
+
readonly top_logprobs?: number | undefined;
|
|
159
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
160
|
+
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
161
|
+
readonly prompt_cache_key?: string | undefined;
|
|
162
|
+
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
154
163
|
readonly reasoning?: {
|
|
155
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
156
164
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
165
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
166
|
+
} | undefined;
|
|
167
|
+
readonly text?: {
|
|
168
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
157
169
|
} | undefined;
|
|
170
|
+
readonly max_output_tokens?: number | undefined;
|
|
171
|
+
readonly max_tool_calls?: number | undefined;
|
|
172
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
158
173
|
readonly temperature?: number | undefined;
|
|
174
|
+
readonly top_p?: number | undefined;
|
|
175
|
+
readonly presence_penalty?: number | undefined;
|
|
176
|
+
readonly frequency_penalty?: number | undefined;
|
|
159
177
|
readonly tools?: readonly ({
|
|
160
178
|
readonly type: "function";
|
|
161
|
-
readonly description: string;
|
|
162
179
|
readonly name: string;
|
|
180
|
+
readonly description: string;
|
|
163
181
|
readonly parameters: {
|
|
164
182
|
readonly [x: string]: unknown;
|
|
165
183
|
};
|
|
166
184
|
readonly strict?: boolean | undefined;
|
|
167
|
-
} | {
|
|
168
|
-
readonly type: "image_generation";
|
|
169
|
-
readonly size?: string | undefined;
|
|
170
|
-
readonly action?: "auto" | "generate" | "edit" | undefined;
|
|
171
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
172
|
-
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
173
|
-
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
174
|
-
readonly partial_images?: number | undefined;
|
|
175
|
-
readonly output_compression?: number | undefined;
|
|
176
|
-
readonly input_fidelity?: "low" | "high" | undefined;
|
|
177
185
|
} | {
|
|
178
186
|
readonly type: "namespace";
|
|
179
187
|
readonly name: string;
|
|
180
188
|
readonly description: string;
|
|
181
189
|
readonly tools: readonly {
|
|
182
190
|
readonly type: "function";
|
|
183
|
-
readonly description: string;
|
|
184
191
|
readonly name: string;
|
|
192
|
+
readonly description: string;
|
|
185
193
|
readonly parameters: {
|
|
186
194
|
readonly [x: string]: unknown;
|
|
187
195
|
};
|
|
188
196
|
readonly strict?: boolean | undefined;
|
|
189
197
|
}[];
|
|
198
|
+
} | {
|
|
199
|
+
readonly type: "image_generation";
|
|
200
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
201
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
202
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
203
|
+
readonly output_compression?: number | undefined;
|
|
204
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
205
|
+
readonly partial_images?: number | undefined;
|
|
206
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
207
|
+
readonly size?: string | undefined;
|
|
190
208
|
})[] | undefined;
|
|
191
|
-
readonly
|
|
192
|
-
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
193
|
-
} | undefined;
|
|
194
|
-
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
195
|
-
readonly context_management?: readonly {
|
|
196
|
-
readonly type: "compaction";
|
|
197
|
-
readonly compact_threshold?: number | undefined;
|
|
198
|
-
}[] | undefined;
|
|
199
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
209
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
200
210
|
readonly type: "function";
|
|
201
211
|
readonly name: string;
|
|
202
212
|
} | {
|
|
203
213
|
readonly type: "allowed_tools";
|
|
204
|
-
readonly mode: "
|
|
214
|
+
readonly mode: "auto" | "none" | "required";
|
|
205
215
|
readonly tools: readonly {
|
|
206
216
|
readonly type: "function";
|
|
207
217
|
readonly name: string;
|
|
@@ -209,21 +219,11 @@ declare const responsesRoute: Route<{
|
|
|
209
219
|
} | {
|
|
210
220
|
readonly type: "image_generation";
|
|
211
221
|
} | undefined;
|
|
212
|
-
readonly
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
readonly
|
|
217
|
-
readonly prompt_cache_key?: string | undefined;
|
|
218
|
-
readonly parallel_tool_calls?: boolean | undefined;
|
|
219
|
-
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
220
|
-
readonly truncation?: "auto" | "disabled" | undefined;
|
|
221
|
-
readonly stream_options?: {
|
|
222
|
-
readonly include_obfuscation?: boolean | undefined;
|
|
223
|
-
} | undefined;
|
|
224
|
-
readonly safety_identifier?: string | undefined;
|
|
225
|
-
readonly top_logprobs?: number | undefined;
|
|
226
|
-
readonly max_tool_calls?: number | undefined;
|
|
222
|
+
readonly context_management?: readonly {
|
|
223
|
+
readonly type: "compaction";
|
|
224
|
+
readonly compact_threshold?: number | undefined;
|
|
225
|
+
}[] | undefined;
|
|
226
|
+
readonly stream: true;
|
|
227
227
|
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
228
228
|
endpoint: import("../route/client.js").CompactOperation;
|
|
229
229
|
}>;
|
|
@@ -271,8 +271,20 @@ export declare const routes: (Route<{
|
|
|
271
271
|
readonly file_data: string;
|
|
272
272
|
};
|
|
273
273
|
})[];
|
|
274
|
+
} | {
|
|
275
|
+
readonly role: "tool";
|
|
276
|
+
readonly tool_call_id: string;
|
|
277
|
+
readonly content: string | readonly {
|
|
278
|
+
readonly type: "text";
|
|
279
|
+
readonly text: string;
|
|
280
|
+
readonly cache_control?: {
|
|
281
|
+
readonly type: "ephemeral";
|
|
282
|
+
readonly ttl?: string | undefined;
|
|
283
|
+
} | undefined;
|
|
284
|
+
}[];
|
|
274
285
|
} | {
|
|
275
286
|
readonly [x: string]: unknown;
|
|
287
|
+
readonly role: "assistant";
|
|
276
288
|
readonly content: string | readonly {
|
|
277
289
|
readonly type: "text";
|
|
278
290
|
readonly text: string;
|
|
@@ -281,132 +293,76 @@ export declare const routes: (Route<{
|
|
|
281
293
|
readonly ttl?: string | undefined;
|
|
282
294
|
} | undefined;
|
|
283
295
|
}[] | null;
|
|
284
|
-
readonly role: "assistant";
|
|
285
|
-
readonly reasoning?: string | undefined;
|
|
286
|
-
readonly reasoning_content?: string | undefined;
|
|
287
|
-
readonly reasoning_text?: string | undefined;
|
|
288
296
|
readonly tool_calls?: readonly {
|
|
297
|
+
readonly id: string;
|
|
298
|
+
readonly type: "function";
|
|
289
299
|
readonly function: {
|
|
290
300
|
readonly name: string;
|
|
291
301
|
readonly arguments: string;
|
|
292
302
|
};
|
|
293
|
-
readonly id: string;
|
|
294
|
-
readonly type: "function";
|
|
295
303
|
readonly extra_content?: {
|
|
296
304
|
readonly google: {
|
|
297
305
|
readonly thought_signature: string;
|
|
298
306
|
};
|
|
299
307
|
} | undefined;
|
|
300
308
|
}[] | undefined;
|
|
309
|
+
readonly reasoning_content?: string | undefined;
|
|
310
|
+
readonly reasoning?: string | undefined;
|
|
311
|
+
readonly reasoning_text?: string | undefined;
|
|
301
312
|
readonly reasoning_details?: unknown;
|
|
302
|
-
} | {
|
|
303
|
-
readonly role: "tool";
|
|
304
|
-
readonly tool_call_id: string;
|
|
305
|
-
readonly content: string | readonly {
|
|
306
|
-
readonly type: "text";
|
|
307
|
-
readonly text: string;
|
|
308
|
-
readonly cache_control?: {
|
|
309
|
-
readonly type: "ephemeral";
|
|
310
|
-
readonly ttl?: string | undefined;
|
|
311
|
-
} | undefined;
|
|
312
|
-
}[];
|
|
313
313
|
})[];
|
|
314
|
-
readonly stream: true;
|
|
315
|
-
readonly max_completion_tokens?: number | undefined;
|
|
316
|
-
readonly max_tokens?: number | undefined;
|
|
317
|
-
readonly temperature?: number | undefined;
|
|
318
314
|
readonly tools?: readonly {
|
|
315
|
+
readonly type: "function";
|
|
319
316
|
readonly function: {
|
|
320
|
-
readonly description: string;
|
|
321
317
|
readonly name: string;
|
|
318
|
+
readonly description: string;
|
|
322
319
|
readonly parameters: {
|
|
323
320
|
readonly [x: string]: unknown;
|
|
324
321
|
};
|
|
325
322
|
readonly strict?: boolean | undefined;
|
|
326
323
|
};
|
|
327
|
-
readonly type: "function";
|
|
328
324
|
readonly cache_control?: {
|
|
329
325
|
readonly type: "ephemeral";
|
|
330
326
|
readonly ttl?: string | undefined;
|
|
331
327
|
} | undefined;
|
|
332
328
|
}[] | undefined;
|
|
333
|
-
readonly
|
|
334
|
-
readonly seed?: number | undefined;
|
|
335
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
329
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
336
330
|
readonly type: "function";
|
|
337
331
|
readonly function: {
|
|
338
332
|
readonly name: string;
|
|
339
333
|
};
|
|
340
334
|
} | undefined;
|
|
341
|
-
readonly
|
|
342
|
-
readonly frequency_penalty?: number | undefined;
|
|
343
|
-
readonly presence_penalty?: number | undefined;
|
|
344
|
-
readonly store?: boolean | undefined;
|
|
345
|
-
readonly prompt_cache_key?: string | undefined;
|
|
346
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
335
|
+
readonly stream: true;
|
|
347
336
|
readonly stream_options?: {
|
|
348
337
|
readonly include_usage: boolean;
|
|
349
338
|
} | undefined;
|
|
339
|
+
readonly store?: boolean | undefined;
|
|
340
|
+
readonly prompt_cache_key?: string | undefined;
|
|
341
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
350
342
|
readonly tool_stream?: boolean | undefined;
|
|
343
|
+
readonly max_completion_tokens?: number | undefined;
|
|
344
|
+
readonly max_tokens?: number | undefined;
|
|
345
|
+
readonly temperature?: number | undefined;
|
|
346
|
+
readonly top_p?: number | undefined;
|
|
347
|
+
readonly frequency_penalty?: number | undefined;
|
|
348
|
+
readonly presence_penalty?: number | undefined;
|
|
349
|
+
readonly seed?: number | undefined;
|
|
350
|
+
readonly stop?: readonly string[] | undefined;
|
|
351
351
|
}, import("../route/transport/http.js").HttpPrepared<string>, CompactionOperations | undefined> | Route<{
|
|
352
|
+
readonly model: string;
|
|
352
353
|
readonly input: readonly ({
|
|
353
354
|
readonly [x: string]: unknown;
|
|
355
|
+
readonly type: string;
|
|
354
356
|
readonly id: string;
|
|
355
|
-
readonly type: "web_search_call";
|
|
356
|
-
readonly status?: string | undefined;
|
|
357
|
-
readonly action?: {
|
|
358
|
-
readonly [x: string]: unknown;
|
|
359
|
-
} | null | undefined;
|
|
360
357
|
} | {
|
|
361
|
-
readonly
|
|
362
|
-
readonly id
|
|
363
|
-
readonly
|
|
364
|
-
readonly status?: string | undefined;
|
|
365
|
-
readonly queries?: readonly string[] | undefined;
|
|
366
|
-
readonly results?: readonly {
|
|
367
|
-
readonly [x: string]: unknown;
|
|
368
|
-
}[] | null | undefined;
|
|
369
|
-
} | {
|
|
370
|
-
readonly [x: string]: unknown;
|
|
371
|
-
readonly id: string;
|
|
372
|
-
readonly type: "code_interpreter_call";
|
|
373
|
-
readonly status?: string | undefined;
|
|
374
|
-
readonly code?: string | null | undefined;
|
|
375
|
-
readonly container_id?: string | null | undefined;
|
|
376
|
-
readonly outputs?: readonly {
|
|
377
|
-
readonly [x: string]: unknown;
|
|
378
|
-
}[] | null | undefined;
|
|
379
|
-
} | {
|
|
380
|
-
readonly [x: string]: unknown;
|
|
381
|
-
readonly id: string;
|
|
382
|
-
readonly type: "mcp_call";
|
|
383
|
-
readonly status?: string | undefined;
|
|
384
|
-
readonly name?: string | undefined;
|
|
385
|
-
readonly output?: string | null | undefined;
|
|
386
|
-
readonly error?: unknown;
|
|
387
|
-
readonly arguments?: string | undefined;
|
|
388
|
-
readonly server_label?: string | undefined;
|
|
358
|
+
readonly type: "compaction";
|
|
359
|
+
readonly id?: string | null | undefined;
|
|
360
|
+
readonly encrypted_content: string;
|
|
389
361
|
} | {
|
|
390
362
|
readonly type: "configuration_update";
|
|
391
363
|
readonly reasoning: {
|
|
392
364
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
393
365
|
};
|
|
394
|
-
} | {
|
|
395
|
-
readonly [x: string]: unknown;
|
|
396
|
-
readonly type: string;
|
|
397
|
-
readonly id: string;
|
|
398
|
-
} | {
|
|
399
|
-
readonly type: "reasoning";
|
|
400
|
-
readonly summary: readonly {
|
|
401
|
-
readonly type: "summary_text";
|
|
402
|
-
readonly text: string;
|
|
403
|
-
}[];
|
|
404
|
-
readonly id?: string | undefined;
|
|
405
|
-
readonly encrypted_content?: string | null | undefined;
|
|
406
|
-
} | {
|
|
407
|
-
readonly type: "compaction";
|
|
408
|
-
readonly encrypted_content: string;
|
|
409
|
-
readonly id?: string | null | undefined;
|
|
410
366
|
} | {
|
|
411
367
|
readonly type: "message";
|
|
412
368
|
readonly role: "system";
|
|
@@ -417,6 +373,7 @@ export declare const routes: (Route<{
|
|
|
417
373
|
readonly content: string;
|
|
418
374
|
} | {
|
|
419
375
|
readonly type: "message";
|
|
376
|
+
readonly role: "user";
|
|
420
377
|
readonly content: readonly ({
|
|
421
378
|
readonly type: "input_image";
|
|
422
379
|
readonly image_url: string;
|
|
@@ -431,26 +388,33 @@ export declare const routes: (Route<{
|
|
|
431
388
|
readonly type: "input_text";
|
|
432
389
|
readonly text: string;
|
|
433
390
|
})[];
|
|
434
|
-
readonly role: "user";
|
|
435
391
|
readonly id?: string | undefined;
|
|
436
392
|
readonly status?: string | undefined;
|
|
437
393
|
} | {
|
|
438
394
|
readonly type: "message";
|
|
395
|
+
readonly id?: string | undefined;
|
|
396
|
+
readonly role: "assistant";
|
|
439
397
|
readonly content: readonly {
|
|
440
398
|
readonly type: "output_text";
|
|
441
399
|
readonly text: string;
|
|
442
400
|
}[];
|
|
443
|
-
readonly role: "assistant";
|
|
444
|
-
readonly id?: string | undefined;
|
|
445
|
-
readonly status?: string | undefined;
|
|
446
401
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
402
|
+
readonly status?: string | undefined;
|
|
403
|
+
} | {
|
|
404
|
+
readonly type: "reasoning";
|
|
405
|
+
readonly id?: string | undefined;
|
|
406
|
+
readonly summary: readonly {
|
|
407
|
+
readonly type: "summary_text";
|
|
408
|
+
readonly text: string;
|
|
409
|
+
}[];
|
|
410
|
+
readonly encrypted_content?: string | null | undefined;
|
|
447
411
|
} | {
|
|
448
412
|
readonly type: "function_call";
|
|
449
|
-
readonly name: string;
|
|
450
|
-
readonly arguments: string;
|
|
451
|
-
readonly call_id: string;
|
|
452
413
|
readonly id?: string | undefined;
|
|
414
|
+
readonly call_id: string;
|
|
415
|
+
readonly name: string;
|
|
453
416
|
readonly namespace?: string | undefined;
|
|
417
|
+
readonly arguments: string;
|
|
454
418
|
} | {
|
|
455
419
|
readonly type: "function_call_output";
|
|
456
420
|
readonly call_id: string;
|
|
@@ -471,64 +435,110 @@ export declare const routes: (Route<{
|
|
|
471
435
|
readonly type: "input_video";
|
|
472
436
|
readonly video_url: string;
|
|
473
437
|
})[];
|
|
438
|
+
} | {
|
|
439
|
+
readonly [x: string]: unknown;
|
|
440
|
+
readonly type: "web_search_call";
|
|
441
|
+
readonly id: string;
|
|
442
|
+
readonly status?: string | undefined;
|
|
443
|
+
readonly action?: {
|
|
444
|
+
readonly [x: string]: unknown;
|
|
445
|
+
} | null | undefined;
|
|
446
|
+
} | {
|
|
447
|
+
readonly [x: string]: unknown;
|
|
448
|
+
readonly type: "file_search_call";
|
|
449
|
+
readonly id: string;
|
|
450
|
+
readonly status?: string | undefined;
|
|
451
|
+
readonly queries?: readonly string[] | undefined;
|
|
452
|
+
readonly results?: readonly {
|
|
453
|
+
readonly [x: string]: unknown;
|
|
454
|
+
}[] | null | undefined;
|
|
455
|
+
} | {
|
|
456
|
+
readonly [x: string]: unknown;
|
|
457
|
+
readonly type: "code_interpreter_call";
|
|
458
|
+
readonly id: string;
|
|
459
|
+
readonly status?: string | undefined;
|
|
460
|
+
readonly code?: string | null | undefined;
|
|
461
|
+
readonly container_id?: string | null | undefined;
|
|
462
|
+
readonly outputs?: readonly {
|
|
463
|
+
readonly [x: string]: unknown;
|
|
464
|
+
}[] | null | undefined;
|
|
465
|
+
} | {
|
|
466
|
+
readonly [x: string]: unknown;
|
|
467
|
+
readonly type: "mcp_call";
|
|
468
|
+
readonly id: string;
|
|
469
|
+
readonly status?: string | undefined;
|
|
470
|
+
readonly server_label?: string | undefined;
|
|
471
|
+
readonly name?: string | undefined;
|
|
472
|
+
readonly arguments?: string | undefined;
|
|
473
|
+
readonly output?: string | null | undefined;
|
|
474
|
+
readonly error?: unknown;
|
|
474
475
|
})[];
|
|
475
|
-
readonly
|
|
476
|
-
readonly
|
|
476
|
+
readonly instructions?: string | undefined;
|
|
477
|
+
readonly store?: boolean | undefined;
|
|
477
478
|
readonly metadata?: {
|
|
478
479
|
readonly [x: string]: string;
|
|
479
480
|
} | undefined;
|
|
480
|
-
readonly
|
|
481
|
+
readonly safety_identifier?: string | undefined;
|
|
482
|
+
readonly stream_options?: {
|
|
483
|
+
readonly include_obfuscation?: boolean | undefined;
|
|
484
|
+
} | undefined;
|
|
485
|
+
readonly top_logprobs?: number | undefined;
|
|
486
|
+
readonly truncation?: "auto" | "disabled" | undefined;
|
|
487
|
+
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
488
|
+
readonly prompt_cache_key?: string | undefined;
|
|
489
|
+
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
481
490
|
readonly reasoning?: {
|
|
482
|
-
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
483
491
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
492
|
+
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
484
493
|
} | undefined;
|
|
494
|
+
readonly text?: {
|
|
495
|
+
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
496
|
+
} | undefined;
|
|
497
|
+
readonly max_output_tokens?: number | undefined;
|
|
498
|
+
readonly max_tool_calls?: number | undefined;
|
|
499
|
+
readonly parallel_tool_calls?: boolean | undefined;
|
|
485
500
|
readonly temperature?: number | undefined;
|
|
501
|
+
readonly top_p?: number | undefined;
|
|
502
|
+
readonly presence_penalty?: number | undefined;
|
|
503
|
+
readonly frequency_penalty?: number | undefined;
|
|
486
504
|
readonly tools?: readonly ({
|
|
487
505
|
readonly type: "function";
|
|
488
|
-
readonly description: string;
|
|
489
506
|
readonly name: string;
|
|
507
|
+
readonly description: string;
|
|
490
508
|
readonly parameters: {
|
|
491
509
|
readonly [x: string]: unknown;
|
|
492
510
|
};
|
|
493
511
|
readonly strict?: boolean | undefined;
|
|
494
|
-
} | {
|
|
495
|
-
readonly type: "image_generation";
|
|
496
|
-
readonly size?: string | undefined;
|
|
497
|
-
readonly action?: "auto" | "generate" | "edit" | undefined;
|
|
498
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
499
|
-
readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
|
|
500
|
-
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
501
|
-
readonly partial_images?: number | undefined;
|
|
502
|
-
readonly output_compression?: number | undefined;
|
|
503
|
-
readonly input_fidelity?: "low" | "high" | undefined;
|
|
504
512
|
} | {
|
|
505
513
|
readonly type: "namespace";
|
|
506
514
|
readonly name: string;
|
|
507
515
|
readonly description: string;
|
|
508
516
|
readonly tools: readonly {
|
|
509
517
|
readonly type: "function";
|
|
510
|
-
readonly description: string;
|
|
511
518
|
readonly name: string;
|
|
519
|
+
readonly description: string;
|
|
512
520
|
readonly parameters: {
|
|
513
521
|
readonly [x: string]: unknown;
|
|
514
522
|
};
|
|
515
523
|
readonly strict?: boolean | undefined;
|
|
516
524
|
}[];
|
|
525
|
+
} | {
|
|
526
|
+
readonly type: "image_generation";
|
|
527
|
+
readonly action?: "auto" | "edit" | "generate" | undefined;
|
|
528
|
+
readonly background?: "auto" | "opaque" | "transparent" | undefined;
|
|
529
|
+
readonly input_fidelity?: "high" | "low" | undefined;
|
|
530
|
+
readonly output_compression?: number | undefined;
|
|
531
|
+
readonly output_format?: "jpeg" | "png" | "webp" | undefined;
|
|
532
|
+
readonly partial_images?: number | undefined;
|
|
533
|
+
readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
|
|
534
|
+
readonly size?: string | undefined;
|
|
517
535
|
})[] | undefined;
|
|
518
|
-
readonly
|
|
519
|
-
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
520
|
-
} | undefined;
|
|
521
|
-
readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
|
|
522
|
-
readonly context_management?: readonly {
|
|
523
|
-
readonly type: "compaction";
|
|
524
|
-
readonly compact_threshold?: number | undefined;
|
|
525
|
-
}[] | undefined;
|
|
526
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
536
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
527
537
|
readonly type: "function";
|
|
528
538
|
readonly name: string;
|
|
529
539
|
} | {
|
|
530
540
|
readonly type: "allowed_tools";
|
|
531
|
-
readonly mode: "
|
|
541
|
+
readonly mode: "auto" | "none" | "required";
|
|
532
542
|
readonly tools: readonly {
|
|
533
543
|
readonly type: "function";
|
|
534
544
|
readonly name: string;
|
|
@@ -536,21 +546,11 @@ export declare const routes: (Route<{
|
|
|
536
546
|
} | {
|
|
537
547
|
readonly type: "image_generation";
|
|
538
548
|
} | undefined;
|
|
539
|
-
readonly
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
readonly
|
|
544
|
-
readonly prompt_cache_key?: string | undefined;
|
|
545
|
-
readonly parallel_tool_calls?: boolean | undefined;
|
|
546
|
-
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
547
|
-
readonly truncation?: "auto" | "disabled" | undefined;
|
|
548
|
-
readonly stream_options?: {
|
|
549
|
-
readonly include_obfuscation?: boolean | undefined;
|
|
550
|
-
} | undefined;
|
|
551
|
-
readonly safety_identifier?: string | undefined;
|
|
552
|
-
readonly top_logprobs?: number | undefined;
|
|
553
|
-
readonly max_tool_calls?: number | undefined;
|
|
549
|
+
readonly context_management?: readonly {
|
|
550
|
+
readonly type: "compaction";
|
|
551
|
+
readonly compact_threshold?: number | undefined;
|
|
552
|
+
}[] | undefined;
|
|
553
|
+
readonly stream: true;
|
|
554
554
|
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
555
555
|
endpoint: import("../route/client.js").CompactOperation;
|
|
556
556
|
}>)[];
|
|
@@ -563,21 +563,11 @@ export declare const configure: (input: Config) => {
|
|
|
563
563
|
endpoint: import("../route/client.js").CompactOperation;
|
|
564
564
|
}>;
|
|
565
565
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, CompactionOperations | undefined>;
|
|
566
|
-
configure:
|
|
566
|
+
configure: typeof configure;
|
|
567
567
|
};
|
|
568
568
|
export declare const provider: {
|
|
569
569
|
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
570
|
-
configure:
|
|
571
|
-
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
572
|
-
model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, {
|
|
573
|
-
endpoint: import("../route/client.js").CompactOperation;
|
|
574
|
-
}>;
|
|
575
|
-
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, {
|
|
576
|
-
endpoint: import("../route/client.js").CompactOperation;
|
|
577
|
-
}>;
|
|
578
|
-
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, CompactionOperations | undefined>;
|
|
579
|
-
configure: /*elided*/ any;
|
|
580
|
-
};
|
|
570
|
+
configure: typeof configure;
|
|
581
571
|
};
|
|
582
572
|
export declare const responsesModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput, typeof responsesRoute.compact>["model"];
|
|
583
573
|
export declare const chatModel: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
|