@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.
Files changed (149) 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 +6 -14
  5. package/dist/experimental/realtime.js +28 -3
  6. package/dist/experimental/system-one.d.ts +1 -1
  7. package/dist/image-client.d.ts +8 -8
  8. package/dist/image.d.ts +593 -437
  9. package/dist/llm.d.ts +51 -51
  10. package/dist/media-client.d.ts +1 -1
  11. package/dist/media.d.ts +4 -4
  12. package/dist/promise.d.ts +199 -198
  13. package/dist/protocols/alibaba-chat.d.ts +81 -82
  14. package/dist/protocols/alibaba-chat.js +0 -1
  15. package/dist/protocols/alibaba-messages.d.ts +99 -99
  16. package/dist/protocols/alibaba-responses.d.ts +120 -120
  17. package/dist/protocols/anthropic-messages.d.ts +187 -187
  18. package/dist/protocols/anthropic-messages.js +3 -2
  19. package/dist/protocols/assemblyai-transcription.d.ts +1 -1
  20. package/dist/protocols/bedrock-converse.d.ts +75 -79
  21. package/dist/protocols/bfl-images.d.ts +1 -1
  22. package/dist/protocols/cartesia-speech.d.ts +17 -17
  23. package/dist/protocols/cohere-chat.d.ts +26 -23
  24. package/dist/protocols/cohere-chat.js +22 -1
  25. package/dist/protocols/deepgram-speech.d.ts +17 -17
  26. package/dist/protocols/deepgram-transcription.d.ts +1 -1
  27. package/dist/protocols/elevenlabs-speech.d.ts +17 -17
  28. package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
  29. package/dist/protocols/fal-images.d.ts +1 -1
  30. package/dist/protocols/fal-video.d.ts +1 -1
  31. package/dist/protocols/gemini.d.ts +55 -55
  32. package/dist/protocols/google-images.d.ts +1 -1
  33. package/dist/protocols/google-interactions.d.ts +64 -62
  34. package/dist/protocols/google-interactions.js +19 -1
  35. package/dist/protocols/google-speech.d.ts +17 -17
  36. package/dist/protocols/google-transcription.d.ts +47 -47
  37. package/dist/protocols/google-video.d.ts +1 -1
  38. package/dist/protocols/meta-messages.d.ts +121 -121
  39. package/dist/protocols/meta-responses.d.ts +201 -201
  40. package/dist/protocols/mistral-chat.d.ts +45 -45
  41. package/dist/protocols/open-responses-channel.d.ts +1 -1
  42. package/dist/protocols/open-responses.d.ts +584 -450
  43. package/dist/protocols/open-responses.js +27 -35
  44. package/dist/protocols/openai-chat.d.ts +248 -248
  45. package/dist/protocols/openai-chat.js +11 -42
  46. package/dist/protocols/openai-compatible-chat.d.ts +32 -32
  47. package/dist/protocols/openai-compatible-responses.d.ts +88 -88
  48. package/dist/protocols/openai-images.d.ts +17 -17
  49. package/dist/protocols/openai-responses.d.ts +567 -567
  50. package/dist/protocols/openai-responses.js +1 -1
  51. package/dist/protocols/openai-speech.d.ts +17 -17
  52. package/dist/protocols/openai-transcription.d.ts +47 -47
  53. package/dist/protocols/replicate-images.d.ts +1 -1
  54. package/dist/protocols/runway-video.d.ts +1 -1
  55. package/dist/protocols/shared.d.ts +12 -1
  56. package/dist/protocols/shared.js +17 -1
  57. package/dist/protocols/stability-images.d.ts +2 -2
  58. package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
  59. package/dist/protocols/utils/bedrock-media.d.ts +4 -4
  60. package/dist/protocols/utils/openai-options.d.ts +1 -1
  61. package/dist/protocols/utils/speech-stream.d.ts +1 -1
  62. package/dist/protocols/utils/tool-schema.d.ts +10 -5
  63. package/dist/protocols/utils/tool-stream.d.ts +152 -152
  64. package/dist/protocols/venice-chat.d.ts +109 -110
  65. package/dist/protocols/venice-chat.js +0 -1
  66. package/dist/protocols/xai-images.d.ts +1 -1
  67. package/dist/protocols/xai-responses.d.ts +79 -79
  68. package/dist/protocols/xai-video.d.ts +1 -1
  69. package/dist/protocols/zai-chat.d.ts +77 -78
  70. package/dist/protocols/zai-chat.js +0 -1
  71. package/dist/protocols/zai-images.d.ts +1 -1
  72. package/dist/protocols/zai-messages.d.ts +97 -97
  73. package/dist/providers/alibaba.d.ts +222 -283
  74. package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
  75. package/dist/providers/amazon-bedrock.d.ts +22 -28
  76. package/dist/providers/anthropic-compatible.d.ts +86 -90
  77. package/dist/providers/anthropic.d.ts +86 -90
  78. package/dist/providers/assemblyai.d.ts +2 -6
  79. package/dist/providers/azure.d.ts +228 -238
  80. package/dist/providers/baseten.d.ts +66 -70
  81. package/dist/providers/black-forest-labs.d.ts +2 -6
  82. package/dist/providers/cartesia.d.ts +2 -6
  83. package/dist/providers/cerebras.d.ts +66 -70
  84. package/dist/providers/cerebras.js +0 -1
  85. package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
  86. package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
  87. package/dist/providers/cohere.d.ts +122 -132
  88. package/dist/providers/cohere.js +0 -2
  89. package/dist/providers/deepgram.d.ts +2 -7
  90. package/dist/providers/deepinfra.d.ts +66 -70
  91. package/dist/providers/deepinfra.js +0 -1
  92. package/dist/providers/deepseek.d.ts +66 -70
  93. package/dist/providers/deepseek.js +1 -1
  94. package/dist/providers/digitalocean.d.ts +137 -141
  95. package/dist/providers/elevenlabs.d.ts +2 -7
  96. package/dist/providers/fal.d.ts +2 -7
  97. package/dist/providers/fireworks.d.ts +66 -70
  98. package/dist/providers/google-vertex-chat.d.ts +34 -38
  99. package/dist/providers/google-vertex-interactions.d.ts +31 -41
  100. package/dist/providers/google-vertex-messages.d.ts +81 -85
  101. package/dist/providers/google-vertex-mistral.d.ts +23 -27
  102. package/dist/providers/google-vertex-responses.d.ts +90 -94
  103. package/dist/providers/google-vertex.d.ts +26 -30
  104. package/dist/providers/google.d.ts +94 -109
  105. package/dist/providers/groq.d.ts +111 -115
  106. package/dist/providers/groq.js +0 -1
  107. package/dist/providers/meta.d.ts +309 -317
  108. package/dist/providers/meta.js +1 -1
  109. package/dist/providers/minimax.d.ts +296 -303
  110. package/dist/providers/minimax.js +1 -1
  111. package/dist/providers/mistral.d.ts +22 -26
  112. package/dist/providers/moonshot.d.ts +296 -303
  113. package/dist/providers/moonshot.js +0 -1
  114. package/dist/providers/openai-compatible-responses.d.ts +90 -94
  115. package/dist/providers/openai-compatible.d.ts +34 -38
  116. package/dist/providers/openai.d.ts +93 -108
  117. package/dist/providers/opencode.d.ts +2 -8
  118. package/dist/providers/openrouter.d.ts +137 -144
  119. package/dist/providers/replicate.d.ts +2 -6
  120. package/dist/providers/runway.d.ts +2 -6
  121. package/dist/providers/stability.d.ts +2 -7
  122. package/dist/providers/togetherai.d.ts +66 -70
  123. package/dist/providers/togetherai.js +1 -1
  124. package/dist/providers/typesafe-ai.d.ts +2 -8
  125. package/dist/providers/venice.d.ts +58 -63
  126. package/dist/providers/vercel-ai-gateway.d.ts +2 -12
  127. package/dist/providers/xai.d.ts +38 -50
  128. package/dist/providers/zai-coding-plan.d.ts +206 -213
  129. package/dist/providers/zai.d.ts +40 -46
  130. package/dist/route/client.d.ts +51 -51
  131. package/dist/route/media-protocol.d.ts +1 -1
  132. package/dist/route/transport/http.d.ts +1 -1
  133. package/dist/route/transport/websocket.d.ts +8 -8
  134. package/dist/schema/errors.d.ts +19 -19
  135. package/dist/schema/events.d.ts +3090 -3288
  136. package/dist/schema/messages.d.ts +8 -7
  137. package/dist/schema/options.d.ts +2 -1
  138. package/dist/schema/options.js +2 -1
  139. package/dist/speech-client.d.ts +8 -8
  140. package/dist/speech.d.ts +434 -398
  141. package/dist/testing.d.ts +338 -338
  142. package/dist/tool-runtime.d.ts +1 -1
  143. package/dist/transcription-client.d.ts +23 -23
  144. package/dist/transcription.d.ts +562 -646
  145. package/dist/utils/sanitize.d.ts +4 -0
  146. package/dist/utils/sanitize.js +23 -6
  147. package/dist/video-client.d.ts +8 -8
  148. package/dist/video.d.ts +416 -372
  149. package/package.json +6 -6
