@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.
Files changed (126) hide show
  1. package/dist/ai-client.d.ts +2 -2
  2. package/dist/experimental/evaluation-client.d.ts +1 -1
  3. package/dist/experimental/evaluation.d.ts +20 -20
  4. package/dist/experimental/realtime.d.ts +1 -13
  5. package/dist/experimental/system-one.d.ts +1 -1
  6. package/dist/image-client.d.ts +8 -8
  7. package/dist/image.d.ts +593 -437
  8. package/dist/llm.d.ts +51 -51
  9. package/dist/media-client.d.ts +1 -1
  10. package/dist/media.d.ts +4 -4
  11. package/dist/promise.d.ts +199 -198
  12. package/dist/protocols/alibaba-chat.d.ts +81 -81
  13. package/dist/protocols/alibaba-messages.d.ts +99 -99
  14. package/dist/protocols/alibaba-responses.d.ts +119 -119
  15. package/dist/protocols/anthropic-messages.d.ts +187 -187
  16. package/dist/protocols/assemblyai-transcription.d.ts +1 -1
  17. package/dist/protocols/bedrock-converse.d.ts +75 -79
  18. package/dist/protocols/bfl-images.d.ts +1 -1
  19. package/dist/protocols/cartesia-speech.d.ts +17 -17
  20. package/dist/protocols/cohere-chat.d.ts +26 -25
  21. package/dist/protocols/deepgram-speech.d.ts +17 -17
  22. package/dist/protocols/deepgram-transcription.d.ts +1 -1
  23. package/dist/protocols/elevenlabs-speech.d.ts +17 -17
  24. package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
  25. package/dist/protocols/fal-images.d.ts +1 -1
  26. package/dist/protocols/fal-video.d.ts +1 -1
  27. package/dist/protocols/gemini.d.ts +55 -55
  28. package/dist/protocols/google-images.d.ts +1 -1
  29. package/dist/protocols/google-interactions.d.ts +64 -64
  30. package/dist/protocols/google-speech.d.ts +17 -17
  31. package/dist/protocols/google-transcription.d.ts +47 -47
  32. package/dist/protocols/google-video.d.ts +1 -1
  33. package/dist/protocols/meta-messages.d.ts +121 -121
  34. package/dist/protocols/meta-responses.d.ts +200 -200
  35. package/dist/protocols/mistral-chat.d.ts +45 -45
  36. package/dist/protocols/open-responses-channel.d.ts +1 -1
  37. package/dist/protocols/open-responses.d.ts +394 -394
  38. package/dist/protocols/openai-chat.d.ts +248 -248
  39. package/dist/protocols/openai-compatible-chat.d.ts +32 -32
  40. package/dist/protocols/openai-compatible-responses.d.ts +88 -88
  41. package/dist/protocols/openai-images.d.ts +17 -17
  42. package/dist/protocols/openai-responses.d.ts +566 -566
  43. package/dist/protocols/openai-responses.js +1 -1
  44. package/dist/protocols/openai-speech.d.ts +17 -17
  45. package/dist/protocols/openai-transcription.d.ts +47 -47
  46. package/dist/protocols/replicate-images.d.ts +1 -1
  47. package/dist/protocols/runway-video.d.ts +1 -1
  48. package/dist/protocols/shared.d.ts +1 -1
  49. package/dist/protocols/stability-images.d.ts +2 -2
  50. package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
  51. package/dist/protocols/utils/bedrock-media.d.ts +4 -4
  52. package/dist/protocols/utils/openai-options.d.ts +1 -1
  53. package/dist/protocols/utils/speech-stream.d.ts +1 -1
  54. package/dist/protocols/utils/tool-schema.d.ts +10 -5
  55. package/dist/protocols/utils/tool-stream.d.ts +152 -152
  56. package/dist/protocols/venice-chat.d.ts +109 -109
  57. package/dist/protocols/xai-images.d.ts +1 -1
  58. package/dist/protocols/xai-responses.d.ts +78 -78
  59. package/dist/protocols/xai-video.d.ts +1 -1
  60. package/dist/protocols/zai-chat.d.ts +77 -77
  61. package/dist/protocols/zai-images.d.ts +1 -1
  62. package/dist/protocols/zai-messages.d.ts +97 -97
  63. package/dist/providers/alibaba.d.ts +222 -283
  64. package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
  65. package/dist/providers/amazon-bedrock.d.ts +22 -28
  66. package/dist/providers/anthropic-compatible.d.ts +86 -90
  67. package/dist/providers/anthropic.d.ts +86 -90
  68. package/dist/providers/assemblyai.d.ts +2 -6
  69. package/dist/providers/azure.d.ts +228 -238
  70. package/dist/providers/baseten.d.ts +66 -70
  71. package/dist/providers/black-forest-labs.d.ts +2 -6
  72. package/dist/providers/cartesia.d.ts +2 -6
  73. package/dist/providers/cerebras.d.ts +66 -70
  74. package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
  75. package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
  76. package/dist/providers/cohere.d.ts +122 -132
  77. package/dist/providers/deepgram.d.ts +2 -7
  78. package/dist/providers/deepinfra.d.ts +66 -70
  79. package/dist/providers/deepseek.d.ts +66 -70
  80. package/dist/providers/digitalocean.d.ts +137 -141
  81. package/dist/providers/elevenlabs.d.ts +2 -7
  82. package/dist/providers/fal.d.ts +2 -7
  83. package/dist/providers/fireworks.d.ts +66 -70
  84. package/dist/providers/google-vertex-chat.d.ts +34 -38
  85. package/dist/providers/google-vertex-interactions.d.ts +31 -41
  86. package/dist/providers/google-vertex-messages.d.ts +81 -85
  87. package/dist/providers/google-vertex-mistral.d.ts +23 -27
  88. package/dist/providers/google-vertex-responses.d.ts +90 -94
  89. package/dist/providers/google-vertex.d.ts +26 -30
  90. package/dist/providers/google.d.ts +94 -109
  91. package/dist/providers/groq.d.ts +111 -115
  92. package/dist/providers/meta.d.ts +309 -317
  93. package/dist/providers/minimax.d.ts +296 -303
  94. package/dist/providers/mistral.d.ts +22 -26
  95. package/dist/providers/moonshot.d.ts +296 -303
  96. package/dist/providers/openai-compatible-responses.d.ts +90 -94
  97. package/dist/providers/openai-compatible.d.ts +34 -38
  98. package/dist/providers/openai.d.ts +93 -108
  99. package/dist/providers/opencode.d.ts +2 -8
  100. package/dist/providers/openrouter.d.ts +137 -144
  101. package/dist/providers/replicate.d.ts +2 -6
  102. package/dist/providers/runway.d.ts +2 -6
  103. package/dist/providers/stability.d.ts +2 -7
  104. package/dist/providers/togetherai.d.ts +66 -70
  105. package/dist/providers/typesafe-ai.d.ts +2 -8
  106. package/dist/providers/venice.d.ts +58 -63
  107. package/dist/providers/vercel-ai-gateway.d.ts +2 -12
  108. package/dist/providers/xai.d.ts +38 -50
  109. package/dist/providers/zai-coding-plan.d.ts +206 -213
  110. package/dist/providers/zai.d.ts +40 -46
  111. package/dist/route/client.d.ts +51 -51
  112. package/dist/route/media-protocol.d.ts +1 -1
  113. package/dist/route/transport/http.d.ts +1 -1
  114. package/dist/route/transport/websocket.d.ts +8 -8
  115. package/dist/schema/errors.d.ts +19 -19
  116. package/dist/schema/events.d.ts +3090 -3288
  117. package/dist/schema/messages.d.ts +8 -7
  118. package/dist/speech-client.d.ts +8 -8
  119. package/dist/speech.d.ts +434 -398
  120. package/dist/testing.d.ts +338 -338
  121. package/dist/tool-runtime.d.ts +1 -1
  122. package/dist/transcription-client.d.ts +23 -23
  123. package/dist/transcription.d.ts +562 -646
  124. package/dist/video-client.d.ts +8 -8
  125. package/dist/video.d.ts +416 -372
  126. package/package.json +6 -6
