@opencode/ai 2.1.1 → 2.1.3

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 (99) hide show
  1. package/dist/cache-policy.js +6 -5
  2. package/dist/experimental/evaluation.d.ts +7 -6
  3. package/dist/experimental/evaluation.js +2 -3
  4. package/dist/experimental/realtime.d.ts +59 -0
  5. package/dist/experimental/realtime.js +32 -19
  6. package/dist/experimental/system-one.js +8 -8
  7. package/dist/experimental.d.ts +1 -1
  8. package/dist/generation.js +1 -1
  9. package/dist/image-client.d.ts +3 -1
  10. package/dist/image.d.ts +10 -2
  11. package/dist/image.js +2 -2
  12. package/dist/llm.d.ts +2 -4
  13. package/dist/llm.js +2 -2
  14. package/dist/media-model.d.ts +2 -2
  15. package/dist/media-model.js +1 -1
  16. package/dist/media.js +3 -3
  17. package/dist/promise.d.ts +1 -1
  18. package/dist/promise.js +3 -5
  19. package/dist/protocols/alibaba-chat.d.ts +6 -6
  20. package/dist/protocols/alibaba-chat.js +3 -3
  21. package/dist/protocols/alibaba-messages.d.ts +1 -1
  22. package/dist/protocols/alibaba-messages.js +1 -1
  23. package/dist/protocols/alibaba-responses.d.ts +3 -3
  24. package/dist/protocols/anthropic-messages.js +10 -12
  25. package/dist/protocols/bedrock-converse.d.ts +6 -53
  26. package/dist/protocols/bedrock-converse.js +4 -3
  27. package/dist/protocols/bedrock-event-stream.d.ts +6 -1
  28. package/dist/protocols/bedrock-event-stream.js +9 -8
  29. package/dist/protocols/cohere-chat.d.ts +6 -2
  30. package/dist/protocols/cohere-chat.js +2 -2
  31. package/dist/protocols/gemini.d.ts +12 -2
  32. package/dist/protocols/gemini.js +10 -13
  33. package/dist/protocols/google-interactions.d.ts +2 -1
  34. package/dist/protocols/google-interactions.js +14 -9
  35. package/dist/protocols/meta-responses.d.ts +6 -6
  36. package/dist/protocols/mistral-chat.js +1 -4
  37. package/dist/protocols/open-responses.d.ts +21 -21
  38. package/dist/protocols/open-responses.js +3 -3
  39. package/dist/protocols/openai-chat.d.ts +8 -7
  40. package/dist/protocols/openai-chat.js +4 -5
  41. package/dist/protocols/openai-compatible-responses.d.ts +3 -3
  42. package/dist/protocols/openai-responses.d.ts +18 -18
  43. package/dist/protocols/utils/open-responses-options.d.ts +8 -8
  44. package/dist/protocols/utils/open-responses-options.js +4 -6
  45. package/dist/protocols/utils/partial-json.js +5 -4
  46. package/dist/protocols/utils/tool-schema.d.ts +0 -3
  47. package/dist/protocols/utils/tool-schema.js +0 -4
  48. package/dist/protocols/venice-chat.js +6 -6
  49. package/dist/protocols/xai-images.js +3 -4
  50. package/dist/protocols/xai-responses.d.ts +3 -3
  51. package/dist/provider-error.js +4 -5
  52. package/dist/providers/alibaba.d.ts +30 -30
  53. package/dist/providers/amazon-bedrock-mantle.d.ts +3 -3
  54. package/dist/providers/amazon-bedrock.d.ts +11 -8
  55. package/dist/providers/azure.d.ts +6 -6
  56. package/dist/providers/cloudflare-ai-gateway.d.ts +7 -7
  57. package/dist/providers/cloudflare-ai-gateway.js +2 -4
  58. package/dist/providers/cohere.d.ts +6 -2
  59. package/dist/providers/google-vertex-interactions.d.ts +3 -3
  60. package/dist/providers/google-vertex-messages.d.ts +18 -18
  61. package/dist/providers/google-vertex-mistral.d.ts +3 -3
  62. package/dist/providers/google-vertex-responses.d.ts +3 -3
  63. package/dist/providers/google.d.ts +66 -66
  64. package/dist/providers/meta.d.ts +21 -21
  65. package/dist/providers/minimax.d.ts +195 -195
  66. package/dist/providers/moonshot.d.ts +3 -3
  67. package/dist/providers/openai-compatible-responses.d.ts +3 -3
  68. package/dist/providers/openai-options.d.ts +3 -3
  69. package/dist/providers/openai.d.ts +3 -3
  70. package/dist/providers/openrouter.d.ts +135 -76
  71. package/dist/providers/openrouter.js +40 -33
  72. package/dist/providers/vercel-ai-gateway.js +7 -6
  73. package/dist/providers/zai-coding-plan.d.ts +3 -3
  74. package/dist/route/client.d.ts +0 -216
  75. package/dist/route/client.js +1 -5
  76. package/dist/route/executor-service.d.ts +6 -2
  77. package/dist/route/executor-service.js +7 -0
  78. package/dist/route/executor.d.ts +2 -3
  79. package/dist/route/executor.js +6 -11
  80. package/dist/route/media-protocol.d.ts +1 -1
  81. package/dist/route/media-protocol.js +3 -3
  82. package/dist/route/transport/http.js +5 -8
  83. package/dist/route/transport/websocket.d.ts +0 -24
  84. package/dist/route/transport/websocket.js +0 -50
  85. package/dist/schema/errors.d.ts +9 -8
  86. package/dist/schema/errors.js +9 -5
  87. package/dist/schema/messages.js +4 -7
  88. package/dist/speech-client.d.ts +3 -1
  89. package/dist/speech.d.ts +10 -2
  90. package/dist/speech.js +2 -2
  91. package/dist/transcription-client.d.ts +3 -1
  92. package/dist/transcription.d.ts +10 -2
  93. package/dist/transcription.js +2 -2
  94. package/dist/video-client.d.ts +3 -1
  95. package/dist/video.d.ts +10 -2
  96. package/dist/video.js +2 -2
  97. package/package.json +4 -4
  98. package/dist/protocols/utils/openai-options.d.ts +0 -16
  99. package/dist/protocols/utils/openai-options.js +0 -15