@@ -10,26 +10,25 @@ 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
  }>;
29
29
  export type OptionsInput = typeof Options.Type;
30
30
  export declare const compatibility: {
31
31
  maxTokensField: "max_completion_tokens";
32
- supportsStore: false;
33
32
  supportsStrictMode: false;
34
33
  reasoningField: string;
35
34
  zaiToolStream: false;
@@ -78,8 +77,20 @@ export declare const protocol: Protocol<{
78
77
  readonly file_data: string;
79
78
  };
80
79
  })[];
80
+ } | {
81
+ readonly role: "tool";
82
+ readonly tool_call_id: string;
83
+ readonly content: string | readonly {
84
+ readonly type: "text";
85
+ readonly text: string;
86
+ readonly cache_control?: {
87
+ readonly type: "ephemeral";
88
+ readonly ttl?: string | undefined;
89
+ } | undefined;
90
+ }[];
81
91
  } | {
82
92
  readonly [x: string]: unknown;
93
+ readonly role: "assistant";
83
94
  readonly content: string | readonly {
84
95
  readonly type: "text";
85
96
  readonly text: string;
@@ -88,85 +99,73 @@ export declare const protocol: Protocol<{
88
99
  readonly ttl?: string | undefined;
89
100
  } | undefined;
90
101
  }[] | null;
91
- readonly role: "assistant";
92
- readonly reasoning?: string | undefined;
93
- readonly reasoning_content?: string | undefined;
94
- readonly reasoning_text?: string | undefined;
95
102
  readonly tool_calls?: readonly {
103
+ readonly id: string;
104
+ readonly type: "function";
96
105
  readonly function: {
97
106
  readonly name: string;
98
107
  readonly arguments: string;
99
108
  };
100
- readonly id: string;
101
- readonly type: "function";
102
109
  readonly extra_content?: {
103
110
  readonly google: {
104
111
  readonly thought_signature: string;
105
112
  };
106
113
  } | undefined;
107
114
  }[] | undefined;
115
+ readonly reasoning_content?: string | undefined;
116
+ readonly reasoning?: string | undefined;
117
+ readonly reasoning_text?: string | undefined;
108
118
  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
119
  })[];