@@ -10,19 +10,19 @@ declare const Options: Schema.Struct<{
10
10
  readonly preserveThinking: Schema.optional<Schema.Boolean>;
11
11
  readonly clearThinking: Schema.optional<Schema.Boolean>;
12
12
  readonly thinking: Schema.optional<Schema.Struct<{
13
- readonly type: Schema.declare<(string & {}) | "disabled" | "adaptive", (string & {}) | "disabled" | "adaptive">;
13
+ readonly type: Schema.declare<"adaptive" | "disabled" | (string & {}), "adaptive" | "disabled" | (string & {})>;
14
14
  }>>;
15
15
  readonly toolStream: Schema.optional<Schema.Boolean>;
16
16
  readonly parallelToolCalls: Schema.optional<Schema.Boolean>;
17
17
  readonly repetitionPenalty: Schema.optional<Schema.Number>;
18
18
  readonly responseFormat: Schema.optional<Schema.Struct<{
19
- readonly type: Schema.declare<(string & {}) | "text" | "json_schema" | "json_object", (string & {}) | "text" | "json_schema" | "json_object">;
19
+ readonly type: Schema.declare<"json_object" | "json_schema" | "text" | (string & {}), "json_object" | "json_schema" | "text" | (string & {})>;
20
20
  readonly json_schema: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
21
21
  }>>;
22
22
  readonly enableSearch: Schema.optional<Schema.Boolean>;
23
23
  readonly searchOptions: Schema.optional<Schema.Struct<{
24
24
  readonly forced_search: Schema.optional<Schema.Boolean>;
25
- readonly search_strategy: Schema.optional<Schema.declare<(string & {}) | "agent" | "max" | "turbo" | "agent_max", (string & {}) | "agent" | "max" | "turbo" | "agent_max">>;
25
+ readonly search_strategy: Schema.optional<Schema.declare<"agent" | "agent_max" | "max" | "turbo" | (string & {}), "agent" | "agent_max" | "max" | "turbo" | (string & {})>>;
26
26
  readonly enable_search_extension: Schema.optional<Schema.Boolean>;
27
27
  }>>;
28
28
  }>;
