@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
@@ -26,12 +26,12 @@ interface State extends SpeechStream.Audio, GeminiGenerateContent.Metadata {
26
26
  readonly mimeType?: string;
27
27
  }
28
28
  export declare const protocol: MediaProtocol.Streamed<Request, {
29
- readonly id: string;
30
29
  readonly type: "generation-queued";
30
+ readonly id: string;
31
31
  readonly position?: number | undefined;
32
32
  } | {
33
- readonly id: string;
34
33
  readonly type: "generation-progress";
34
+ readonly id: string;
35
35
  readonly progress?: number | undefined;
36
36
  } | {
37
37
  readonly type: "audio-delta";
@@ -46,11 +46,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
46
46
  } | {
47
47
  readonly type: "finish";
48
48
  readonly audio: import("../media.js").Asset;
49
- readonly providerMetadata?: {
50
- readonly [x: string]: {
51
- readonly [x: string]: unknown;
52
- };
53
- } | undefined;
54
49
  readonly usage?: {
55
50
  readonly type: "tokens";
56
51
  readonly input?: number | undefined;
@@ -73,7 +68,7 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
73
68
  readonly seconds: number;
74
69
  } | undefined;
75
70
  readonly notices?: readonly {
76
- readonly type: "other" | "moderated" | "filtered";
71
+ readonly type: "filtered" | "moderated" | "other";
77
72
  readonly message: string;
78
73
  readonly providerMetadata?: {
79
74
  readonly [x: string]: {
@@ -81,16 +76,21 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
81
76
  };
82
77
  } | undefined;
83
78
  }[] | undefined;
79
+ readonly providerMetadata?: {
80
+ readonly [x: string]: {
81
+ readonly [x: string]: unknown;
82
+ };
83
+ } | undefined;
84
84
  }, string, State>;
85
85
  export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<GoogleSpeechOptions>;