121
- readonly stream: true;
122
- readonly max_completion_tokens?: number | undefined;
123
- readonly max_tokens?: number | undefined;
124
- readonly temperature?: number | undefined;
125
120
  readonly tools?: readonly {
121
+ readonly type: "function";
126
122
  readonly function: {
127
- readonly description: string;
128
123
  readonly name: string;
124
+ readonly description: string;
129
125
  readonly parameters: {
130
126
  readonly [x: string]: unknown;
131
127
  };
132
128
  readonly strict?: boolean | undefined;
133
129
  };
134
- readonly type: "function";
135
130
  readonly cache_control?: {
136
131
  readonly type: "ephemeral";
137
132
  readonly ttl?: string | undefined;
138
133
  } | undefined;
139
134
  }[] | 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" | {
135
+ readonly tool_choice?: "auto" | "none" | "required" | {
146
136
  readonly type: "function";
147
137
  readonly function: {
148
138
  readonly name: string;
149
139
  };
150
140
  } | 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;
141
+ readonly stream: true;
159
142
  readonly stream_options?: {
160
143
  readonly include_usage: boolean;
161
144
  } | undefined;
145
+ readonly store?: boolean | undefined;
146
+ readonly prompt_cache_key?: string | undefined;
147
+ readonly reasoning_effort?: OpenResponsesOptions.ReasoningEffort | undefined;
162
148
  readonly tool_stream?: boolean | undefined;
149
+ readonly max_completion_tokens?: number | undefined;
150
+ readonly max_tokens?: number | undefined;
151
+ readonly temperature?: number | undefined;
152
+ readonly top_p?: number | undefined;
153
+ readonly frequency_penalty?: number | undefined;
154
+ readonly presence_penalty?: number | undefined;
155
+ readonly seed?: number | undefined;
156
+ readonly stop?: readonly string[] | undefined;
163
157
  readonly enable_thinking?: boolean | undefined;
164
158
  readonly thinking_budget?: number | undefined;
165
159
  readonly preserve_thinking?: boolean | undefined;
166
160
  readonly clear_thinking?: boolean | undefined;
161
+ readonly thinking?: {
162
+ readonly type: "adaptive" | "disabled" | (string & {});
163
+ } | undefined;
164
+ readonly parallel_tool_calls?: boolean | undefined;
167
165
  readonly repetition_penalty?: number | undefined;