@@ -78,8 +78,20 @@ export declare const protocol: Protocol<{
78
78
  readonly file_data: string;
79
79
  };
80
80
  })[];
81
+ } | {
82
+ readonly role: "tool";
83
+ readonly tool_call_id: string;
84
+ readonly content: string | readonly {
85
+ readonly type: "text";
86
+ readonly text: string;
87
+ readonly cache_control?: {
88
+ readonly type: "ephemeral";
89
+ readonly ttl?: string | undefined;
90
+ } | undefined;
91
+ }[];
81
92
  } | {
82
93
  readonly [x: string]: unknown;
94
+ readonly role: "assistant";
83
95
  readonly content: string | readonly {
84
96
  readonly type: "text";
85
97
  readonly text: string;
@@ -88,85 +100,73 @@ export declare const protocol: Protocol<{
88
100
  readonly ttl?: string | undefined;
89
101
  } | undefined;
90
102
  }[] | null;
91
- readonly role: "assistant";
92
- readonly reasoning?: string | undefined;
93
- readonly reasoning_content?: string | undefined;
94
- readonly reasoning_text?: string | undefined;
95
103
  readonly tool_calls?: readonly {
104
+ readonly id: string;
105
+ readonly type: "function";
96
106
  readonly function: {
97
107
  readonly name: string;
98
108
  readonly arguments: string;
99
109
  };
100
- readonly id: string;
101
- readonly type: "function";
102
110
  readonly extra_content?: {
103
111
  readonly google: {
104
112
  readonly thought_signature: string;
105
113
  };
106
114
  } | undefined;
107
115
  }[] | undefined;
116
+ readonly reasoning_content?: string | undefined;
117
+ readonly reasoning?: string | undefined;
118
+ readonly reasoning_text?: string | undefined;
108
119
  readonly reasoning_details?: unknown;
109
- } | {
110
- readonly role: "tool";
111
- readonly tool_call_id: string;
112
- readonly content: string | readonly {
113
- readonly type: "text";
114
- readonly text: string;
115
- readonly cache_control?: {
116
- readonly type: "ephemeral";
117
- readonly ttl?: string | undefined;
118
- } | undefined;
119
- }[];
120
120
  })[];
121
- readonly stream: true;
122
- readonly max_completion_tokens?: number | undefined;
123
- readonly max_tokens?: number | undefined;
124
- readonly temperature?: number | undefined;
125
121
  readonly tools?: readonly {
122
+ readonly type: "function";
126
123
  readonly function: {
127
- readonly description: string;
128
124
  readonly name: string;
125
+ readonly description: string;
129
126
  readonly parameters: {
130
127
  readonly [x: string]: unknown;
131
128
  };
132
129
  readonly strict?: boolean | undefined;
133
130
  };
134
- readonly type: "function";
135
131
  readonly cache_control?: {
136
132
  readonly type: "ephemeral";
137
133
  readonly ttl?: string | undefined;
138
134
  } | undefined;
139
135
  }[] | undefined;