86
86
  export declare const GoogleSpeech: {
87
87
  readonly protocol: MediaProtocol.Streamed<Request, {
88
- readonly id: string;
89
88
  readonly type: "generation-queued";
89
+ readonly id: string;
90
90
  readonly position?: number | undefined;
91
91
  } | {
92
- readonly id: string;
93
92
  readonly type: "generation-progress";
93
+ readonly id: string;
94
94
  readonly progress?: number | undefined;
95
95
  } | {
96
96
  readonly type: "audio-delta";
@@ -105,11 +105,6 @@ export declare const GoogleSpeech: {
105
105
  } | {
106
106
  readonly type: "finish";
107
107
  readonly audio: import("../media.js").Asset;
108
- readonly providerMetadata?: {
109
- readonly [x: string]: {
110
- readonly [x: string]: unknown;
111
- };
112
- } | undefined;
113
108
  readonly usage?: {
114
109
  readonly type: "tokens";
115
110
  readonly input?: number | undefined;
@@ -132,7 +127,7 @@ export declare const GoogleSpeech: {
132
127
  readonly seconds: number;
133
128
  } | undefined;
134
129
  readonly notices?: readonly {
135
- readonly type: "other" | "moderated" | "filtered";
130
+ readonly type: "filtered" | "moderated" | "other";
136
131
  readonly message: string;
137
132
  readonly providerMetadata?: {
138
133
  readonly [x: string]: {
@@ -140,7 +135,12 @@ export declare const GoogleSpeech: {
140
135
  };
141
136
  } | undefined;
142
137
  }[] | undefined;
138
+ readonly providerMetadata?: {
139
+ readonly [x: string]: {
140
+ readonly [x: string]: unknown;
141
+ };
142
+ } | undefined;
143
143
  }, string, State>;
144
- readonly model: (input: MediaRoute.ModelInput) => SpeechModel<GoogleSpeechOptions>;
144
+ readonly model: typeof model;
145
145
  };
146
146
  export {};
@@ -22,12 +22,12 @@ interface State extends GeminiGenerateContent.Metadata {
22
22
  readonly words: Array<TranscriptionWord>;
23
23
  }
24
24
  export declare const protocol: MediaProtocol.Streamed<Request, {
25
- readonly id: string;
26
25
  readonly type: "generation-queued";
26
+ readonly id: string;
27
27
  readonly position?: number | undefined;
28
28
  } | {
29
- readonly id: string;
30
29
  readonly type: "generation-progress";
30
+ readonly id: string;
31
31
  readonly progress?: number | undefined;
32
32
  } | {
33
33
  readonly type: "text-delta";
@@ -41,14 +41,22 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
41
41
  readonly speaker?: string | undefined;
42
42
  };
43
43
  } | {
44
- readonly type: "finish";
45
44
  readonly text: string;
45
+ readonly segments?: readonly {
46
+ readonly text: string;
47
+ readonly startSeconds: number;
48
+ readonly endSeconds: number;
49
+ readonly speaker?: string | undefined;
50
+ }[] | undefined;
51
+ readonly words?: readonly {
52
+ readonly text: string;
53
+ readonly startSeconds: number;
54
+ readonly endSeconds: number;
55
+ readonly speaker?: string | undefined;
56
+ readonly confidence?: number | undefined;
57
+ }[] | undefined;
58
+ readonly language?: string | undefined;
46
59
  readonly durationSeconds?: number | undefined;
47
- readonly providerMetadata?: {
48
- readonly [x: string]: {
49
- readonly [x: string]: unknown;
50
- };
51
- } | undefined;
52
60
  readonly usage?: {
53
61
  readonly type: "tokens";
54
62
  readonly input?: number | undefined;
@@ -71,7 +79,7 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
71
79
  readonly seconds: number;
72
80
  } | undefined;
73
81
  readonly notices?: readonly {
74
- readonly type: "other" | "moderated" | "filtered";
82
+ readonly type: "filtered" | "moderated" | "other";
75
83
  readonly message: string;
76
84
  readonly providerMetadata?: {
77
85
  readonly [x: string]: {
@@ -79,30 +87,22 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
79
87
  };
80
88
  } | undefined;
81
89
  }[] | undefined;
82
- readonly language?: string | undefined;
83
- readonly segments?: readonly {
84
- readonly text: string;
85
- readonly startSeconds: number;
86
- readonly endSeconds: number;
87
- readonly speaker?: string | undefined;
88
- }[] | undefined;
89
- readonly words?: readonly {
90
- readonly text: string;
91
- readonly startSeconds: number;
92
- readonly endSeconds: number;
93
- readonly speaker?: string | undefined;
94
- readonly confidence?: number | undefined;
95
- }[] | undefined;
90
+ readonly providerMetadata?: {
91
+ readonly [x: string]: {
92
+ readonly [x: string]: unknown;
93
+ };
94
+ } | undefined;
95
+ readonly type: "finish";
96
96
  }, string, State>;
97
97
  export declare const model: (input: MediaRoute.ModelInput) => TranscriptionModel<GoogleTranscriptionOptions>;
98
98
  export declare const GoogleTranscription: {
99
99
  readonly protocol: MediaProtocol.Streamed<Request, {
100
- readonly id: string;
101
100
  readonly type: "generation-queued";
101
+ readonly id: string;
102
102
  readonly position?: number | undefined;
103
103
  } | {
104
- readonly id: string;
105
104
  readonly type: "generation-progress";
105
+ readonly id: string;
106
106
  readonly progress?: number | undefined;
107
107
  } | {
108
108
  readonly type: "text-delta";
@@ -116,14 +116,22 @@ export declare const GoogleTranscription: {
116
116
  readonly speaker?: string | undefined;
117
117
  };
118
118
  } | {
119
- readonly type: "finish";
120
119
  readonly text: string;
120
+ readonly segments?: readonly {
121
+ readonly text: string;
122
+ readonly startSeconds: number;
123
+ readonly endSeconds: number;
124
+ readonly speaker?: string | undefined;
125
+ }[] | undefined;
126
+ readonly words?: readonly {
127
+ readonly text: string;
128
+ readonly startSeconds: number;
129
+ readonly endSeconds: number;
130
+ readonly speaker?: string | undefined;
131
+ readonly confidence?: number | undefined;
132
+ }[] | undefined;
133
+ readonly language?: string | undefined;
121
134
  readonly durationSeconds?: number | undefined;
122
- readonly providerMetadata?: {
123
- readonly [x: string]: {
124
- readonly [x: string]: unknown;
125
- };
126
- } | undefined;
127
135
  readonly usage?: {
128
136
  readonly type: "tokens";
129
137
  readonly input?: number | undefined;
@@ -146,7 +154,7 @@ export declare const GoogleTranscription: {
146
154
  readonly seconds: number;
147
155
  } | undefined;
148
156
  readonly notices?: readonly {
149
- readonly type: "other" | "moderated" | "filtered";
157
+ readonly type: "filtered" | "moderated" | "other";
150
158
  readonly message: string;
151
159
  readonly providerMetadata?: {
152
160
  readonly [x: string]: {
@@ -154,21 +162,13 @@ export declare const GoogleTranscription: {
154
162
  };
155
163
  } | undefined;
156
164
  }[] | undefined;
157
- readonly language?: string | undefined;
158
- readonly segments?: readonly {
159
- readonly text: string;
160
- readonly startSeconds: number;
161
- readonly endSeconds: number;
162
- readonly speaker?: string | undefined;
163
- }[] | undefined;
164
- readonly words?: readonly {
165
- readonly text: string;
166
- readonly startSeconds: number;
167
- readonly endSeconds: number;
168
- readonly speaker?: string | undefined;
169
- readonly confidence?: number | undefined;
170
- }[] | undefined;
165
+ readonly providerMetadata?: {
166
+ readonly [x: string]: {
167
+ readonly [x: string]: unknown;
168
+ };
169
+ } | undefined;
170
+ readonly type: "finish";
171
171
  }, string, State>;
172
- readonly model: (input: MediaRoute.ModelInput) => TranscriptionModel<GoogleTranscriptionOptions>;
172
+ readonly model: typeof model;
173
173
  };
174
174
  export {};
@@ -22,5 +22,5 @@ export declare const GoogleVideo: {
22
22
  readonly protocol: MediaProtocol.Queued<Request, VideoResponse, {
23
23
  readonly operation: string;
24
24
  }>;
25
- readonly model: (input: MediaRoute.ModelInput) => VideoModel<GoogleVideoOptions>;
25
+ readonly model: typeof model;
26
26
  };
@@ -1,7 +1,25 @@
1
1
  import { Protocol } from "../route/protocol.js";
2
2
  export declare const protocol: Protocol<{
3
- readonly max_tokens: number;
3
+ readonly context_management?: {
4
+ readonly edits: readonly {
5
+ readonly type: "compact_20260112";
6
+ readonly trigger?: {
7
+ readonly type: "input_tokens";
8
+ readonly value: number;
9
+ } | undefined;
10
+ readonly pause_after_compaction?: boolean | undefined;
11
+ readonly instructions?: string | undefined;
12
+ }[];
13
+ } | undefined;
4
14
  readonly model: string;
15
+ readonly system?: readonly {
16
+ readonly type: "text";
17
+ readonly text: string;
18
+ readonly cache_control?: {
19
+ readonly type: "ephemeral";
20
+ readonly ttl?: "1h" | "5m" | undefined;
21
+ } | undefined;
22
+ }[] | undefined;
5
23
  readonly messages: readonly ({
6
24
  readonly role: "user";
7
25
  readonly content: readonly ({
@@ -29,7 +47,7 @@ export declare const protocol: Protocol<{
29
47
  readonly ttl?: "1h" | "5m" | undefined;
30
48
  } | undefined;
31
49
  readonly transformations?: {
32
- readonly oversized_image?: "error" | "downsize" | undefined;
50
+ readonly oversized_image?: "downsize" | "error" | undefined;
33
51
  } | undefined;
34
52
  } | {
35
53
  readonly type: "document";
@@ -48,17 +66,18 @@ export declare const protocol: Protocol<{
48
66
  readonly type: "file";
49
67
  readonly file_id: string;
50
68
  };
51
- readonly title?: string | undefined;
52
- readonly context?: string | undefined;
53
69
  readonly cache_control?: {
54
70
  readonly type: "ephemeral";
55
71
  readonly ttl?: "1h" | "5m" | undefined;
56
72
  } | undefined;
73
+ readonly title?: string | undefined;
74
+ readonly context?: string | undefined;
57
75
  readonly citations?: {
58
76
  readonly enabled: boolean;
59
77
  } | undefined;
60
78
  } | {
61
79
  readonly type: "tool_result";
80
+ readonly tool_use_id: string;
62
81
  readonly content: string | readonly ({
63
82
  readonly type: "text";
64
83
  readonly text: string;
@@ -84,7 +103,7 @@ export declare const protocol: Protocol<{
84
103
  readonly ttl?: "1h" | "5m" | undefined;
85
104
  } | undefined;
86
105
  readonly transformations?: {
87
- readonly oversized_image?: "error" | "downsize" | undefined;
106
+ readonly oversized_image?: "downsize" | "error" | undefined;
88
107
  } | undefined;
89
108
  } | {
90
109
  readonly type: "document";
@@ -103,22 +122,21 @@ export declare const protocol: Protocol<{
103
122
  readonly type: "file";
104
123
  readonly file_id: string;
105
124
  };
106
- readonly title?: string | undefined;
107
- readonly context?: string | undefined;
108
125
  readonly cache_control?: {
109
126
  readonly type: "ephemeral";
110
127
  readonly ttl?: "1h" | "5m" | undefined;
111
128
  } | undefined;
129
+ readonly title?: string | undefined;
130
+ readonly context?: string | undefined;
112
131
  readonly citations?: {
113
132
  readonly enabled: boolean;
114
133
  } | undefined;
115
134
  })[];
116
- readonly tool_use_id: string;
135
+ readonly is_error?: boolean | undefined;
117
136
  readonly cache_control?: {
118
137
  readonly type: "ephemeral";
119
138
  readonly ttl?: "1h" | "5m" | undefined;
120
139
  } | undefined;
121
- readonly is_error?: boolean | undefined;
122
140
  })[];
123
141
  } | {
124
142
  readonly role: "assistant";
@@ -130,51 +148,52 @@ export declare const protocol: Protocol<{
130
148
  readonly ttl?: "1h" | "5m" | undefined;
131
149
  } | undefined;
132
150
  } | {
133
- readonly id: string;
134
- readonly type: "tool_use";
135
- readonly name: string;
136
- readonly input: unknown;
151
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
152
+ readonly tool_use_id: string;
153
+ readonly content: unknown;
137
154
  readonly cache_control?: {
138
155
  readonly type: "ephemeral";
139
156
  readonly ttl?: "1h" | "5m" | undefined;
140
157
  } | undefined;
141
158
  } | {
142
- readonly id: string;
143
- readonly type: "server_tool_use";
144
- readonly name: string;
145
- readonly input: unknown;
159
+ readonly type: "compaction";
160
+ readonly content: string | null;
161
+ } | {
162
+ readonly type: "thinking";
163
+ readonly thinking: string;
164
+ readonly signature: string;
146
165
  readonly cache_control?: {
147
166
  readonly type: "ephemeral";
148
167
  readonly ttl?: "1h" | "5m" | undefined;
149
168
  } | undefined;
150
169
  } | {
151
- readonly type: "web_search_tool_result" | "code_execution_tool_result" | "web_fetch_tool_result";
152
- readonly content: unknown;
153
- readonly tool_use_id: string;
170
+ readonly type: "redacted_thinking";
171
+ readonly data: string;
154
172
  readonly cache_control?: {
155
173
  readonly type: "ephemeral";
156
174
  readonly ttl?: "1h" | "5m" | undefined;
157
175
  } | undefined;
158
176
  } | {
159
- readonly type: "thinking";
160
- readonly thinking: string;
161
- readonly signature: string;
177
+ readonly type: "tool_use";
178
+ readonly id: string;
179
+ readonly name: string;
180
+ readonly input: unknown;
162
181
  readonly cache_control?: {
163
182
  readonly type: "ephemeral";
164
183
  readonly ttl?: "1h" | "5m" | undefined;
165
184
  } | undefined;
166
185
  } | {
167
- readonly data: string;
168
- readonly type: "redacted_thinking";
186
+ readonly type: "server_tool_use";
187
+ readonly id: string;
188
+ readonly name: string;
189
+ readonly input: unknown;
169
190
  readonly cache_control?: {
170
191
  readonly type: "ephemeral";
171
192
  readonly ttl?: "1h" | "5m" | undefined;
172
193
  } | undefined;
173
- } | {
174
- readonly type: "compaction";
175
- readonly content: string | null;
176
194
  })[];
177
195
  } | {
196
+ readonly role: "system";
178
197
  readonly content: readonly {
179
198
  readonly type: "text";
180
199
  readonly text: string;
@@ -183,119 +202,101 @@ export declare const protocol: Protocol<{
183
202
  readonly ttl?: "1h" | "5m" | undefined;
184
203
  } | undefined;
185
204
  }[];
186
- readonly role: "system";
187
205
  readonly output_config?: {
188
206
  readonly effort: string;
189
207
  } | undefined;
190
208
  })[];
191
- readonly stream: true;
192
- readonly metadata?: {
193
- readonly user_id?: string | null | undefined;
194
- } | undefined;
195
- readonly temperature?: number | undefined;
196
- readonly tools?: readonly ({
197
- readonly type: "web_search";
198
- readonly name: "web_search";
199
- readonly user_location?: {
200
- readonly type: "approximate";
201
- readonly region?: string | undefined;
202
- readonly city?: string | undefined;
203
- readonly country?: string | undefined;
204
- readonly timezone?: string | undefined;
205
- } | undefined;
209
+ readonly tool_choice?: {
210
+ readonly type: "any" | "auto" | "none";
211
+ readonly disable_parallel_tool_use?: boolean | undefined;
206
212
  } | {
207
- readonly description: string;
213
+ readonly type: "tool";
208
214
  readonly name: string;
209
- readonly input_schema: {
210
- readonly [x: string]: unknown;
211
- };
212
- readonly cache_control?: {
213
- readonly type: "ephemeral";
214
- readonly ttl?: "1h" | "5m" | undefined;
215
- } | undefined;
216
- })[] | undefined;
217
- readonly system?: readonly {
218
- readonly type: "text";
219
- readonly text: string;
220
- readonly cache_control?: {
221
- readonly type: "ephemeral";
222
- readonly ttl?: "1h" | "5m" | undefined;
223
- } | undefined;
224
- }[] | undefined;
215
+ readonly disable_parallel_tool_use?: boolean | undefined;
216
+ } | undefined;
217
+ readonly stream: true;
218
+ readonly max_tokens: number;
219
+ readonly temperature?: number | undefined;
220
+ readonly top_p?: number | undefined;
221
+ readonly top_k?: number | undefined;
222
+ readonly stop_sequences?: readonly string[] | undefined;
225
223
  readonly thinking?: {
226
- readonly type: "enabled";
227
- readonly budget_tokens: number;
228
- readonly display?: import("../schema/options.js").OpenString<"summarized" | "omitted"> | undefined;
224
+ readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
229
225
  readonly block_binding?: {
230
- readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"error" | "drop_block"> | undefined;
226
+ readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
231
227
  } | undefined;
228
+ readonly type: "enabled";
229
+ readonly budget_tokens: number;
232
230
  } | {
233
- readonly type: "adaptive";
234
- readonly display?: import("../schema/options.js").OpenString<"summarized" | "omitted"> | undefined;
231
+ readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
235
232
  readonly block_binding?: {
236
- readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"error" | "drop_block"> | undefined;
233
+ readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
237
234
  } | undefined;
235
+ readonly type: "adaptive";
238
236
  } | {
239
- readonly type: "disabled" | "between_tools";
240
- } | undefined;
241
- readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
242
- readonly container?: string | {
243
- readonly id?: string | null | undefined;
244
- readonly skills?: readonly {
245
- readonly [x: string]: unknown;
246
- }[] | null | undefined;
247
- } | null | undefined;
248
- readonly inference_geo?: string | null | undefined;
249
- readonly cache_control?: {
250
- readonly type: "ephemeral";
251
- readonly ttl?: "1h" | "5m" | undefined;
237
+ readonly type: "between_tools" | "disabled";
252
238
  } | undefined;
253
239
  readonly output_config?: {
240
+ readonly effort?: string | undefined;
254
241
  readonly format?: {
255
242
  readonly type: "json_schema";
256
243
  readonly schema: {
257
244
  readonly [x: string]: unknown;
258
245
  };
259
246
  } | null | undefined;
260
- readonly effort?: string | undefined;
261
247
  } | undefined;
262
- readonly context_management?: {
263
- readonly edits: readonly {
264
- readonly type: "compact_20260112";
265
- readonly instructions?: string | undefined;
266
- readonly trigger?: {
267
- readonly type: "input_tokens";
268
- readonly value: number;
269
- } | undefined;
270
- readonly pause_after_compaction?: boolean | undefined;
271
- }[];
248
+ readonly cache_control?: {
249
+ readonly type: "ephemeral";
250
+ readonly ttl?: "1h" | "5m" | undefined;
272
251
  } | undefined;
273
- readonly tool_choice?: {
274
- readonly type: "auto" | "none" | "any";
275
- readonly disable_parallel_tool_use?: boolean | undefined;
276
- } | {
277
- readonly type: "tool";
278
- readonly name: string;
279
- readonly disable_parallel_tool_use?: boolean | undefined;
252
+ readonly container?: string | {
253
+ readonly id?: string | null | undefined;
254
+ readonly skills?: readonly {
255
+ readonly [x: string]: unknown;
256
+ }[] | null | undefined;
257
+ } | null | undefined;
258
+ readonly inference_geo?: string | null | undefined;
259
+ readonly metadata?: {
260
+ readonly user_id?: string | null | undefined;
280
261
  } | undefined;
281
- readonly top_p?: number | undefined;
282
- readonly top_k?: number | undefined;
283
- readonly stop_sequences?: readonly string[] | undefined;
262
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
263
+ readonly tools?: readonly ({
264
+ readonly name: string;
265
+ readonly description: string;
266
+ readonly input_schema: {
267
+ readonly [x: string]: unknown;
268
+ };
269
+ readonly cache_control?: {
270
+ readonly type: "ephemeral";
271
+ readonly ttl?: "1h" | "5m" | undefined;
272
+ } | undefined;
273
+ } | {
274
+ readonly type: "web_search";
275
+ readonly name: "web_search";
276
+ readonly user_location?: {
277
+ readonly type: "approximate";
278
+ readonly city?: string | undefined;
279
+ readonly region?: string | undefined;
280
+ readonly country?: string | undefined;
281
+ readonly timezone?: string | undefined;
282
+ } | undefined;
283
+ })[] | undefined;
284
284
  }, string, {
285
285
  readonly [x: string]: unknown;
286
286
  readonly type: string;
287
+ readonly index?: number | undefined;
287
288
  readonly message?: {
288
289
  readonly [x: string]: unknown;
289
290
  readonly usage?: {
290
291
  readonly [x: string]: unknown;
291
292
  readonly input_tokens?: number | null | undefined;
293
+ readonly output_tokens?: number | undefined;
294
+ readonly cache_creation_input_tokens?: number | null | undefined;
295
+ readonly cache_read_input_tokens?: number | null | undefined;
292
296
  readonly server_tool_use?: {
293
297
  readonly [x: string]: unknown;
294
298
  readonly web_search_requests?: number | undefined;
295
299
  } | null | undefined;
296
- readonly output_tokens?: number | undefined;
297
- readonly cache_creation_input_tokens?: number | null | undefined;
298
- readonly cache_read_input_tokens?: number | null | undefined;
299
300
  readonly output_tokens_details?: {
300
301
  readonly [x: string]: unknown;
301
302
  readonly thinking_tokens?: number | undefined;
@@ -303,13 +304,13 @@ export declare const protocol: Protocol<{
303
304
  readonly iterations?: readonly {
304
305
  readonly [x: string]: unknown;
305
306
  readonly input_tokens?: number | null | undefined;
307
+ readonly output_tokens?: number | undefined;
308
+ readonly cache_creation_input_tokens?: number | null | undefined;
309
+ readonly cache_read_input_tokens?: number | null | undefined;
306
310
  readonly server_tool_use?: {
307
311
  readonly [x: string]: unknown;
308
312
  readonly web_search_requests?: number | undefined;
309
313
  } | null | undefined;
310
- readonly output_tokens?: number | undefined;
311
- readonly cache_creation_input_tokens?: number | null | undefined;
312
- readonly cache_read_input_tokens?: number | null | undefined;
313
314
  readonly output_tokens_details?: {
314
315
  readonly [x: string]: unknown;
315
316
  readonly thinking_tokens?: number | undefined;
@@ -317,23 +318,18 @@ export declare const protocol: Protocol<{
317
318
  }[] | undefined;
318
319
  } | undefined;
319
320
  } | undefined;
320
- readonly error?: {
321
- readonly [x: string]: unknown;
322
- readonly type?: string | undefined;
323
- readonly message?: string | undefined;
324
- } | undefined;
321
+ readonly content_block?: unknown;
325
322
  readonly delta?: unknown;
326
- readonly index?: number | undefined;
327
323
  readonly usage?: {
328
324
  readonly [x: string]: unknown;
329
325
  readonly input_tokens?: number | null | undefined;
326
+ readonly output_tokens?: number | undefined;
327
+ readonly cache_creation_input_tokens?: number | null | undefined;
328
+ readonly cache_read_input_tokens?: number | null | undefined;
330
329
  readonly server_tool_use?: {
331
330
  readonly [x: string]: unknown;
332
331
  readonly web_search_requests?: number | undefined;
333
332
  } | null | undefined;
334
- readonly output_tokens?: number | undefined;
335
- readonly cache_creation_input_tokens?: number | null | undefined;
336
- readonly cache_read_input_tokens?: number | null | undefined;
337
333
  readonly output_tokens_details?: {
338
334
  readonly [x: string]: unknown;
339
335
  readonly thinking_tokens?: number | undefined;
@@ -341,20 +337,24 @@ export declare const protocol: Protocol<{
341
337
  readonly iterations?: readonly {
342
338
  readonly [x: string]: unknown;
343
339
  readonly input_tokens?: number | null | undefined;
340
+ readonly output_tokens?: number | undefined;
341
+ readonly cache_creation_input_tokens?: number | null | undefined;
342
+ readonly cache_read_input_tokens?: number | null | undefined;
344
343
  readonly server_tool_use?: {
345
344
  readonly [x: string]: unknown;
346
345
  readonly web_search_requests?: number | undefined;
347
346
  } | null | undefined;
348
- readonly output_tokens?: number | undefined;
349
- readonly cache_creation_input_tokens?: number | null | undefined;
350
- readonly cache_read_input_tokens?: number | null | undefined;
351
347
  readonly output_tokens_details?: {
352
348
  readonly [x: string]: unknown;
353
349
  readonly thinking_tokens?: number | undefined;
354
350
  } | null | undefined;
355
351
  }[] | undefined;
356
352
  } | undefined;
357
- readonly content_block?: unknown;
353
+ readonly error?: {
354
+ readonly [x: string]: unknown;
355
+ readonly type?: string | undefined;
356
+ readonly message?: string | undefined;
357
+ } | undefined;
358
358
  }, {
359
359
  provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
360
360
  compactions: {};