@opencode/ai 0.0.0-dev-21106 → 0.0.0-dev-21108
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 +1 -13
- 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 -81
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +119 -119
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- 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 -25
- 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 -64
- 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 +200 -200
- 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 +394 -394
- package/dist/protocols/openai-chat.d.ts +248 -248
- 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 +566 -566
- 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 +1 -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 -109
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +78 -78
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -77
- 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/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/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepseek.d.ts +66 -70
- 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/meta.d.ts +309 -317
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- 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/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/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/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
|
@@ -67,8 +67,20 @@ export declare const protocol: Protocol<{
|
|
|
67
67
|
readonly file_data: string;
|
|
68
68
|
};
|
|
69
69
|
})[];
|
|
70
|
+
} | {
|
|
71
|
+
readonly role: "tool";
|
|
72
|
+
readonly tool_call_id: string;
|
|
73
|
+
readonly content: string | readonly {
|
|
74
|
+
readonly type: "text";
|
|
75
|
+
readonly text: string;
|
|
76
|
+
readonly cache_control?: {
|
|
77
|
+
readonly type: "ephemeral";
|
|
78
|
+
readonly ttl?: string | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
}[];
|
|
70
81
|
} | {
|
|
71
82
|
readonly [x: string]: unknown;
|
|
83
|
+
readonly role: "assistant";
|
|
72
84
|
readonly content: string | readonly {
|
|
73
85
|
readonly type: "text";
|
|
74
86
|
readonly text: string;
|
|
@@ -77,145 +89,109 @@ export declare const protocol: Protocol<{
|
|
|
77
89
|
readonly ttl?: string | undefined;
|
|
78
90
|
} | undefined;
|
|
79
91
|
}[] | null;
|
|
80
|
-
readonly role: "assistant";
|
|
81
|
-
readonly reasoning?: string | undefined;
|
|
82
|
-
readonly reasoning_content?: string | undefined;
|
|
83
|
-
readonly reasoning_text?: string | undefined;
|
|
84
92
|
readonly tool_calls?: readonly {
|
|
93
|
+
readonly id: string;
|
|
94
|
+
readonly type: "function";
|
|
85
95
|
readonly function: {
|
|
86
96
|
readonly name: string;
|
|
87
97
|
readonly arguments: string;
|
|
88
98
|
};
|
|
89
|
-
readonly id: string;
|
|
90
|
-
readonly type: "function";
|
|
91
99
|
readonly extra_content?: {
|
|
92
100
|
readonly google: {
|
|
93
101
|
readonly thought_signature: string;
|
|
94
102
|
};
|
|
95
103
|
} | undefined;
|
|
96
104
|
}[] | undefined;
|
|
105
|
+
readonly reasoning_content?: string | undefined;
|
|
106
|
+
readonly reasoning?: string | undefined;
|
|
107
|
+
readonly reasoning_text?: string | undefined;
|
|
97
108
|
readonly reasoning_details?: unknown;
|
|
98
|
-
} | {
|
|
99
|
-
readonly role: "tool";
|
|
100
|
-
readonly tool_call_id: string;
|
|
101
|
-
readonly content: string | readonly {
|
|
102
|
-
readonly type: "text";
|
|
103
|
-
readonly text: string;
|
|
104
|
-
readonly cache_control?: {
|
|
105
|
-
readonly type: "ephemeral";
|
|
106
|
-
readonly ttl?: string | undefined;
|
|
107
|
-
} | undefined;
|
|
108
|
-
}[];
|
|
109
109
|
})[];
|
|
110
|
-
readonly stream: true;
|
|
111
|
-
readonly max_completion_tokens?: number | undefined;
|
|
112
|
-
readonly max_tokens?: number | undefined;
|
|
113
|
-
readonly temperature?: number | undefined;
|
|
114
110
|
readonly tools?: readonly {
|
|
111
|
+
readonly type: "function";
|
|
115
112
|
readonly function: {
|
|
116
|
-
readonly description: string;
|
|
117
113
|
readonly name: string;
|
|
114
|
+
readonly description: string;
|
|
118
115
|
readonly parameters: {
|
|
119
116
|
readonly [x: string]: unknown;
|
|
120
117
|
};
|
|
121
118
|
readonly strict?: boolean | undefined;
|
|
122
119
|
};
|
|
123
|
-
readonly type: "function";
|
|
124
120
|
readonly cache_control?: {
|
|
125
121
|
readonly type: "ephemeral";
|
|
126
122
|
readonly ttl?: string | undefined;
|
|
127
123
|
} | undefined;
|
|
128
124
|
}[] | undefined;
|
|
129
|
-
readonly
|
|
130
|
-
readonly seed?: number | undefined;
|
|
131
|
-
readonly thinking?: {
|
|
132
|
-
readonly type?: string | undefined;
|
|
133
|
-
readonly clear_thinking?: boolean | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
readonly user_id?: string | undefined;
|
|
136
|
-
readonly tool_choice?: "required" | "auto" | "none" | {
|
|
125
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
137
126
|
readonly type: "function";
|
|
138
127
|
readonly function: {
|
|
139
128
|
readonly name: string;
|
|
140
129
|
};
|
|
141
130
|
} | undefined;
|
|
142
|
-
readonly
|
|
143
|
-
readonly frequency_penalty?: number | undefined;
|
|
144
|
-
readonly presence_penalty?: number | undefined;
|
|
145
|
-
readonly store?: boolean | undefined;
|
|
146
|
-
readonly prompt_cache_key?: string | undefined;
|
|
147
|
-
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
131
|
+
readonly stream: true;
|
|
148
132
|
readonly stream_options?: {
|
|
149
133
|
readonly include_usage: boolean;
|
|
150
134
|
} | undefined;
|
|
135
|
+
readonly store?: boolean | undefined;
|
|
136
|
+
readonly prompt_cache_key?: string | undefined;
|
|
137
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
151
138
|
readonly tool_stream?: boolean | undefined;
|
|
139
|
+
readonly max_completion_tokens?: number | undefined;
|
|
140
|
+
readonly max_tokens?: number | undefined;
|
|
141
|
+
readonly temperature?: number | undefined;
|
|
142
|
+
readonly top_p?: number | undefined;
|
|
143
|
+
readonly frequency_penalty?: number | undefined;
|
|
144
|
+
readonly presence_penalty?: number | undefined;
|
|
145
|
+
readonly seed?: number | undefined;
|
|
146
|
+
readonly stop?: readonly string[] | undefined;
|
|
147
|
+
readonly thinking?: {
|
|
148
|
+
readonly type?: string | undefined;
|
|
149
|
+
readonly clear_thinking?: boolean | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
readonly do_sample?: boolean | undefined;
|
|
152
152
|
readonly response_format?: {
|
|
153
153
|
readonly type: string;
|
|
154
154
|
} | undefined;
|
|
155
155
|
readonly request_id?: string | undefined;
|
|
156
|
-
readonly
|
|
156
|
+
readonly user_id?: string | undefined;
|
|
157
157
|
}, string, "[DONE]" | {
|
|
158
158
|
readonly [x: string]: unknown;
|
|
159
|
-
readonly error?: {
|
|
160
|
-
readonly [x: string]: unknown;
|
|
161
|
-
readonly message: string;
|
|
162
|
-
readonly code?: string | number | null | undefined;
|
|
163
|
-
} | null | undefined;
|
|
164
|
-
readonly usage?: {
|
|
165
|
-
readonly [x: string]: unknown;
|
|
166
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
167
|
-
readonly cached_tokens?: number | null | undefined;
|
|
168
|
-
readonly total_tokens?: number | null | undefined;
|
|
169
|
-
readonly prompt_tokens?: number | null | undefined;
|
|
170
|
-
readonly completion_tokens?: number | null | undefined;
|
|
171
|
-
readonly prompt_tokens_details?: {
|
|
172
|
-
readonly [x: string]: unknown;
|
|
173
|
-
readonly cached_tokens?: number | null | undefined;
|
|
174
|
-
readonly cache_write_tokens?: number | null | undefined;
|
|
175
|
-
} | null | undefined;
|
|
176
|
-
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
177
|
-
readonly cache_created_input_tokens?: number | null | undefined;
|
|
178
|
-
readonly completion_tokens_details?: {
|
|
179
|
-
readonly [x: string]: unknown;
|
|
180
|
-
readonly reasoning_tokens?: number | null | undefined;
|
|
181
|
-
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
182
|
-
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
183
|
-
} | null | undefined;
|
|
184
|
-
} | null | undefined;
|
|
185
159
|
readonly choices?: readonly {
|
|
186
160
|
readonly [x: string]: unknown;
|
|
187
161
|
readonly delta?: {
|
|
188
162
|
readonly [x: string]: unknown;
|
|
189
|
-
readonly reasoning?: string | null | undefined;
|
|
190
|
-
readonly reasoning_content?: string | null | undefined;
|
|
191
|
-
readonly reasoning_text?: string | null | undefined;
|
|
192
163
|
readonly content?: string | null | undefined;
|
|
193
164
|
readonly refusal?: string | null | undefined;
|
|
165
|
+
readonly reasoning_content?: string | null | undefined;
|
|
166
|
+
readonly reasoning?: string | null | undefined;
|
|
167
|
+
readonly reasoning_text?: string | null | undefined;
|
|
168
|
+
readonly reasoning_details?: unknown;
|
|
194
169
|
readonly tool_calls?: readonly {
|
|
170
|
+
readonly index?: number | null | undefined;
|
|
171
|
+
readonly id?: string | null | undefined;
|
|
195
172
|
readonly function?: {
|
|
196
173
|
readonly name?: string | null | undefined;
|
|
197
174
|
readonly arguments?: string | null | undefined;
|
|
198
175
|
} | null | undefined;
|
|
199
|
-
readonly id?: string | null | undefined;
|
|
200
|
-
readonly index?: number | null | undefined;
|
|
201
176
|
readonly extra_content?: unknown;
|
|
202
177
|
}[] | null | undefined;
|
|
203
|
-
readonly reasoning_details?: unknown;
|
|
204
178
|
} | null | undefined;
|
|
179
|
+
readonly finish_reason?: string | null | undefined;
|
|
180
|
+
readonly native_finish_reason?: string | null | undefined;
|
|
205
181
|
readonly usage?: {
|
|
206
182
|
readonly [x: string]: unknown;
|
|
207
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
208
|
-
readonly cached_tokens?: number | null | undefined;
|
|
209
|
-
readonly total_tokens?: number | null | undefined;
|
|
210
183
|
readonly prompt_tokens?: number | null | undefined;
|
|
211
184
|
readonly completion_tokens?: number | null | undefined;
|
|
185
|
+
readonly total_tokens?: number | null | undefined;
|
|
186
|
+
readonly cached_tokens?: number | null | undefined;
|
|
187
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
188
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
189
|
+
readonly cache_created_input_tokens?: number | null | undefined;
|
|
212
190
|
readonly prompt_tokens_details?: {
|
|
213
191
|
readonly [x: string]: unknown;
|
|
214
192
|
readonly cached_tokens?: number | null | undefined;
|
|
215
193
|
readonly cache_write_tokens?: number | null | undefined;
|
|
216
194
|
} | null | undefined;
|
|
217
|
-
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
218
|
-
readonly cache_created_input_tokens?: number | null | undefined;
|
|
219
195
|
readonly completion_tokens_details?: {
|
|
220
196
|
readonly [x: string]: unknown;
|
|
221
197
|
readonly reasoning_tokens?: number | null | undefined;
|
|
@@ -223,8 +199,32 @@ export declare const protocol: Protocol<{
|
|
|
223
199
|
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
224
200
|
} | null | undefined;
|
|
225
201
|
} | null | undefined;
|
|
226
|
-
readonly finish_reason?: string | null | undefined;
|
|
227
|
-
readonly native_finish_reason?: string | null | undefined;
|
|
228
202
|
}[] | null | undefined;
|
|
203
|
+
readonly usage?: {
|
|
204
|
+
readonly [x: string]: unknown;
|
|
205
|
+
readonly prompt_tokens?: number | null | undefined;
|
|
206
|
+
readonly completion_tokens?: number | null | undefined;
|
|
207
|
+
readonly total_tokens?: number | null | undefined;
|
|
208
|
+
readonly cached_tokens?: number | null | undefined;
|
|
209
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
210
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
211
|
+
readonly cache_created_input_tokens?: number | null | undefined;
|
|
212
|
+
readonly prompt_tokens_details?: {
|
|
213
|
+
readonly [x: string]: unknown;
|
|
214
|
+
readonly cached_tokens?: number | null | undefined;
|
|
215
|
+
readonly cache_write_tokens?: number | null | undefined;
|
|
216
|
+
} | null | undefined;
|
|
217
|
+
readonly completion_tokens_details?: {
|
|
218
|
+
readonly [x: string]: unknown;
|
|
219
|
+
readonly reasoning_tokens?: number | null | undefined;
|
|
220
|
+
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
221
|
+
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
222
|
+
} | null | undefined;
|
|
223
|
+
} | null | undefined;
|
|
224
|
+
readonly error?: {
|
|
225
|
+
readonly [x: string]: unknown;
|
|
226
|
+
readonly code?: string | number | null | undefined;
|
|
227
|
+
readonly message: string;
|
|
228
|
+
} | null | undefined;
|
|
229
229
|
}, OpenAIChat.ParserState>;
|
|
230
230
|
export * as ZAIChat from "./zai-chat.js";
|
|
@@ -14,5 +14,5 @@ export declare const protocol: MediaProtocol.Inline<Request, ImageResponse>;
|
|
|
14
14
|
export declare const model: (input: MediaRoute.ModelInput) => ImageModel<ZAIImageOptions>;
|
|
15
15
|
export declare const ZAIImages: {
|
|
16
16
|
readonly protocol: MediaProtocol.Inline<Request, ImageResponse>;
|
|
17
|
-
readonly model:
|
|
17
|
+
readonly model: typeof model;
|
|
18
18
|
};
|
|
@@ -7,8 +7,26 @@ export type OptionsInput = {
|
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
export declare const protocol: Protocol<{
|
|
10
|
-
readonly
|
|
10
|
+
readonly context_management?: {
|
|
11
|
+
readonly edits: readonly {
|
|
12
|
+
readonly type: "compact_20260112";
|
|
13
|
+
readonly trigger?: {
|
|
14
|
+
readonly type: "input_tokens";
|
|
15
|
+
readonly value: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
readonly pause_after_compaction?: boolean | undefined;
|
|
18
|
+
readonly instructions?: string | undefined;
|
|
19
|
+
}[];
|
|
20
|
+
} | undefined;
|
|
11
21
|
readonly model: string;
|
|
22
|
+
readonly system?: readonly {
|
|
23
|
+
readonly type: "text";
|
|
24
|
+
readonly text: string;
|
|
25
|
+
readonly cache_control?: {
|
|
26
|
+
readonly type: "ephemeral";
|
|
27
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
}[] | undefined;
|
|
12
30
|
readonly messages: readonly ({
|
|
13
31
|
readonly role: "user";
|
|
14
32
|
readonly content: readonly ({
|
|
@@ -36,7 +54,7 @@ export declare const protocol: Protocol<{
|
|
|
36
54
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
37
55
|
} | undefined;
|
|
38
56
|
readonly transformations?: {
|
|
39
|
-
readonly oversized_image?: "
|
|
57
|
+
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
40
58
|
} | undefined;
|
|
41
59
|
} | {
|
|
42
60
|
readonly type: "document";
|
|
@@ -55,17 +73,18 @@ export declare const protocol: Protocol<{
|
|
|
55
73
|
readonly type: "file";
|
|
56
74
|
readonly file_id: string;
|
|
57
75
|
};
|
|
58
|
-
readonly title?: string | undefined;
|
|
59
|
-
readonly context?: string | undefined;
|
|
60
76
|
readonly cache_control?: {
|
|
61
77
|
readonly type: "ephemeral";
|
|
62
78
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
63
79
|
} | undefined;
|
|
80
|
+
readonly title?: string | undefined;
|
|
81
|
+
readonly context?: string | undefined;
|
|
64
82
|
readonly citations?: {
|
|
65
83
|
readonly enabled: boolean;
|
|
66
84
|
} | undefined;
|
|
67
85
|
} | {
|
|
68
86
|
readonly type: "tool_result";
|
|
87
|
+
readonly tool_use_id: string;
|
|
69
88
|
readonly content: string | readonly ({
|
|
70
89
|
readonly type: "text";
|
|
71
90
|
readonly text: string;
|
|
@@ -91,7 +110,7 @@ export declare const protocol: Protocol<{
|
|
|
91
110
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
92
111
|
} | undefined;
|
|
93
112
|
readonly transformations?: {
|
|
94
|
-
readonly oversized_image?: "
|
|
113
|
+
readonly oversized_image?: "downsize" | "error" | undefined;
|
|
95
114
|
} | undefined;
|
|
96
115
|
} | {
|
|
97
116
|
readonly type: "document";
|
|
@@ -110,22 +129,21 @@ export declare const protocol: Protocol<{
|
|
|
110
129
|
readonly type: "file";
|
|
111
130
|
readonly file_id: string;
|
|
112
131
|
};
|
|
113
|
-
readonly title?: string | undefined;
|
|
114
|
-
readonly context?: string | undefined;
|
|
115
132
|
readonly cache_control?: {
|
|
116
133
|
readonly type: "ephemeral";
|
|
117
134
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
118
135
|
} | undefined;
|
|
136
|
+
readonly title?: string | undefined;
|
|
137
|
+
readonly context?: string | undefined;
|
|
119
138
|
readonly citations?: {
|
|
120
139
|
readonly enabled: boolean;
|
|
121
140
|
} | undefined;
|
|
122
141
|
})[];
|
|
123
|
-
readonly
|
|
142
|
+
readonly is_error?: boolean | undefined;
|
|
124
143
|
readonly cache_control?: {
|
|
125
144
|
readonly type: "ephemeral";
|
|
126
145
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
127
146
|
} | undefined;
|
|
128
|
-
readonly is_error?: boolean | undefined;
|
|
129
147
|
})[];
|
|
130
148
|
} | {
|
|
131
149
|
readonly role: "assistant";
|
|
@@ -137,51 +155,52 @@ export declare const protocol: Protocol<{
|
|
|
137
155
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
138
156
|
} | undefined;
|
|
139
157
|
} | {
|
|
140
|
-
readonly
|
|
141
|
-
readonly
|
|
142
|
-
readonly
|
|
143
|
-
readonly input: unknown;
|
|
158
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
159
|
+
readonly tool_use_id: string;
|
|
160
|
+
readonly content: unknown;
|
|
144
161
|
readonly cache_control?: {
|
|
145
162
|
readonly type: "ephemeral";
|
|
146
163
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
147
164
|
} | undefined;
|
|
148
165
|
} | {
|
|
149
|
-
readonly
|
|
150
|
-
readonly
|
|
151
|
-
|
|
152
|
-
readonly
|
|
166
|
+
readonly type: "compaction";
|
|
167
|
+
readonly content: string | null;
|
|
168
|
+
} | {
|
|
169
|
+
readonly type: "thinking";
|
|
170
|
+
readonly thinking: string;
|
|
171
|
+
readonly signature: string;
|
|
153
172
|
readonly cache_control?: {
|
|
154
173
|
readonly type: "ephemeral";
|
|
155
174
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
156
175
|
} | undefined;
|
|
157
176
|
} | {
|
|
158
|
-
readonly type: "
|
|
159
|
-
readonly
|
|
160
|
-
readonly tool_use_id: string;
|
|
177
|
+
readonly type: "redacted_thinking";
|
|
178
|
+
readonly data: string;
|
|
161
179
|
readonly cache_control?: {
|
|
162
180
|
readonly type: "ephemeral";
|
|
163
181
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
164
182
|
} | undefined;
|
|
165
183
|
} | {
|
|
166
|
-
readonly type: "
|
|
167
|
-
readonly
|
|
168
|
-
readonly
|
|
184
|
+
readonly type: "tool_use";
|
|
185
|
+
readonly id: string;
|
|
186
|
+
readonly name: string;
|
|
187
|
+
readonly input: unknown;
|
|
169
188
|
readonly cache_control?: {
|
|
170
189
|
readonly type: "ephemeral";
|
|
171
190
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
172
191
|
} | undefined;
|
|
173
192
|
} | {
|
|
174
|
-
readonly
|
|
175
|
-
readonly
|
|
193
|
+
readonly type: "server_tool_use";
|
|
194
|
+
readonly id: string;
|
|
195
|
+
readonly name: string;
|
|
196
|
+
readonly input: unknown;
|
|
176
197
|
readonly cache_control?: {
|
|
177
198
|
readonly type: "ephemeral";
|
|
178
199
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
179
200
|
} | undefined;
|
|
180
|
-
} | {
|
|
181
|
-
readonly type: "compaction";
|
|
182
|
-
readonly content: string | null;
|
|
183
201
|
})[];
|
|
184
202
|
} | {
|
|
203
|
+
readonly role: "system";
|
|
185
204
|
readonly content: readonly {
|
|
186
205
|
readonly type: "text";
|
|
187
206
|
readonly text: string;
|
|
@@ -190,19 +209,13 @@ export declare const protocol: Protocol<{
|
|
|
190
209
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
191
210
|
} | undefined;
|
|
192
211
|
}[];
|
|
193
|
-
readonly role: "system";
|
|
194
212
|
readonly output_config?: {
|
|
195
213
|
readonly effort: string;
|
|
196
214
|
} | undefined;
|
|
197
215
|
})[];
|
|
198
|
-
readonly stream: true;
|
|
199
|
-
readonly metadata?: {
|
|
200
|
-
readonly user_id?: string | null | undefined;
|
|
201
|
-
} | undefined;
|
|
202
|
-
readonly temperature?: number | undefined;
|
|
203
216
|
readonly tools?: readonly {
|
|
204
|
-
readonly description: string;
|
|
205
217
|
readonly name: string;
|
|
218
|
+
readonly description: string;
|
|
206
219
|
readonly input_schema: {
|
|
207
220
|
readonly [x: string]: unknown;
|
|
208
221
|
};
|
|
@@ -211,75 +224,63 @@ export declare const protocol: Protocol<{
|
|
|
211
224
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
212
225
|
} | undefined;
|
|
213
226
|
}[] | undefined;
|
|
214
|
-
readonly
|
|
215
|
-
readonly type: "
|
|
216
|
-
readonly
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}[] | undefined;
|
|
222
|
-
readonly thinking?: {
|
|
223
|
-
readonly type: string;
|
|
224
|
-
} | undefined;
|
|
225
|
-
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
226
|
-
readonly container?: string | {
|
|
227
|
-
readonly id?: string | null | undefined;
|
|
228
|
-
readonly skills?: readonly {
|
|
229
|
-
readonly [x: string]: unknown;
|
|
230
|
-
}[] | null | undefined;
|
|
231
|
-
} | null | undefined;
|
|
232
|
-
readonly inference_geo?: string | null | undefined;
|
|
233
|
-
readonly cache_control?: {
|
|
234
|
-
readonly type: "ephemeral";
|
|
235
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
227
|
+
readonly tool_choice?: {
|
|
228
|
+
readonly type: "any" | "auto" | "none";
|
|
229
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
230
|
+
} | {
|
|
231
|
+
readonly type: "tool";
|
|
232
|
+
readonly name: string;
|
|
233
|
+
readonly disable_parallel_tool_use?: boolean | undefined;
|
|
236
234
|
} | undefined;
|
|
235
|
+
readonly stream: true;
|
|
236
|
+
readonly max_tokens: number;
|
|
237
|
+
readonly temperature?: number | undefined;
|
|
238
|
+
readonly top_p?: number | undefined;
|
|
239
|
+
readonly top_k?: number | undefined;
|
|
240
|
+
readonly stop_sequences?: readonly string[] | undefined;
|
|
237
241
|
readonly output_config?: {
|
|
242
|
+
readonly effort?: string | undefined;
|
|
238
243
|
readonly format?: {
|
|
239
244
|
readonly type: "json_schema";
|
|
240
245
|
readonly schema: {
|
|
241
246
|
readonly [x: string]: unknown;
|
|
242
247
|
};
|
|
243
248
|
} | null | undefined;
|
|
244
|
-
readonly effort?: string | undefined;
|
|
245
249
|
} | undefined;
|
|
246
|
-
readonly
|
|
247
|
-
readonly
|
|
248
|
-
|
|
249
|
-
readonly instructions?: string | undefined;
|
|
250
|
-
readonly trigger?: {
|
|
251
|
-
readonly type: "input_tokens";
|
|
252
|
-
readonly value: number;
|
|
253
|
-
} | undefined;
|
|
254
|
-
readonly pause_after_compaction?: boolean | undefined;
|
|
255
|
-
}[];
|
|
250
|
+
readonly cache_control?: {
|
|
251
|
+
readonly type: "ephemeral";
|
|
252
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
256
253
|
} | undefined;
|
|
257
|
-
readonly
|
|
258
|
-
readonly
|
|
259
|
-
readonly
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
254
|
+
readonly container?: string | {
|
|
255
|
+
readonly id?: string | null | undefined;
|
|
256
|
+
readonly skills?: readonly {
|
|
257
|
+
readonly [x: string]: unknown;
|
|
258
|
+
}[] | null | undefined;
|
|
259
|
+
} | null | undefined;
|
|
260
|
+
readonly inference_geo?: string | null | undefined;
|
|
261
|
+
readonly metadata?: {
|
|
262
|
+
readonly user_id?: string | null | undefined;
|
|
263
|
+
} | undefined;
|
|
264
|
+
readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
|
|
265
|
+
readonly thinking?: {
|
|
266
|
+
readonly type: string;
|
|
264
267
|
} | undefined;
|
|
265
|
-
readonly top_p?: number | undefined;
|
|
266
|
-
readonly top_k?: number | undefined;
|
|
267
|
-
readonly stop_sequences?: readonly string[] | undefined;
|
|
268
268
|
}, string, {
|
|
269
269
|
readonly [x: string]: unknown;
|
|
270
270
|
readonly type: string;
|
|
271
|
+
readonly index?: number | undefined;
|
|
271
272
|
readonly message?: {
|
|
272
273
|
readonly [x: string]: unknown;
|
|
273
274
|
readonly usage?: {
|
|
274
275
|
readonly [x: string]: unknown;
|
|
275
276
|
readonly input_tokens?: number | null | undefined;
|
|
277
|
+
readonly output_tokens?: number | undefined;
|
|
278
|
+
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
279
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
276
280
|
readonly server_tool_use?: {
|
|
277
281
|
readonly [x: string]: unknown;
|
|
278
282
|
readonly web_search_requests?: number | undefined;
|
|
279
283
|
} | null | undefined;
|
|
280
|
-
readonly output_tokens?: number | undefined;
|
|
281
|
-
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
282
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
283
284
|
readonly output_tokens_details?: {
|
|
284
285
|
readonly [x: string]: unknown;
|
|
285
286
|
readonly thinking_tokens?: number | undefined;
|
|
@@ -287,13 +288,13 @@ export declare const protocol: Protocol<{
|
|
|
287
288
|
readonly iterations?: readonly {
|
|
288
289
|
readonly [x: string]: unknown;
|
|
289
290
|
readonly input_tokens?: number | null | undefined;
|
|
291
|
+
readonly output_tokens?: number | undefined;
|
|
292
|
+
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
293
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
290
294
|
readonly server_tool_use?: {
|
|
291
295
|
readonly [x: string]: unknown;
|
|
292
296
|
readonly web_search_requests?: number | undefined;
|
|
293
297
|
} | null | undefined;
|
|
294
|
-
readonly output_tokens?: number | undefined;
|
|
295
|
-
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
296
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
297
298
|
readonly output_tokens_details?: {
|
|
298
299
|
readonly [x: string]: unknown;
|
|
299
300
|
readonly thinking_tokens?: number | undefined;
|
|
@@ -301,23 +302,18 @@ export declare const protocol: Protocol<{
|
|
|
301
302
|
}[] | undefined;
|
|
302
303
|
} | undefined;
|
|
303
304
|
} | undefined;
|
|
304
|
-
readonly
|
|
305
|
-
readonly [x: string]: unknown;
|
|
306
|
-
readonly type?: string | undefined;
|
|
307
|
-
readonly message?: string | undefined;
|
|
308
|
-
} | undefined;
|
|
305
|
+
readonly content_block?: unknown;
|
|
309
306
|
readonly delta?: unknown;
|
|
310
|
-
readonly index?: number | undefined;
|
|
311
307
|
readonly usage?: {
|
|
312
308
|
readonly [x: string]: unknown;
|
|
313
309
|
readonly input_tokens?: number | null | undefined;
|
|
310
|
+
readonly output_tokens?: number | undefined;
|
|
311
|
+
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
312
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
314
313
|
readonly server_tool_use?: {
|
|
315
314
|
readonly [x: string]: unknown;
|
|
316
315
|
readonly web_search_requests?: number | undefined;
|
|
317
316
|
} | null | undefined;
|
|
318
|
-
readonly output_tokens?: number | undefined;
|
|
319
|
-
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
320
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
321
317
|
readonly output_tokens_details?: {
|
|
322
318
|
readonly [x: string]: unknown;
|
|
323
319
|
readonly thinking_tokens?: number | undefined;
|
|
@@ -325,20 +321,24 @@ export declare const protocol: Protocol<{
|
|
|
325
321
|
readonly iterations?: readonly {
|
|
326
322
|
readonly [x: string]: unknown;
|
|
327
323
|
readonly input_tokens?: number | null | undefined;
|
|
324
|
+
readonly output_tokens?: number | undefined;
|
|
325
|
+
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
326
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
328
327
|
readonly server_tool_use?: {
|
|
329
328
|
readonly [x: string]: unknown;
|
|
330
329
|
readonly web_search_requests?: number | undefined;
|
|
331
330
|
} | null | undefined;
|
|
332
|
-
readonly output_tokens?: number | undefined;
|
|
333
|
-
readonly cache_creation_input_tokens?: number | null | undefined;
|
|
334
|
-
readonly cache_read_input_tokens?: number | null | undefined;
|
|
335
331
|
readonly output_tokens_details?: {
|
|
336
332
|
readonly [x: string]: unknown;
|
|
337
333
|
readonly thinking_tokens?: number | undefined;
|
|
338
334
|
} | null | undefined;
|
|
339
335
|
}[] | undefined;
|
|
340
336
|
} | undefined;
|
|
341
|
-
readonly
|
|
337
|
+
readonly error?: {
|
|
338
|
+
readonly [x: string]: unknown;
|
|
339
|
+
readonly type?: string | undefined;
|
|
340
|
+
readonly message?: string | undefined;
|
|
341
|
+
} | undefined;
|
|
342
342
|
}, {
|
|
343
343
|
provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
344
344
|
compactions: {};
|