@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
|
@@ -18,7 +18,6 @@ export type OptionsInput = {
|
|
|
18
18
|
};
|
|
19
19
|
export declare const compatibility: {
|
|
20
20
|
maxTokensField: "max_tokens";
|
|
21
|
-
supportsStore: false;
|
|
22
21
|
supportsStrictMode: false;
|
|
23
22
|
reasoningField: string;
|
|
24
23
|
zaiToolStream: false;
|
|
@@ -67,8 +66,20 @@ export declare const protocol: Protocol<{
|
|
|
67
66
|
readonly file_data: string;
|
|
68
67
|
};
|
|
69
68
|
})[];
|
|
69
|
+
} | {
|
|
70
|
+
readonly role: "tool";
|
|
71
|
+
readonly tool_call_id: string;
|
|
72
|
+
readonly content: string | readonly {
|
|
73
|
+
readonly type: "text";
|
|
74
|
+
readonly text: string;
|
|
75
|
+
readonly cache_control?: {
|
|
76
|
+
readonly type: "ephemeral";
|
|
77
|
+
readonly ttl?: string | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
}[];
|
|
70
80
|
} | {
|
|
71
81
|
readonly [x: string]: unknown;
|
|
82
|
+
readonly role: "assistant";
|
|
72
83
|
readonly content: string | readonly {
|
|
73
84
|
readonly type: "text";
|
|
74
85
|
readonly text: string;
|
|
@@ -77,145 +88,109 @@ export declare const protocol: Protocol<{
|
|
|
77
88
|
readonly ttl?: string | undefined;
|
|
78
89
|
} | undefined;
|
|
79
90
|
}[] | null;
|
|
80
|
-
readonly role: "assistant";
|
|
81
|
-
readonly reasoning?: string | undefined;
|
|
82
|
-
readonly reasoning_content?: string | undefined;
|
|
83
|
-
readonly reasoning_text?: string | undefined;
|
|
84
91
|
readonly tool_calls?: readonly {
|
|
92
|
+
readonly id: string;
|
|
93
|
+
readonly type: "function";
|
|
85
94
|
readonly function: {
|
|
86
95
|
readonly name: string;
|
|
87
96
|
readonly arguments: string;
|
|
88
97
|
};
|
|
89
|
-
readonly id: string;
|
|
90
|
-
readonly type: "function";
|
|
91
98
|
readonly extra_content?: {
|
|
92
99
|
readonly google: {
|
|
93
100
|
readonly thought_signature: string;
|
|
94
101
|
};
|
|
95
102
|
} | undefined;
|
|
96
103
|
}[] | undefined;
|
|
104
|
+
readonly reasoning_content?: string | undefined;
|
|
105
|
+
readonly reasoning?: string | undefined;
|
|
106
|
+
readonly reasoning_text?: string | undefined;
|
|
97
107
|
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
108
|
})[];
|
|
110
|
-
readonly stream: true;
|
|
111
|
-
readonly max_completion_tokens?: number | undefined;
|
|
112
|
-
readonly max_tokens?: number | undefined;
|
|
113
|
-
readonly temperature?: number | undefined;
|
|
114
109
|
readonly tools?: readonly {
|
|
110
|
+
readonly type: "function";
|
|
115
111
|
readonly function: {
|
|
116
|
-
readonly description: string;
|
|
117
112
|
readonly name: string;
|
|
113
|
+
readonly description: string;
|
|
118
114
|
readonly parameters: {
|
|
119
115
|
readonly [x: string]: unknown;
|
|
120
116
|
};
|
|
121
117
|
readonly strict?: boolean | undefined;
|
|
122
118
|
};
|
|
123
|
-
readonly type: "function";
|
|
124
119
|
readonly cache_control?: {
|
|
125
120
|
readonly type: "ephemeral";
|
|
126
121
|
readonly ttl?: string | undefined;
|
|
127
122
|
} | undefined;
|
|
128
123
|
}[] | 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" | {
|
|
124
|
+
readonly tool_choice?: "auto" | "none" | "required" | {
|
|
137
125
|
readonly type: "function";
|
|
138
126
|
readonly function: {
|
|
139
127
|
readonly name: string;
|
|
140
128
|
};
|
|
141
129
|
} | 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;
|
|
130
|
+
readonly stream: true;
|
|
148
131
|
readonly stream_options?: {
|
|
149
132
|
readonly include_usage: boolean;
|
|
150
133
|
} | undefined;
|
|
134
|
+
readonly store?: boolean | undefined;
|
|
135
|
+
readonly prompt_cache_key?: string | undefined;
|
|
136
|
+
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
151
137
|
readonly tool_stream?: boolean | undefined;
|
|
138
|
+
readonly max_completion_tokens?: number | undefined;
|
|
139
|
+
readonly max_tokens?: number | undefined;
|
|
140
|
+
readonly temperature?: number | undefined;
|
|
141
|
+
readonly top_p?: number | undefined;
|
|
142
|
+
readonly frequency_penalty?: number | undefined;
|
|
143
|
+
readonly presence_penalty?: number | undefined;
|
|
144
|
+
readonly seed?: number | undefined;
|
|
145
|
+
readonly stop?: readonly string[] | undefined;
|
|
146
|
+
readonly thinking?: {
|
|
147
|
+
readonly type?: string | undefined;
|
|
148
|
+
readonly clear_thinking?: boolean | undefined;
|
|
149
|
+
} | undefined;
|
|
150
|
+
readonly do_sample?: boolean | undefined;
|
|
152
151
|
readonly response_format?: {
|
|
153
152
|
readonly type: string;
|
|
154
153
|
} | undefined;
|
|
155
154
|
readonly request_id?: string | undefined;
|
|
156
|
-
readonly
|
|
155
|
+
readonly user_id?: string | undefined;
|
|
157
156
|
}, string, "[DONE]" | {
|
|
158
157
|
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
158
|
readonly choices?: readonly {
|
|
186
159
|
readonly [x: string]: unknown;
|
|
187
160
|
readonly delta?: {
|
|
188
161
|
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
162
|
readonly content?: string | null | undefined;
|
|
193
163
|
readonly refusal?: string | null | undefined;
|
|
164
|
+
readonly reasoning_content?: string | null | undefined;
|
|
165
|
+
readonly reasoning?: string | null | undefined;
|
|
166
|
+
readonly reasoning_text?: string | null | undefined;
|
|
167
|
+
readonly reasoning_details?: unknown;
|
|
194
168
|
readonly tool_calls?: readonly {
|
|
169
|
+
readonly index?: number | null | undefined;
|
|
170
|
+
readonly id?: string | null | undefined;
|
|
195
171
|
readonly function?: {
|
|
196
172
|
readonly name?: string | null | undefined;
|
|
197
173
|
readonly arguments?: string | null | undefined;
|
|
198
174
|
} | null | undefined;
|
|
199
|
-
readonly id?: string | null | undefined;
|
|
200
|
-
readonly index?: number | null | undefined;
|
|
201
175
|
readonly extra_content?: unknown;
|
|
202
176
|
}[] | null | undefined;
|
|
203
|
-
readonly reasoning_details?: unknown;
|
|
204
177
|
} | null | undefined;
|
|
178
|
+
readonly finish_reason?: string | null | undefined;
|
|
179
|
+
readonly native_finish_reason?: string | null | undefined;
|
|
205
180
|
readonly usage?: {
|
|
206
181
|
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
182
|
readonly prompt_tokens?: number | null | undefined;
|
|
211
183
|
readonly completion_tokens?: number | null | undefined;
|
|
184
|
+
readonly total_tokens?: number | null | undefined;
|
|
185
|
+
readonly cached_tokens?: number | null | undefined;
|
|
186
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
187
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
188
|
+
readonly cache_created_input_tokens?: number | null | undefined;
|
|
212
189
|
readonly prompt_tokens_details?: {
|
|
213
190
|
readonly [x: string]: unknown;
|
|
214
191
|
readonly cached_tokens?: number | null | undefined;
|
|
215
192
|
readonly cache_write_tokens?: number | null | undefined;
|
|
216
193
|
} | null | undefined;
|
|
217
|
-
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
218
|
-
readonly cache_created_input_tokens?: number | null | undefined;
|
|
219
194
|
readonly completion_tokens_details?: {
|
|
220
195
|
readonly [x: string]: unknown;
|
|
221
196
|
readonly reasoning_tokens?: number | null | undefined;
|
|
@@ -223,8 +198,32 @@ export declare const protocol: Protocol<{
|
|
|
223
198
|
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
224
199
|
} | null | undefined;
|
|
225
200
|
} | null | undefined;
|
|
226
|
-
readonly finish_reason?: string | null | undefined;
|
|
227
|
-
readonly native_finish_reason?: string | null | undefined;
|
|
228
201
|
}[] | null | undefined;
|
|
202
|
+
readonly usage?: {
|
|
203
|
+
readonly [x: string]: unknown;
|
|
204
|
+
readonly prompt_tokens?: number | null | undefined;
|
|
205
|
+
readonly completion_tokens?: number | null | undefined;
|
|
206
|
+
readonly total_tokens?: number | null | undefined;
|
|
207
|
+
readonly cached_tokens?: number | null | undefined;
|
|
208
|
+
readonly prompt_cache_hit_tokens?: number | null | undefined;
|
|
209
|
+
readonly cache_read_input_tokens?: number | null | undefined;
|
|
210
|
+
readonly cache_created_input_tokens?: number | null | undefined;
|
|
211
|
+
readonly prompt_tokens_details?: {
|
|
212
|
+
readonly [x: string]: unknown;
|
|
213
|
+
readonly cached_tokens?: number | null | undefined;
|
|
214
|
+
readonly cache_write_tokens?: number | null | undefined;
|
|
215
|
+
} | null | undefined;
|
|
216
|
+
readonly completion_tokens_details?: {
|
|
217
|
+
readonly [x: string]: unknown;
|
|
218
|
+
readonly reasoning_tokens?: number | null | undefined;
|
|
219
|
+
readonly accepted_prediction_tokens?: number | null | undefined;
|
|
220
|
+
readonly rejected_prediction_tokens?: number | null | undefined;
|
|
221
|
+
} | null | undefined;
|
|
222
|
+
} | null | undefined;
|
|
223
|
+
readonly error?: {
|
|
224
|
+
readonly [x: string]: unknown;
|
|
225
|
+
readonly code?: string | number | null | undefined;
|
|
226
|
+
readonly message: string;
|
|
227
|
+
} | null | undefined;
|
|
229
228
|
}, OpenAIChat.ParserState>;
|
|
230
229
|
export * as ZAIChat from "./zai-chat.js";
|
|
@@ -39,7 +39,6 @@ const fromRequest = Effect.fn("ZAIChat.fromRequest")(function* (request) {
|
|
|
39
39
|
});
|
|
40
40
|
export const compatibility = {
|
|
41
41
|
maxTokensField: "max_tokens",
|
|
42
|
-
supportsStore: false,
|
|
43
42
|
supportsStrictMode: false,
|
|
44
43
|
reasoningField: "reasoning_content",
|
|
45
44
|
zaiToolStream: false,
|
|
@@ -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: {};
|