@@ -13,80 +13,19 @@ export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
13
13
  export type GoogleInteractionsOptionsInput = GoogleInteractions.OptionsInput;
14
14
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
15
15
  export declare const routes: (import("../route/client.js").Route<{
16
- readonly model: string;
17
- readonly input: readonly ({
18
- readonly type: "model_output" | "user_input";
19
- readonly content: readonly ({
20
- readonly type: "audio" | "document" | "image" | "video";
21
- readonly data?: string | undefined;
22
- readonly uri?: string | undefined;
23
- readonly mime_type: string;
24
- } | {
25
- readonly type: "text";
26
- readonly text: string;
27
- })[];
28
- } | {
29
- readonly type: "thought";
30
- readonly signature?: string | undefined;
31
- readonly summary?: readonly {
32
- readonly type: "text";
33
- readonly text: string;
34
- }[] | undefined;
35
- } | {
36
- readonly type: "function_call";
37
- readonly id: string;
38
- readonly name: string;
39
- readonly arguments: unknown;
40
- readonly signature?: string | undefined;
41
- } | {
42
- readonly type: "function_result";
43
- readonly call_id: string;
44
- readonly name: string;
45
- readonly result: unknown;
46
- readonly is_error?: boolean | undefined;
47
- })[];
48
- readonly stream: true;
49
- readonly store: boolean;
50
- readonly previous_interaction_id?: string | undefined;
51
- readonly system_instruction?: string | undefined;
52
- readonly service_tier?: string | undefined;
53
- readonly tools?: readonly {
54
- readonly type: "function";
55
- readonly name: string;
56
- readonly description: string;
57
- readonly parameters: {
58
- readonly [x: string]: unknown;
59
- };
60
- }[] | undefined;
61
- readonly generation_config: {
62
- readonly max_output_tokens?: number | undefined;
63
- readonly temperature?: number | undefined;
64
- readonly top_p?: number | undefined;
65
- readonly seed?: number | undefined;
66
- readonly stop_sequences?: readonly string[] | undefined;
67
- readonly thinking_level?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
68
- readonly thinking_summaries?: string | undefined;
69
- readonly tool_choice?: "any" | "auto" | "none" | {
70
- readonly allowed_tools: {
71
- readonly mode: "any";
72
- readonly tools: readonly string[];
73
- };
74
- } | undefined;
75
- };
76
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
77
16
  readonly cachedContent?: string | undefined;
78
17
  readonly contents: readonly {
79
18
  readonly role?: "model" | "user" | null | undefined;
80
19
  readonly parts?: readonly ({
81
- readonly text: string;
82
- readonly thought?: boolean | null | undefined;
83
- readonly thoughtSignature?: string | null | undefined;
84
- } | {
85
20
  readonly inlineData: {
86
21
  readonly mimeType: string;
87
22
  readonly data: string;
88
23
  };
89
24
  readonly thoughtSignature?: string | null | undefined;
25
+ } | {
26
+ readonly text: string;
27
+ readonly thought?: boolean | null | undefined;
28
+ readonly thoughtSignature?: string | null | undefined;
90
29
  } | {
91
30
  readonly fileData: {
92
31
  readonly mimeType: string;
@@ -158,7 +97,68 @@ export declare const routes: (import("../route/client.js").Route<{
158
97
  } | undefined;
159
98
  } | undefined;
160
99
  readonly continuationToken?: string | undefined;
161
- }, Gemini.Prepared, import("../route/client.js").CompactionOperations | undefined>)[];
100
+ }, Gemini.Prepared, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
101
+ readonly model: string;
102
+ readonly input: readonly ({
103
+ readonly type: "model_output" | "user_input";
104
+ readonly content: readonly ({
105
+ readonly type: "text";
106
+ readonly text: string;
107
+ } | {
108
+ readonly type: "audio" | "document" | "image" | "video";
109
+ readonly data?: string | undefined;
110
+ readonly uri?: string | undefined;
111
+ readonly mime_type: string;
112
+ })[];
113
+ } | {
114
+ readonly type: "thought";
115
+ readonly signature?: string | undefined;
116
+ readonly summary?: readonly {
117
+ readonly type: "text";
118
+ readonly text: string;
119
+ }[] | undefined;
120
+ } | {
121
+ readonly type: "function_call";
122
+ readonly id: string;
123
+ readonly name: string;
124
+ readonly arguments: unknown;
125
+ readonly signature?: string | undefined;
126
+ } | {
127
+ readonly type: "function_result";
128
+ readonly call_id: string;
129
+ readonly name: string;
130
+ readonly result: unknown;
131
+ readonly is_error?: boolean | undefined;
132
+ })[];
133
+ readonly stream: true;
134
+ readonly store: boolean;
135
+ readonly previous_interaction_id?: string | undefined;
136
+ readonly system_instruction?: string | undefined;
137
+ readonly service_tier?: string | undefined;
138
+ readonly tools?: readonly {
139
+ readonly type: "function";
140
+ readonly name: string;
141
+ readonly description: string;
142
+ readonly parameters: {
143
+ readonly [x: string]: unknown;
144
+ };
145
+ }[] | undefined;
146
+ readonly generation_config: {
147
+ readonly max_output_tokens?: number | undefined;
148
+ readonly temperature?: number | undefined;
149
+ readonly top_p?: number | undefined;
150
+ readonly seed?: number | undefined;
151
+ readonly stop_sequences?: readonly string[] | undefined;
152
+ readonly thinking_level?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
153
+ readonly thinking_summaries?: string | undefined;
154
+ readonly tool_choice?: "any" | "auto" | "none" | {
155
+ readonly allowed_tools: {
156
+ readonly mode: "any";
157
+ readonly tools: readonly string[];
158
+ };
159
+ } | undefined;
160
+ };
161
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
162
162
  export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
163
163
  readonly baseURL?: string;
164
164
  readonly providerOptions?: Gemini.ProviderOptionsInput & GoogleInteractions.ProviderOptionsInput;
@@ -197,15 +197,15 @@ export declare const routes: (Route<{
197
197
  } | undefined;
198
198
  readonly top_logprobs?: number | undefined;
199
199
  readonly truncation?: "auto" | "disabled" | undefined;
200
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
200
+ readonly service_tier?: OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
201
201
  readonly prompt_cache_key?: string | undefined;
202
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
202
+ readonly include?: readonly OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
203
203
  readonly reasoning?: {
204
204
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
205
205
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
206
206
  } | undefined;
207
207
  readonly text?: {
208
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
208
+ readonly verbosity?: OpenString<"high" | "low" | "medium"> | undefined;
209
209
  } | undefined;
210
210
  readonly max_output_tokens?: number | undefined;
211
211
  readonly max_tool_calls?: number | undefined;
@@ -484,24 +484,6 @@ export declare const routes: (Route<{
484
484
  readonly type: "ephemeral";
485
485
  readonly ttl?: "1h" | "5m" | undefined;
486
486
  } | undefined;
487
- } | {
488
- readonly type: "tool_use";
489
- readonly id: string;
490
- readonly name: string;
491
- readonly input: unknown;
492
- readonly cache_control?: {
493
- readonly type: "ephemeral";
494
- readonly ttl?: "1h" | "5m" | undefined;
495
- } | undefined;
496
- } | {
497
- readonly type: "server_tool_use";
498
- readonly id: string;
499
- readonly name: string;
500
- readonly input: unknown;
501
- readonly cache_control?: {
502
- readonly type: "ephemeral";
503
- readonly ttl?: "1h" | "5m" | undefined;
504
- } | undefined;
505
487
  } | {
506
488
  readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
507
489
  readonly tool_use_id: string;
@@ -528,6 +510,24 @@ export declare const routes: (Route<{
528
510
  readonly type: "ephemeral";
529
511
  readonly ttl?: "1h" | "5m" | undefined;
530
512
  } | undefined;
513
+ } | {
514
+ readonly type: "tool_use";
515
+ readonly id: string;
516
+ readonly name: string;
517
+ readonly input: unknown;
518
+ readonly cache_control?: {
519
+ readonly type: "ephemeral";
520
+ readonly ttl?: "1h" | "5m" | undefined;
521
+ } | undefined;
522
+ } | {
523
+ readonly type: "server_tool_use";
524
+ readonly id: string;
525
+ readonly name: string;
526
+ readonly input: unknown;
527
+ readonly cache_control?: {
528
+ readonly type: "ephemeral";
529
+ readonly ttl?: "1h" | "5m" | undefined;
530
+ } | undefined;
531
531
  })[];
532
532
  } | {
533
533
  readonly role: "system";
@@ -34,183 +34,6 @@ export type Settings<Options = MessagesOptionsInput> = ProviderPackage.Settings
34
34
  readonly baseURL?: string;
35
35
  };
36
36
  export declare const routes: (Route<{
37
- readonly model: string;
38
- readonly input: readonly ({
39
- readonly [x: string]: unknown;
40
- readonly type: string;
41
- readonly id: string;
42
- } | {
43
- readonly type: "compaction";
44
- readonly id?: string | null | undefined;
45
- readonly encrypted_content: string;
46
- } | {
47
- readonly type: "configuration_update";
48
- readonly reasoning: {
49
- readonly effort: import("../schema/options.js").ReasoningEffort;
50
- };
51
- } | {
52
- readonly type: "message";
53
- readonly role: "system";
54
- readonly content: string;
55
- } | {
56
- readonly type: "message";
57
- readonly role: "developer";
58
- readonly content: string;
59
- } | {
60
- readonly type: "message";
61
- readonly role: "user";
62
- readonly content: readonly ({
63
- readonly type: "input_image";
64
- readonly image_url: string;
65
- readonly detail?: string | undefined;
66
- } | {
67
- readonly type: "input_file";
68
- readonly filename: string;
69
- readonly detail?: string | undefined;
70
- readonly file_data?: string | undefined;
71
- readonly file_url?: string | undefined;
72
- } | {
73
- readonly type: "input_text";
74
- readonly text: string;
75
- })[];
76
- readonly id?: string | undefined;
77
- readonly status?: string | undefined;
78
- } | {
79
- readonly type: "message";
80
- readonly id?: string | undefined;
81
- readonly role: "assistant";
82
- readonly content: readonly {
83
- readonly type: "output_text";
84
- readonly text: string;
85
- }[];
86
- readonly phase?: "commentary" | "final_answer" | null | undefined;
87
- readonly status?: string | undefined;
88
- } | {
89
- readonly type: "reasoning";
90
- readonly id?: string | undefined;
91
- readonly summary: readonly {
92
- readonly type: "summary_text";
93
- readonly text: string;
94
- }[];
95
- readonly encrypted_content?: string | null | undefined;
96
- } | {
97
- readonly type: "function_call";
98
- readonly id?: string | undefined;
99
- readonly call_id: string;
100
- readonly name: string;
101
- readonly namespace?: string | undefined;
102
- readonly arguments: string;
103
- } | {
104
- readonly type: "function_call_output";
105
- readonly call_id: string;
106
- readonly output: string | readonly ({
107
- readonly type: "input_image";
108
- readonly image_url: string;
109
- readonly detail?: string | undefined;
110
- } | {
111
- readonly type: "input_file";
112
- readonly filename: string;
113
- readonly detail?: string | undefined;
114
- readonly file_data?: string | undefined;
115
- readonly file_url?: string | undefined;
116
- } | {
117
- readonly type: "input_text";
118
- readonly text: string;
119
- } | {
120
- readonly type: "input_video";
121
- readonly video_url: string;
122
- })[];
123
- } | {
124
- readonly [x: string]: unknown;
125
- readonly type: "web_search_call";
126
- readonly id: string;
127
- readonly status?: string | undefined;
128
- readonly action?: {
129
- readonly [x: string]: unknown;
130
- } | null | undefined;
131
- } | {
132
- readonly [x: string]: unknown;
133
- readonly type: "file_search_call";
134
- readonly id: string;
135
- readonly status?: string | undefined;
136
- readonly queries?: readonly string[] | undefined;
137
- readonly results?: readonly {
138
- readonly [x: string]: unknown;
139
- }[] | null | undefined;
140
- } | {
141
- readonly [x: string]: unknown;
142
- readonly type: "code_interpreter_call";
143
- readonly id: string;
144
- readonly status?: string | undefined;
145
- readonly code?: string | null | undefined;
146
- readonly container_id?: string | null | undefined;
147
- readonly outputs?: readonly {
148
- readonly [x: string]: unknown;
149
- }[] | null | undefined;
150
- } | {
151
- readonly [x: string]: unknown;
152
- readonly type: "mcp_call";
153
- readonly id: string;
154
- readonly status?: string | undefined;
155
- readonly server_label?: string | undefined;
156
- readonly name?: string | undefined;
157
- readonly arguments?: string | undefined;
158
- readonly output?: string | null | undefined;
159
- readonly error?: unknown;
160
- })[];
161
- readonly instructions?: string | undefined;
162
- readonly tools?: readonly ({
163
- readonly type: "function";
164
- readonly name: string;
165
- readonly description: string;
166
- readonly parameters: {
167
- readonly [x: string]: unknown;
168
- };
169
- readonly strict?: boolean | undefined;
170
- } | {
171
- readonly [x: string]: unknown;
172
- readonly type: string;
173
- })[] | undefined;
174
- readonly tool_choice?: "auto" | "none" | "required" | {
175
- readonly type: "function";
176
- readonly name: string;
177
- } | {
178
- readonly type: "allowed_tools";
179
- readonly mode: "auto" | "none" | "required";
180
- readonly tools: readonly {
181
- readonly type: "function";
182
- readonly name: string;
183
- }[];
184
- } | undefined;
185
- readonly store?: boolean | undefined;
186
- readonly metadata?: {
187
- readonly [x: string]: string;
188
- } | undefined;
189
- readonly safety_identifier?: string | undefined;
190
- readonly stream_options?: {
191
- readonly include_obfuscation?: boolean | undefined;
192
- } | undefined;
193
- readonly top_logprobs?: number | undefined;
194
- readonly truncation?: "auto" | "disabled" | undefined;
195
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
196
- readonly prompt_cache_key?: string | undefined;
197
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
198
- readonly reasoning?: {
199
- readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
200
- readonly summary?: "auto" | "concise" | "detailed" | undefined;
201
- } | undefined;
202
- readonly text?: {
203
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
204
- } | undefined;
205
- readonly max_output_tokens?: number | undefined;
206
- readonly max_tool_calls?: number | undefined;
207
- readonly parallel_tool_calls?: boolean | undefined;
208
- readonly temperature?: number | undefined;
209
- readonly top_p?: number | undefined;
210
- readonly presence_penalty?: number | undefined;
211
- readonly frequency_penalty?: number | undefined;
212
- readonly stream: true;
213
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
214
37
  readonly context_management?: {
215
38
  readonly edits: readonly {
216
39
  readonly type: "compact_20260112";
@@ -358,6 +181,24 @@ export declare const routes: (Route<{
358
181
  readonly type: "ephemeral";
359
182
  readonly ttl?: "1h" | "5m" | undefined;
360
183
  } | undefined;
184
+ } | {
185
+ readonly type: "tool_use";
186
+ readonly id: string;
187
+ readonly name: string;
188
+ readonly input: unknown;
189
+ readonly cache_control?: {
190
+ readonly type: "ephemeral";
191
+ readonly ttl?: "1h" | "5m" | undefined;
192
+ } | undefined;
193
+ } | {
194
+ readonly type: "server_tool_use";
195
+ readonly id: string;
196
+ readonly name: string;
197
+ readonly input: unknown;
198
+ readonly cache_control?: {
199
+ readonly type: "ephemeral";
200
+ readonly ttl?: "1h" | "5m" | undefined;
201
+ } | undefined;
361
202
  } | {
362
203
  readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
363
204
  readonly tool_use_id: string;
@@ -384,24 +225,6 @@ export declare const routes: (Route<{
384
225
  readonly type: "ephemeral";
385
226
  readonly ttl?: "1h" | "5m" | undefined;
386
227
  } | undefined;
387
- } | {
388
- readonly type: "tool_use";
389
- readonly id: string;
390
- readonly name: string;
391
- readonly input: unknown;
392
- readonly cache_control?: {
393
- readonly type: "ephemeral";
394
- readonly ttl?: "1h" | "5m" | undefined;
395
- } | undefined;
396
- } | {
397
- readonly type: "server_tool_use";
398
- readonly id: string;
399
- readonly name: string;
400
- readonly input: unknown;
401
- readonly cache_control?: {
402
- readonly type: "ephemeral";
403
- readonly ttl?: "1h" | "5m" | undefined;
404
- } | undefined;
405
228
  })[];
406
229
  } | {
407
230
  readonly role: "system";
@@ -482,6 +305,183 @@ export declare const routes: (Route<{
482
305
  readonly user_id?: string | null | undefined;
483
306
  } | undefined;
484
307
  readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
308
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
309
+ readonly model: string;
310
+ readonly input: readonly ({
311
+ readonly [x: string]: unknown;
312
+ readonly type: string;
313
+ readonly id: string;
314
+ } | {
315
+ readonly type: "compaction";
316
+ readonly id?: string | null | undefined;
317
+ readonly encrypted_content: string;
318
+ } | {
319
+ readonly type: "configuration_update";
320
+ readonly reasoning: {
321
+ readonly effort: import("../schema/options.js").ReasoningEffort;
322
+ };
323
+ } | {
324
+ readonly type: "message";
325
+ readonly role: "system";
326
+ readonly content: string;
327
+ } | {
328
+ readonly type: "message";
329
+ readonly role: "developer";
330
+ readonly content: string;
331
+ } | {
332
+ readonly type: "message";
333
+ readonly role: "user";
334
+ readonly content: readonly ({
335
+ readonly type: "input_image";
336
+ readonly image_url: string;
337
+ readonly detail?: string | undefined;
338
+ } | {
339
+ readonly type: "input_file";
340
+ readonly filename: string;
341
+ readonly detail?: string | undefined;
342
+ readonly file_data?: string | undefined;
343
+ readonly file_url?: string | undefined;
344
+ } | {
345
+ readonly type: "input_text";
346
+ readonly text: string;
347
+ })[];
348
+ readonly id?: string | undefined;
349
+ readonly status?: string | undefined;
350
+ } | {
351
+ readonly type: "message";
352
+ readonly id?: string | undefined;
353
+ readonly role: "assistant";
354
+ readonly content: readonly {
355
+ readonly type: "output_text";
356
+ readonly text: string;
357
+ }[];
358
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
359
+ readonly status?: string | undefined;
360
+ } | {
361
+ readonly type: "reasoning";
362
+ readonly id?: string | undefined;
363
+ readonly summary: readonly {
364
+ readonly type: "summary_text";
365
+ readonly text: string;
366
+ }[];
367
+ readonly encrypted_content?: string | null | undefined;
368
+ } | {
369
+ readonly type: "function_call";
370
+ readonly id?: string | undefined;
371
+ readonly call_id: string;
372
+ readonly name: string;
373
+ readonly namespace?: string | undefined;
374
+ readonly arguments: string;
375
+ } | {
376
+ readonly type: "function_call_output";
377
+ readonly call_id: string;
378
+ readonly output: string | readonly ({
379
+ readonly type: "input_image";
380
+ readonly image_url: string;
381
+ readonly detail?: string | undefined;
382
+ } | {
383
+ readonly type: "input_file";
384
+ readonly filename: string;
385
+ readonly detail?: string | undefined;
386
+ readonly file_data?: string | undefined;
387
+ readonly file_url?: string | undefined;
388
+ } | {
389
+ readonly type: "input_text";
390
+ readonly text: string;
391
+ } | {
392
+ readonly type: "input_video";
393
+ readonly video_url: string;
394
+ })[];
395
+ } | {
396
+ readonly [x: string]: unknown;
397
+ readonly type: "web_search_call";
398
+ readonly id: string;
399
+ readonly status?: string | undefined;
400
+ readonly action?: {
401
+ readonly [x: string]: unknown;
402
+ } | null | undefined;
403
+ } | {
404
+ readonly [x: string]: unknown;
405
+ readonly type: "file_search_call";
406
+ readonly id: string;
407
+ readonly status?: string | undefined;
408
+ readonly queries?: readonly string[] | undefined;
409
+ readonly results?: readonly {
410
+ readonly [x: string]: unknown;
411
+ }[] | null | undefined;
412
+ } | {
413
+ readonly [x: string]: unknown;
414
+ readonly type: "code_interpreter_call";
415
+ readonly id: string;
416
+ readonly status?: string | undefined;
417
+ readonly code?: string | null | undefined;
418
+ readonly container_id?: string | null | undefined;
419
+ readonly outputs?: readonly {
420
+ readonly [x: string]: unknown;
421
+ }[] | null | undefined;
422
+ } | {
423
+ readonly [x: string]: unknown;
424
+ readonly type: "mcp_call";
425
+ readonly id: string;
426
+ readonly status?: string | undefined;
427
+ readonly server_label?: string | undefined;
428
+ readonly name?: string | undefined;
429
+ readonly arguments?: string | undefined;
430
+ readonly output?: string | null | undefined;
431
+ readonly error?: unknown;
432
+ })[];
433
+ readonly instructions?: string | undefined;
434
+ readonly tools?: readonly ({
435
+ readonly type: "function";
436
+ readonly name: string;
437
+ readonly description: string;
438
+ readonly parameters: {
439
+ readonly [x: string]: unknown;
440
+ };
441
+ readonly strict?: boolean | undefined;
442
+ } | {
443
+ readonly [x: string]: unknown;
444
+ readonly type: string;
445
+ })[] | undefined;
446
+ readonly tool_choice?: "auto" | "none" | "required" | {
447
+ readonly type: "function";
448
+ readonly name: string;
449
+ } | {
450
+ readonly type: "allowed_tools";
451
+ readonly mode: "auto" | "none" | "required";
452
+ readonly tools: readonly {
453
+ readonly type: "function";
454
+ readonly name: string;
455
+ }[];
456
+ } | undefined;
457
+ readonly store?: boolean | undefined;
458
+ readonly metadata?: {
459
+ readonly [x: string]: string;
460
+ } | undefined;
461
+ readonly safety_identifier?: string | undefined;
462
+ readonly stream_options?: {
463
+ readonly include_obfuscation?: boolean | undefined;
464
+ } | undefined;
465
+ readonly top_logprobs?: number | undefined;
466
+ readonly truncation?: "auto" | "disabled" | undefined;
467
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
468
+ readonly prompt_cache_key?: string | undefined;
469
+ readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
470
+ readonly reasoning?: {
471
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
472
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
473
+ } | undefined;
474
+ readonly text?: {
475
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
476
+ } | undefined;
477
+ readonly max_output_tokens?: number | undefined;
478
+ readonly max_tool_calls?: number | undefined;
479
+ readonly parallel_tool_calls?: boolean | undefined;
480
+ readonly temperature?: number | undefined;
481
+ readonly top_p?: number | undefined;
482
+ readonly presence_penalty?: number | undefined;
483
+ readonly frequency_penalty?: number | undefined;
484
+ readonly stream: true;
485
485
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
486
486
  readonly model: string;
487
487
  readonly messages: readonly ({
@@ -190,15 +190,15 @@ export declare const routes: (Route<{
190
190
  } | undefined;
191
191
  readonly top_logprobs?: number | undefined;
192
192
  readonly truncation?: "auto" | "disabled" | undefined;
193
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
193
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
194
194
  readonly prompt_cache_key?: string | undefined;
195
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
195
+ readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
196
196
  readonly reasoning?: {
197
197
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
198
198
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
199
199
  } | undefined;
200
200
  readonly text?: {
201
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
201
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
202
202
  } | undefined;
203
203
  readonly max_output_tokens?: number | undefined;
204
204
  readonly max_tool_calls?: number | undefined;
@@ -174,15 +174,15 @@ export declare const routes: import("../route/client.js").Route<{
174
174
  } | undefined;
175
175
  readonly top_logprobs?: number | undefined;
176
176
  readonly truncation?: "auto" | "disabled" | undefined;
177
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
177
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
178
178
  readonly prompt_cache_key?: string | undefined;
179
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
179
+ readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
180
180
  readonly reasoning?: {
181
181
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
182
182
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
183
183
  } | undefined;
184
184
  readonly text?: {
185
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
185
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
186
186
  } | undefined;
187
187
  readonly max_output_tokens?: number | undefined;
188
188
  readonly max_tool_calls?: number | undefined;