166
+ readonly top_k?: number | undefined;
168
167
  readonly response_format?: {
169
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
168
+ readonly type: "json_object" | "json_schema" | "text" | (string & {});
170
169
  readonly json_schema?: {
171
170
  readonly [x: string]: unknown;
172
171
  } | undefined;
@@ -174,71 +173,47 @@ export declare const protocol: Protocol<{
174
173
  readonly enable_search?: boolean | undefined;
175
174
  readonly search_options?: {
176
175
  readonly forced_search?: boolean | undefined;
177
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
176
+ readonly search_strategy?: "agent" | "agent_max" | "max" | "turbo" | (string & {}) | undefined;
178
177
  readonly enable_search_extension?: boolean | undefined;
179
178
  } | undefined;
180
179
  }, string, "[DONE]" | {
181
180
  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
181
  readonly choices?: readonly {
209
182
  readonly [x: string]: unknown;
210
183
  readonly delta?: {
211
184
  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
185
  readonly content?: string | null | undefined;
216
186
  readonly refusal?: string | null | undefined;
187
+ readonly reasoning_content?: string | null | undefined;
188
+ readonly reasoning?: string | null | undefined;
189
+ readonly reasoning_text?: string | null | undefined;
190
+ readonly reasoning_details?: unknown;
217
191
  readonly tool_calls?: readonly {
192
+ readonly index?: number | null | undefined;
193
+ readonly id?: string | null | undefined;
218
194
  readonly function?: {
219
195
  readonly name?: string | null | undefined;
220
196
  readonly arguments?: string | null | undefined;
221
197
  } | null | undefined;
222
- readonly id?: string | null | undefined;
223
- readonly index?: number | null | undefined;
224
198
  readonly extra_content?: unknown;
225
199
  }[] | null | undefined;
226
- readonly reasoning_details?: unknown;
227
200
  } | null | undefined;
201
+ readonly finish_reason?: string | null | undefined;
202
+ readonly native_finish_reason?: string | null | undefined;
228
203
  readonly usage?: {
229
204
  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
205
  readonly prompt_tokens?: number | null | undefined;
234
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;
235
212
  readonly prompt_tokens_details?: {
236
213
  readonly [x: string]: unknown;
237
214
  readonly cached_tokens?: number | null | undefined;
238
215
  readonly cache_write_tokens?: number | null | undefined;
239
216
  } | null | undefined;
240
- readonly prompt_cache_hit_tokens?: number | null | undefined;
241
- readonly cache_created_input_tokens?: number | null | undefined;
242
217
  readonly completion_tokens_details?: {
243
218
  readonly [x: string]: unknown;
244
219
  readonly reasoning_tokens?: number | null | undefined;
@@ -246,8 +221,32 @@ export declare const protocol: Protocol<{
246
221
  readonly rejected_prediction_tokens?: number | null | undefined;
247
222
  } | null | undefined;
248
223
  } | null | undefined;
249
- readonly finish_reason?: string | null | undefined;
250
- readonly native_finish_reason?: string | null | undefined;
251
224
  }[] | null | undefined;
225
+ readonly usage?: {
226
+ readonly [x: string]: unknown;
227
+ readonly prompt_tokens?: number | null | undefined;
228
+ readonly completion_tokens?: number | null | undefined;
229
+ readonly total_tokens?: number | null | undefined;
230
+ readonly cached_tokens?: number | null | undefined;
231
+ readonly prompt_cache_hit_tokens?: number | null | undefined;
232
+ readonly cache_read_input_tokens?: number | null | undefined;
233
+ readonly cache_created_input_tokens?: number | null | undefined;
234
+ readonly prompt_tokens_details?: {
235
+ readonly [x: string]: unknown;
236
+ readonly cached_tokens?: number | null | undefined;
237
+ readonly cache_write_tokens?: number | null | undefined;
238
+ } | null | undefined;
239
+ readonly completion_tokens_details?: {
240
+ readonly [x: string]: unknown;
241
+ readonly reasoning_tokens?: number | null | undefined;
242
+ readonly accepted_prediction_tokens?: number | null | undefined;
243
+ readonly rejected_prediction_tokens?: number | null | undefined;
244
+ } | null | undefined;
245
+ } | null | undefined;
246
+ readonly error?: {
247
+ readonly [x: string]: unknown;
248
+ readonly code?: string | number | null | undefined;
249
+ readonly message: string;
250
+ } | null | undefined;
252
251
  }, OpenAIChat.ParserState>;
253
252
  export * as AlibabaChat from "./alibaba-chat.js";
@@ -29,7 +29,6 @@ const Options = Schema.Struct({
29
29
  });
30
30
  export const compatibility = {
31
31
  maxTokensField: "max_completion_tokens",
32
- supportsStore: false,
33
32
  supportsStrictMode: false,
34
33
  reasoningField: "reasoning_content",
35
34
  zaiToolStream: false,
@@ -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: {};