140
- readonly stop?: readonly string[] | undefined;
141
- readonly seed?: number | undefined;
142
- readonly thinking?: {
143
- readonly type: (string & {}) | "disabled" | "adaptive";
144
- } | undefined;
145
- readonly tool_choice?: "required" | "auto" | "none" | {
136
+ readonly tool_choice?: "auto" | "none" | "required" | {
146
137
  readonly type: "function";
147
138
  readonly function: {
148
139
  readonly name: string;
149
140
  };
150
141
  } | undefined;
151
- readonly top_p?: number | undefined;
152
- readonly top_k?: number | undefined;
153
- readonly frequency_penalty?: number | undefined;
154
- readonly presence_penalty?: number | undefined;
155
- readonly store?: boolean | undefined;
156
- readonly prompt_cache_key?: string | undefined;
157
- readonly parallel_tool_calls?: boolean | undefined;
158
- readonly reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
142
+ readonly stream: true;
159
143
  readonly stream_options?: {
160
144
  readonly include_usage: boolean;
161
145
  } | undefined;
146
+ readonly store?: boolean | undefined;
147
+ readonly prompt_cache_key?: string | undefined;
148
+ readonly reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
162
149
  readonly tool_stream?: boolean | undefined;
150
+ readonly max_completion_tokens?: number | undefined;
151
+ readonly max_tokens?: number | undefined;
152
+ readonly temperature?: number | undefined;
153
+ readonly top_p?: number | undefined;
154
+ readonly frequency_penalty?: number | undefined;
155
+ readonly presence_penalty?: number | undefined;
156
+ readonly seed?: number | undefined;
157
+ readonly stop?: readonly string[] | undefined;
163
158
  readonly enable_thinking?: boolean | undefined;
164
159
  readonly thinking_budget?: number | undefined;
165
160
  readonly preserve_thinking?: boolean | undefined;
166
161
  readonly clear_thinking?: boolean | undefined;
162
+ readonly thinking?: {
163
+ readonly type: "adaptive" | "disabled" | (string & {});
164
+ } | undefined;
165
+ readonly parallel_tool_calls?: boolean | undefined;
167
166
  readonly repetition_penalty?: number | undefined;
167
+ readonly top_k?: number | undefined;
168
168
  readonly response_format?: {
169
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
169
+ readonly type: "json_object" | "json_schema" | "text" | (string & {});
170
170
  readonly json_schema?: {
171
171
  readonly [x: string]: unknown;
172
172
  } | undefined;
@@ -174,71 +174,47 @@ export declare const protocol: Protocol<{
174
174
  readonly enable_search?: boolean | undefined;
175
175
  readonly search_options?: {
176
176
  readonly forced_search?: boolean | undefined;
177
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
177
+ readonly search_strategy?: "agent" | "agent_max" | "max" | "turbo" | (string & {}) | undefined;
178
178
  readonly enable_search_extension?: boolean | undefined;
179
179
  } | undefined;
180
180
  }, string, "[DONE]" | {
181
181
  readonly [x: string]: unknown;
182
- readonly error?: {
183
- readonly [x: string]: unknown;
184
- readonly message: string;
185
- readonly code?: string | number | null | undefined;
186
- } | null | undefined;
187
- readonly usage?: {
188
- readonly [x: string]: unknown;
189
- readonly cache_read_input_tokens?: number | null | undefined;
190
- readonly cached_tokens?: number | null | undefined;
191
- readonly total_tokens?: number | null | undefined;
192
- readonly prompt_tokens?: number | null | undefined;
193
- readonly completion_tokens?: number | null | undefined;
194
- readonly prompt_tokens_details?: {
195
- readonly [x: string]: unknown;
196
- readonly cached_tokens?: number | null | undefined;
197
- readonly cache_write_tokens?: number | null | undefined;
198
- } | null | undefined;
199
- readonly prompt_cache_hit_tokens?: number | null | undefined;
200
- readonly cache_created_input_tokens?: number | null | undefined;
201
- readonly completion_tokens_details?: {
202
- readonly [x: string]: unknown;
203
- readonly reasoning_tokens?: number | null | undefined;
204
- readonly accepted_prediction_tokens?: number | null | undefined;
205
- readonly rejected_prediction_tokens?: number | null | undefined;
206
- } | null | undefined;
207
- } | null | undefined;
208
182
  readonly choices?: readonly {
209
183
  readonly [x: string]: unknown;
210
184
  readonly delta?: {
211
185
  readonly [x: string]: unknown;
212
- readonly reasoning?: string | null | undefined;
213
- readonly reasoning_content?: string | null | undefined;
214
- readonly reasoning_text?: string | null | undefined;
215
186
  readonly content?: string | null | undefined;
216
187
  readonly refusal?: string | null | undefined;
188
+ readonly reasoning_content?: string | null | undefined;
189
+ readonly reasoning?: string | null | undefined;
190
+ readonly reasoning_text?: string | null | undefined;
191
+ readonly reasoning_details?: unknown;
217
192
  readonly tool_calls?: readonly {
193
+ readonly index?: number | null | undefined;
194
+ readonly id?: string | null | undefined;
218
195
  readonly function?: {
219
196
  readonly name?: string | null | undefined;
220
197
  readonly arguments?: string | null | undefined;
221
198
  } | null | undefined;
222
- readonly id?: string | null | undefined;
223
- readonly index?: number | null | undefined;
224
199
  readonly extra_content?: unknown;
225
200
  }[] | null | undefined;
226
- readonly reasoning_details?: unknown;
227
201
  } | null | undefined;
202
+ readonly finish_reason?: string | null | undefined;
203
+ readonly native_finish_reason?: string | null | undefined;
228
204
  readonly usage?: {
229
205
  readonly [x: string]: unknown;
230
- readonly cache_read_input_tokens?: number | null | undefined;
231
- readonly cached_tokens?: number | null | undefined;
232
- readonly total_tokens?: number | null | undefined;
233
206
  readonly prompt_tokens?: number | null | undefined;
234
207
  readonly completion_tokens?: number | null | undefined;
208
+ readonly total_tokens?: number | null | undefined;
209
+ readonly cached_tokens?: number | null | undefined;
210
+ readonly prompt_cache_hit_tokens?: number | null | undefined;
211
+ readonly cache_read_input_tokens?: number | null | undefined;
212
+ readonly cache_created_input_tokens?: number | null | undefined;
235
213
  readonly prompt_tokens_details?: {
236
214
  readonly [x: string]: unknown;
237
215
  readonly cached_tokens?: number | null | undefined;
238
216
  readonly cache_write_tokens?: number | null | undefined;
239
217
  } | null | undefined;
240
- readonly prompt_cache_hit_tokens?: number | null | undefined;
241
- readonly cache_created_input_tokens?: number | null | undefined;
242
218
  readonly completion_tokens_details?: {
243
219
  readonly [x: string]: unknown;
244
220
  readonly reasoning_tokens?: number | null | undefined;
@@ -246,8 +222,32 @@ export declare const protocol: Protocol<{
246
222
  readonly rejected_prediction_tokens?: number | null | undefined;
247
223
  } | null | undefined;
248
224
  } | null | undefined;
249
- readonly finish_reason?: string | null | undefined;
250
- readonly native_finish_reason?: string | null | undefined;
251
225
  }[] | null | undefined;
226
+ readonly usage?: {
227
+ readonly [x: string]: unknown;
228
+ readonly prompt_tokens?: number | null | undefined;
229
+ readonly completion_tokens?: number | null | undefined;
230
+ readonly total_tokens?: number | null | undefined;
231
+ readonly cached_tokens?: number | null | undefined;
232
+ readonly prompt_cache_hit_tokens?: number | null | undefined;
233
+ readonly cache_read_input_tokens?: number | null | undefined;
234
+ readonly cache_created_input_tokens?: number | null | undefined;
235
+ readonly prompt_tokens_details?: {
236
+ readonly [x: string]: unknown;
237
+ readonly cached_tokens?: number | null | undefined;
238
+ readonly cache_write_tokens?: number | null | undefined;
239
+ } | null | undefined;
240
+ readonly completion_tokens_details?: {
241
+ readonly [x: string]: unknown;
242
+ readonly reasoning_tokens?: number | null | undefined;
243
+ readonly accepted_prediction_tokens?: number | null | undefined;
244
+ readonly rejected_prediction_tokens?: number | null | undefined;
245
+ } | null | undefined;
246
+ } | null | undefined;
247
+ readonly error?: {
248
+ readonly [x: string]: unknown;
249
+ readonly code?: string | number | null | undefined;
250
+ readonly message: string;
251
+ } | null | undefined;
252
252
  }, OpenAIChat.ParserState>;
253
253
  export * as AlibabaChat from "./alibaba-chat.js";
@@ -5,15 +5,33 @@ import { OpenResponsesOptions } from "./utils/open-responses-options.js";
5
5
  declare const Options: Schema.Struct<{
6
6
  readonly effort: Schema.optional<Schema.declare<OpenResponsesOptions.ReasoningEffort, OpenResponsesOptions.ReasoningEffort>>;
7
7
  readonly thinking: Schema.optional<Schema.Struct<{
8
- readonly type: Schema.declare<(string & {}) | "enabled" | "disabled", (string & {}) | "enabled" | "disabled">;
8
+ readonly type: Schema.declare<"disabled" | "enabled" | (string & {}), "disabled" | "enabled" | (string & {})>;
9
9
  readonly budgetTokens: Schema.optional<Schema.Int>;
10
10
  readonly budget_tokens: Schema.optional<Schema.Int>;
11
11
  }>>;
12
12
  }>;
13
13
  export type OptionsInput = typeof Options.Type & Pick<AnthropicMessages.OptionsInput, "outputConfig">;
14
14
  export declare const protocol: Protocol<{
15
- readonly max_tokens: number;
15
+ readonly context_management?: {
16
+ readonly edits: readonly {
17
+ readonly type: "compact_20260112";
18
+ readonly trigger?: {
19
+ readonly type: "input_tokens";
20
+ readonly value: number;
21
+ } | undefined;
22
+ readonly pause_after_compaction?: boolean | undefined;
23
+ readonly instructions?: string | undefined;
24
+ }[];
25
+ } | undefined;
16
26
  readonly model: string;
27
+ readonly system?: readonly {
28
+ readonly type: "text";
29
+ readonly text: string;
30
+ readonly cache_control?: {
31
+ readonly type: "ephemeral";
32
+ readonly ttl?: "1h" | "5m" | undefined;
33
+ } | undefined;
34
+ }[] | undefined;
17
35
  readonly messages: readonly ({
18
36
  readonly role: "user";
19
37
  readonly content: readonly ({
@@ -41,7 +59,7 @@ export declare const protocol: Protocol<{
41
59
  readonly ttl?: "1h" | "5m" | undefined;
42
60
  } | undefined;
43
61
  readonly transformations?: {
44
- readonly oversized_image?: "error" | "downsize" | undefined;
62
+ readonly oversized_image?: "downsize" | "error" | undefined;
45
63
  } | undefined;
46
64
  } | {
47
65
  readonly type: "document";
@@ -60,17 +78,18 @@ export declare const protocol: Protocol<{
60
78
  readonly type: "file";
61
79
  readonly file_id: string;
62
80
  };
63
- readonly title?: string | undefined;
64
- readonly context?: string | undefined;
65
81
  readonly cache_control?: {
66
82
  readonly type: "ephemeral";
67
83
  readonly ttl?: "1h" | "5m" | undefined;
68
84
  } | undefined;
85
+ readonly title?: string | undefined;
86
+ readonly context?: string | undefined;
69
87
  readonly citations?: {
70
88
  readonly enabled: boolean;
71
89
  } | undefined;
72
90
  } | {
73
91
  readonly type: "tool_result";
92
+ readonly tool_use_id: string;
74
93
  readonly content: string | readonly ({
75
94
  readonly type: "text";
76
95
  readonly text: string;
@@ -96,7 +115,7 @@ export declare const protocol: Protocol<{
96
115
  readonly ttl?: "1h" | "5m" | undefined;
97
116
  } | undefined;
98
117
  readonly transformations?: {
99
- readonly oversized_image?: "error" | "downsize" | undefined;
118
+ readonly oversized_image?: "downsize" | "error" | undefined;
100
119
  } | undefined;
101
120
  } | {
102
121
  readonly type: "document";
@@ -115,22 +134,21 @@ export declare const protocol: Protocol<{
115
134
  readonly type: "file";
116
135
  readonly file_id: string;
117
136
  };
118
- readonly title?: string | undefined;
119
- readonly context?: string | undefined;
120
137
  readonly cache_control?: {
121
138
  readonly type: "ephemeral";
122
139
  readonly ttl?: "1h" | "5m" | undefined;
123
140
  } | undefined;
141
+ readonly title?: string | undefined;
142
+ readonly context?: string | undefined;
124
143
  readonly citations?: {
125
144
  readonly enabled: boolean;
126
145
  } | undefined;
127
146
  })[];
128
- readonly tool_use_id: string;
147
+ readonly is_error?: boolean | undefined;
129
148
  readonly cache_control?: {
130
149
  readonly type: "ephemeral";
131
150
  readonly ttl?: "1h" | "5m" | undefined;
132
151
  } | undefined;
133
- readonly is_error?: boolean | undefined;
134
152
  })[];
135
153
  } | {
136
154
  readonly role: "assistant";
@@ -142,51 +160,52 @@ export declare const protocol: Protocol<{
142
160
  readonly ttl?: "1h" | "5m" | undefined;
143
161
  } | undefined;
144
162
  } | {
145
- readonly id: string;
146
- readonly type: "tool_use";
147
- readonly name: string;
148
- readonly input: unknown;
163
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
164
+ readonly tool_use_id: string;
165
+ readonly content: unknown;
149
166
  readonly cache_control?: {
150
167
  readonly type: "ephemeral";
151
168
  readonly ttl?: "1h" | "5m" | undefined;
152
169
  } | undefined;
153
170
  } | {
154
- readonly id: string;
155
- readonly type: "server_tool_use";
156
- readonly name: string;
157
- readonly input: unknown;
171
+ readonly type: "compaction";
172
+ readonly content: string | null;
173
+ } | {
174
+ readonly type: "thinking";
175
+ readonly thinking: string;
176
+ readonly signature: string;
158
177
  readonly cache_control?: {
159
178
  readonly type: "ephemeral";
160
179
  readonly ttl?: "1h" | "5m" | undefined;
161
180
  } | undefined;
162
181
  } | {
163
- readonly type: "web_search_tool_result" | "code_execution_tool_result" | "web_fetch_tool_result";
164
- readonly content: unknown;
165
- readonly tool_use_id: string;
182
+ readonly type: "redacted_thinking";
183
+ readonly data: string;
166
184
  readonly cache_control?: {
167
185
  readonly type: "ephemeral";
168
186
  readonly ttl?: "1h" | "5m" | undefined;
169
187
  } | undefined;
170
188
  } | {
171
- readonly type: "thinking";
172
- readonly thinking: string;
173
- readonly signature: string;
189
+ readonly type: "tool_use";
190
+ readonly id: string;
191
+ readonly name: string;
192
+ readonly input: unknown;
174
193
  readonly cache_control?: {
175
194
  readonly type: "ephemeral";
176
195
  readonly ttl?: "1h" | "5m" | undefined;
177
196
  } | undefined;
178
197
  } | {
179
- readonly data: string;
180
- readonly type: "redacted_thinking";
198
+ readonly type: "server_tool_use";
199
+ readonly id: string;
200
+ readonly name: string;
201
+ readonly input: unknown;
181
202
  readonly cache_control?: {
182
203
  readonly type: "ephemeral";
183
204
  readonly ttl?: "1h" | "5m" | undefined;
184
205
  } | undefined;
185
- } | {
186
- readonly type: "compaction";
187
- readonly content: string | null;
188
206
  })[];
189
207
  } | {
208
+ readonly role: "system";
190
209
  readonly content: readonly {
191
210
  readonly type: "text";
192
211
  readonly text: string;
@@ -195,19 +214,13 @@ export declare const protocol: Protocol<{
195
214
  readonly ttl?: "1h" | "5m" | undefined;
196
215
  } | undefined;
197
216
  }[];
198
- readonly role: "system";
199
217
  readonly output_config?: {
200
218
  readonly effort: string;
201
219
  } | undefined;
202
220
  })[];
203
- readonly stream: true;
204
- readonly metadata?: {
205
- readonly user_id?: string | null | undefined;
206
- } | undefined;
207
- readonly temperature?: number | undefined;
208
221
  readonly tools?: readonly {
209
- readonly description: string;
210
222
  readonly name: string;
223
+ readonly description: string;
211
224
  readonly input_schema: {
212
225
  readonly [x: string]: unknown;
213
226
  };
@@ -216,76 +229,64 @@ export declare const protocol: Protocol<{
216
229
  readonly ttl?: "1h" | "5m" | undefined;
217
230
  } | undefined;
218
231
  }[] | undefined;
219
- readonly system?: readonly {
220
- readonly type: "text";
221
- readonly text: string;
222
- readonly cache_control?: {
223
- readonly type: "ephemeral";
224
- readonly ttl?: "1h" | "5m" | undefined;
225
- } | undefined;
226
- }[] | undefined;
227
- readonly thinking?: {
228
- readonly type: string;
229
- readonly budget_tokens?: number | undefined;
230
- } | undefined;
231
- readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
232
- readonly container?: string | {
233
- readonly id?: string | null | undefined;
234
- readonly skills?: readonly {
235
- readonly [x: string]: unknown;
236
- }[] | null | undefined;
237
- } | null | undefined;
238
- readonly inference_geo?: string | null | undefined;
239
- readonly cache_control?: {
240
- readonly type: "ephemeral";
241
- readonly ttl?: "1h" | "5m" | undefined;
232
+ readonly tool_choice?: {
233
+ readonly type: "any" | "auto" | "none";
234
+ readonly disable_parallel_tool_use?: boolean | undefined;
235
+ } | {
236
+ readonly type: "tool";
237
+ readonly name: string;
238
+ readonly disable_parallel_tool_use?: boolean | undefined;
242
239
  } | undefined;
240
+ readonly stream: true;
241
+ readonly max_tokens: number;
242
+ readonly temperature?: number | undefined;
243
+ readonly top_p?: number | undefined;
244
+ readonly top_k?: number | undefined;
245
+ readonly stop_sequences?: readonly string[] | undefined;
243
246
  readonly output_config?: {
247
+ readonly effort?: string | undefined;
244
248
  readonly format?: {
245
249
  readonly type: "json_schema";
246
250
  readonly schema: {
247
251
  readonly [x: string]: unknown;
248
252
  };
249
253
  } | null | undefined;
250
- readonly effort?: string | undefined;
251
254
  } | undefined;
252
- readonly context_management?: {
253
- readonly edits: readonly {
254
- readonly type: "compact_20260112";
255
- readonly instructions?: string | undefined;
256
- readonly trigger?: {
257
- readonly type: "input_tokens";
258
- readonly value: number;
259
- } | undefined;
260
- readonly pause_after_compaction?: boolean | undefined;
261
- }[];
255
+ readonly cache_control?: {
256
+ readonly type: "ephemeral";
257
+ readonly ttl?: "1h" | "5m" | undefined;
262
258
  } | undefined;
263
- readonly tool_choice?: {
264
- readonly type: "auto" | "none" | "any";
265
- readonly disable_parallel_tool_use?: boolean | undefined;
266
- } | {
267
- readonly type: "tool";
268
- readonly name: string;
269
- readonly disable_parallel_tool_use?: boolean | undefined;
259
+ readonly container?: string | {
260
+ readonly id?: string | null | undefined;
261
+ readonly skills?: readonly {
262
+ readonly [x: string]: unknown;
263
+ }[] | null | undefined;
264
+ } | null | undefined;
265
+ readonly inference_geo?: string | null | undefined;
266
+ readonly metadata?: {
267
+ readonly user_id?: string | null | undefined;
268
+ } | undefined;
269
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
270
+ readonly thinking?: {
271
+ readonly type: string;
272
+ readonly budget_tokens?: number | undefined;
270
273
  } | undefined;
271
- readonly top_p?: number | undefined;
272
- readonly top_k?: number | undefined;
273
- readonly stop_sequences?: readonly string[] | undefined;
274
274
  }, string, {
275
275
  readonly [x: string]: unknown;
276
276
  readonly type: string;
277
+ readonly index?: number | undefined;
277
278
  readonly message?: {
278
279
  readonly [x: string]: unknown;
279
280
  readonly usage?: {
280
281
  readonly [x: string]: unknown;
281
282
  readonly input_tokens?: number | null | undefined;
283
+ readonly output_tokens?: number | undefined;
284
+ readonly cache_creation_input_tokens?: number | null | undefined;
285
+ readonly cache_read_input_tokens?: number | null | undefined;
282
286
  readonly server_tool_use?: {
283
287
  readonly [x: string]: unknown;
284
288
  readonly web_search_requests?: number | undefined;
285
289
  } | null | undefined;
286
- readonly output_tokens?: number | undefined;
287
- readonly cache_creation_input_tokens?: number | null | undefined;
288
- readonly cache_read_input_tokens?: number | null | undefined;
289
290
  readonly output_tokens_details?: {
290
291
  readonly [x: string]: unknown;
291
292
  readonly thinking_tokens?: number | undefined;
@@ -293,13 +294,13 @@ export declare const protocol: Protocol<{
293
294
  readonly iterations?: readonly {
294
295
  readonly [x: string]: unknown;
295
296
  readonly input_tokens?: number | null | undefined;
297
+ readonly output_tokens?: number | undefined;
298
+ readonly cache_creation_input_tokens?: number | null | undefined;
299
+ readonly cache_read_input_tokens?: number | null | undefined;
296
300
  readonly server_tool_use?: {
297
301
  readonly [x: string]: unknown;
298
302
  readonly web_search_requests?: number | undefined;
299
303
  } | null | undefined;
300
- readonly output_tokens?: number | undefined;
301
- readonly cache_creation_input_tokens?: number | null | undefined;
302
- readonly cache_read_input_tokens?: number | null | undefined;
303
304
  readonly output_tokens_details?: {
304
305
  readonly [x: string]: unknown;
305
306
  readonly thinking_tokens?: number | undefined;
@@ -307,23 +308,18 @@ export declare const protocol: Protocol<{
307
308
  }[] | undefined;
308
309
  } | undefined;
309
310
  } | undefined;
310
- readonly error?: {
311
- readonly [x: string]: unknown;
312
- readonly type?: string | undefined;
313
- readonly message?: string | undefined;
314
- } | undefined;
311
+ readonly content_block?: unknown;
315
312
  readonly delta?: unknown;
316
- readonly index?: number | undefined;
317
313
  readonly usage?: {
318
314
  readonly [x: string]: unknown;
319
315
  readonly input_tokens?: number | null | undefined;
316
+ readonly output_tokens?: number | undefined;
317
+ readonly cache_creation_input_tokens?: number | null | undefined;
318
+ readonly cache_read_input_tokens?: number | null | undefined;
320
319
  readonly server_tool_use?: {
321
320
  readonly [x: string]: unknown;
322
321
  readonly web_search_requests?: number | undefined;
323
322
  } | 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;
327
323
  readonly output_tokens_details?: {
328
324
  readonly [x: string]: unknown;
329
325
  readonly thinking_tokens?: number | undefined;
@@ -331,20 +327,24 @@ export declare const protocol: Protocol<{
331
327
  readonly iterations?: readonly {
332
328
  readonly [x: string]: unknown;
333
329
  readonly input_tokens?: number | null | undefined;
330
+ readonly output_tokens?: number | undefined;
331
+ readonly cache_creation_input_tokens?: number | null | undefined;
332
+ readonly cache_read_input_tokens?: number | null | undefined;
334
333
  readonly server_tool_use?: {
335
334
  readonly [x: string]: unknown;
336
335
  readonly web_search_requests?: number | undefined;
337
336
  } | null | undefined;
338
- readonly output_tokens?: number | undefined;
339
- readonly cache_creation_input_tokens?: number | null | undefined;
340
- readonly cache_read_input_tokens?: number | null | undefined;
341
337
  readonly output_tokens_details?: {
342
338
  readonly [x: string]: unknown;
343
339
  readonly thinking_tokens?: number | undefined;
344
340
  } | null | undefined;
345
341
  }[] | undefined;
346
342
  } | undefined;
347
- readonly content_block?: unknown;
343
+ readonly error?: {
344
+ readonly [x: string]: unknown;
345
+ readonly type?: string | undefined;
346
+ readonly message?: string | undefined;
347
+ } | undefined;
348
348
  }, {
349
349
  provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
350
350
  compactions: {};