@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
@@ -19,12 +19,12 @@ export type ElevenLabsSpeechOptions = {
19
19
  } & Record<string, unknown>;
20
20
  export type Request = SpeechRequestFor<ElevenLabsSpeechOptions>;
21
21
  export declare const protocol: MediaProtocol.Streamed<Request, {
22
- readonly id: string;
23
22
  readonly type: "generation-queued";
23
+ readonly id: string;
24
24
  readonly position?: number | undefined;
25
25
  } | {
26
- readonly id: string;
27
26
  readonly type: "generation-progress";
27
+ readonly id: string;
28
28
  readonly progress?: number | undefined;
29
29
  } | {
30
30
  readonly type: "audio-delta";
@@ -39,11 +39,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
39
39
  } | {
40
40
  readonly type: "finish";
41
41
  readonly audio: import("../media.js").Asset;
42
- readonly providerMetadata?: {
43
- readonly [x: string]: {
44
- readonly [x: string]: unknown;
45
- };
46
- } | undefined;
47
42
  readonly usage?: {
48
43
  readonly type: "tokens";
49
44
  readonly input?: number | undefined;
@@ -66,7 +61,7 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
66
61
  readonly seconds: number;
67
62
  } | undefined;
68
63
  readonly notices?: readonly {
69
- readonly type: "other" | "moderated" | "filtered";
64
+ readonly type: "filtered" | "moderated" | "other";
70
65
  readonly message: string;
71
66
  readonly providerMetadata?: {
72
67
  readonly [x: string]: {
@@ -74,16 +69,21 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
74
69
  };
75
70
  } | undefined;
76
71
  }[] | undefined;
72
+ readonly providerMetadata?: {
73
+ readonly [x: string]: {
74
+ readonly [x: string]: unknown;
75
+ };
76
+ } | undefined;
77
77
  }, string | Uint8Array<ArrayBufferLike>, SpeechStream.Audio>;
78
78
  export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<ElevenLabsSpeechOptions>;
79
79
  export declare const ElevenLabsSpeech: {
80
80
  readonly protocol: MediaProtocol.Streamed<Request, {
81
- readonly id: string;
82
81
  readonly type: "generation-queued";
82
+ readonly id: string;
83
83
  readonly position?: number | undefined;
84
84
  } | {
85
- readonly id: string;
86
85
  readonly type: "generation-progress";
86
+ readonly id: string;
87
87
  readonly progress?: number | undefined;
88
88
  } | {
89
89
  readonly type: "audio-delta";
@@ -98,11 +98,6 @@ export declare const ElevenLabsSpeech: {
98
98
  } | {
99
99
  readonly type: "finish";
100
100
  readonly audio: import("../media.js").Asset;
101
- readonly providerMetadata?: {
102
- readonly [x: string]: {
103
- readonly [x: string]: unknown;
104
- };
105
- } | undefined;
106
101
  readonly usage?: {
107
102
  readonly type: "tokens";
108
103
  readonly input?: number | undefined;
@@ -125,7 +120,7 @@ export declare const ElevenLabsSpeech: {
125
120
  readonly seconds: number;
126
121
  } | undefined;
127
122
  readonly notices?: readonly {
128
- readonly type: "other" | "moderated" | "filtered";
123
+ readonly type: "filtered" | "moderated" | "other";
129
124
  readonly message: string;
130
125
  readonly providerMetadata?: {
131
126
  readonly [x: string]: {
@@ -133,6 +128,11 @@ export declare const ElevenLabsSpeech: {
133
128
  };
134
129
  } | undefined;
135
130
  }[] | undefined;
131
+ readonly providerMetadata?: {
132
+ readonly [x: string]: {
133
+ readonly [x: string]: unknown;
134
+ };
135
+ } | undefined;
136
136
  }, string | Uint8Array<ArrayBufferLike>, SpeechStream.Audio>;
137
- readonly model: (input: MediaRoute.ModelInput) => SpeechModel<ElevenLabsSpeechOptions>;
137
+ readonly model: typeof model;
138
138
  };
@@ -24,5 +24,5 @@ export declare const protocol: MediaProtocol.Inline<Request, TranscriptionRespon
24
24
  export declare const model: (input: MediaRoute.ModelInput) => TranscriptionModel<ElevenLabsTranscriptionOptions>;
25
25
  export declare const ElevenLabsTranscription: {
26
26
  readonly protocol: MediaProtocol.Inline<Request, TranscriptionResponse>;
27
- readonly model: (input: MediaRoute.ModelInput) => TranscriptionModel<ElevenLabsTranscriptionOptions>;
27
+ readonly model: typeof model;
28
28
  };
@@ -21,5 +21,5 @@ export declare const FalImages: {
21
21
  readonly responseURL: string;
22
22
  readonly cancelURL: string;
23
23
  }>;
24
- readonly model: (input: MediaRoute.ModelInput) => ImageModel<FalImageOptions>;
24
+ readonly model: typeof model;
25
25
  };
@@ -25,5 +25,5 @@ export declare const FalVideo: {
25
25
  readonly responseURL: string;
26
26
  readonly cancelURL: string;
27
27
  }>;
28
- readonly model: (input: MediaRoute.ModelInput) => VideoModel<FalVideoOptions>;
28
+ readonly model: typeof model;
29
29
  };
@@ -11,14 +11,14 @@ export type ProviderOptionsInput = OptionsInput;
11
11
  declare const Options: Schema.Struct<{
12
12
  readonly cachedContent: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.String>, never>>;
13
13
  readonly safetySettings: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.$Array<Schema.Struct<{
14
- readonly category: Schema.declare<import("../schema/options.js").OpenString<"HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY">, import("../schema/options.js").OpenString<"HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY">>;
15
- readonly threshold: Schema.declare<import("../schema/options.js").OpenString<"HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF">, import("../schema/options.js").OpenString<"HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF">>;
14
+ readonly category: Schema.declare<import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">, import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">>;
15
+ readonly threshold: Schema.declare<import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">, import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">>;
16
16
  }>>>, never>>;
17
- readonly serviceTier: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"standard" | "flex" | "priority">, import("../schema/options.js").OpenString<"standard" | "flex" | "priority">>>, never>>;
17
+ readonly serviceTier: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"flex" | "priority" | "standard">, import("../schema/options.js").OpenString<"flex" | "priority" | "standard">>>, never>>;
18
18
  readonly thinkingConfig: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Struct<{
19
19
  readonly thinkingBudget: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Number>, never>>;
20
20
  readonly includeThoughts: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Boolean>, never>>;
21
- readonly thinkingLevel: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high">, import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high">>>, never>>;
21
+ readonly thinkingLevel: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">, import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">>>, never>>;
22
22
  }>>, never>>;
23
23
  }>;
24
24
  declare const GeminiBody: Schema.Struct<{
@@ -64,8 +64,8 @@ declare const GeminiBody: Schema.Struct<{
64
64
  }>>;
65
65
  labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
66
66
  safetySettings: Schema.optional<Schema.$Array<Schema.Struct<{
67
- readonly category: Schema.declare<import("../schema/options.js").OpenString<"HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY">, import("../schema/options.js").OpenString<"HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY">>;
68
- readonly threshold: Schema.declare<import("../schema/options.js").OpenString<"HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF">, import("../schema/options.js").OpenString<"HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF">>;
67
+ readonly category: Schema.declare<import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">, import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">>;
68
+ readonly threshold: Schema.declare<import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">, import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">>;
69
69
  }>>>;
70
70
  serviceTier: Schema.optional<Schema.String>;
71
71
  systemInstruction: Schema.optional<Schema.Struct<{
@@ -98,7 +98,7 @@ declare const GeminiBody: Schema.Struct<{
98
98
  readonly thinkingConfig: Schema.optional<Schema.Struct<{
99
99
  readonly thinkingBudget: Schema.optional<Schema.Number>;
100
100
  readonly includeThoughts: Schema.optional<Schema.Boolean>;
101
- readonly thinkingLevel: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high">, import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high">>>;
101
+ readonly thinkingLevel: Schema.optional<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">, import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">>>;
102
102
  }>>;
103
103
  }>>;
104
104
  continuationToken: Schema.optional<Schema.String>;
@@ -154,7 +154,9 @@ export declare const transport: Transport<GeminiBody, Prepared, unknown>;
154
154
  * streaming-event state machine shared by Google AI Studio and Vertex Gemini.
155
155
  */
156
156
  export declare const protocol: Protocol<{
157
+ readonly cachedContent?: string | undefined;
157
158
  readonly contents: readonly {
159
+ readonly role?: "model" | "user" | null | undefined;
158
160
  readonly parts?: readonly ({
159
161
  readonly inlineData: {
160
162
  readonly mimeType: string;
@@ -172,16 +174,16 @@ export declare const protocol: Protocol<{
172
174
  };
173
175
  } | {
174
176
  readonly functionCall: {
175
- readonly name: string;
176
177
  readonly id?: string | null | undefined;
178
+ readonly name: string;
177
179
  readonly args?: unknown;
178
180
  };
179
181
  readonly thoughtSignature?: string | null | undefined;
180
182
  } | {
181
183
  readonly functionResponse: {
184
+ readonly id?: string | undefined;
182
185
  readonly name: string;
183
186
  readonly response: unknown;
184
- readonly id?: string | undefined;
185
187
  readonly parts?: readonly {
186
188
  readonly inlineData: {
187
189
  readonly mimeType: string;
@@ -191,8 +193,20 @@ export declare const protocol: Protocol<{
191
193
  }[] | undefined;
192
194
  };
193
195
  })[] | null | undefined;
194
- readonly role?: "model" | "user" | null | undefined;
195
196
  }[];
197
+ readonly labels?: {
198
+ readonly [x: string]: string;
199
+ } | undefined;
200
+ readonly safetySettings?: readonly {
201
+ readonly category: import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">;
202
+ readonly threshold: import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">;
203
+ }[] | undefined;
204
+ readonly serviceTier?: string | undefined;
205
+ readonly systemInstruction?: {
206
+ readonly parts: readonly {
207
+ readonly text: string;
208
+ }[];
209
+ } | undefined;
196
210
  readonly tools?: readonly {
197
211
  readonly functionDeclarations: readonly {
198
212
  readonly name: string;
@@ -202,27 +216,14 @@ export declare const protocol: Protocol<{
202
216
  };
203
217
  }[];
204
218
  }[] | undefined;
205
- readonly serviceTier?: string | undefined;
206
219
  readonly toolConfig?: {
207
220
  readonly functionCallingConfig: {
208
- readonly mode: "NONE" | "AUTO" | "ANY";
221
+ readonly mode: "ANY" | "AUTO" | "NONE";
209
222
  readonly allowedFunctionNames?: readonly string[] | undefined;
210
223
  };
211
224
  } | undefined;
212
- readonly cachedContent?: string | undefined;
213
- readonly safetySettings?: readonly {
214
- readonly category: import("../schema/options.js").OpenString<"HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY">;
215
- readonly threshold: import("../schema/options.js").OpenString<"HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF">;
216
- }[] | undefined;
217
- readonly labels?: {
218
- readonly [x: string]: string;
219
- } | undefined;
220
- readonly systemInstruction?: {
221
- readonly parts: readonly {
222
- readonly text: string;
223
- }[];
224
- } | undefined;
225
225
  readonly generationConfig?: {
226
+ readonly maxOutputTokens?: number | undefined;
226
227
  readonly temperature?: number | undefined;
227
228
  readonly topP?: number | undefined;
228
229
  readonly topK?: number | undefined;
@@ -233,17 +234,16 @@ export declare const protocol: Protocol<{
233
234
  readonly thinkingConfig?: {
234
235
  readonly thinkingBudget?: number | undefined;
235
236
  readonly includeThoughts?: boolean | undefined;
236
- readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
237
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
237
238
  } | undefined;
238
- readonly maxOutputTokens?: number | undefined;
239
239
  } | undefined;
240
240
  readonly continuationToken?: string | undefined;
241
241
  }, NextRequest | {
242
242
  readonly error?: unknown;
243
243
  readonly candidates?: readonly {
244
244
  readonly content?: {
245
- readonly parts?: readonly unknown[] | null | undefined;
246
245
  readonly role?: "model" | "user" | null | undefined;
246
+ readonly parts?: readonly unknown[] | null | undefined;
247
247
  } | null | undefined;
248
248
  readonly finishReason?: string | null | undefined;
249
249
  }[] | null | undefined;
@@ -254,18 +254,18 @@ export declare const protocol: Protocol<{
254
254
  readonly safetyRatings?: unknown;
255
255
  } | null | undefined;
256
256
  readonly usageMetadata?: {
257
+ readonly cachedContentTokenCount?: number | null | undefined;
258
+ readonly thoughtsTokenCount?: number | null | undefined;
257
259
  readonly promptTokenCount?: number | null | undefined;
258
260
  readonly candidatesTokenCount?: number | null | undefined;
259
261
  readonly totalTokenCount?: number | null | undefined;
260
- readonly cachedContentTokenCount?: number | null | undefined;
261
- readonly thoughtsTokenCount?: number | null | undefined;
262
262
  } | null | undefined;
263
- }, {
263
+ }, NextRequest | {
264
264
  readonly error?: unknown;
265
265
  readonly candidates?: readonly {
266
266
  readonly content?: {
267
- readonly parts?: readonly unknown[] | null | undefined;
268
267
  readonly role?: "model" | "user" | null | undefined;
268
+ readonly parts?: readonly unknown[] | null | undefined;
269
269
  } | null | undefined;
270
270
  readonly finishReason?: string | null | undefined;
271
271
  }[] | null | undefined;
@@ -276,15 +276,17 @@ export declare const protocol: Protocol<{
276
276
  readonly safetyRatings?: unknown;
277
277
  } | null | undefined;
278
278
  readonly usageMetadata?: {
279
+ readonly cachedContentTokenCount?: number | null | undefined;
280
+ readonly thoughtsTokenCount?: number | null | undefined;
279
281
  readonly promptTokenCount?: number | null | undefined;
280
282
  readonly candidatesTokenCount?: number | null | undefined;
281
283
  readonly totalTokenCount?: number | null | undefined;
282
- readonly cachedContentTokenCount?: number | null | undefined;
283
- readonly thoughtsTokenCount?: number | null | undefined;
284
284
  } | null | undefined;
285
- } | NextRequest, ParserState>;
285
+ }, ParserState>;
286
286
  export declare const route: Route<{
287
+ readonly cachedContent?: string | undefined;
287
288
  readonly contents: readonly {
289
+ readonly role?: "model" | "user" | null | undefined;
288
290
  readonly parts?: readonly ({
289
291
  readonly inlineData: {
290
292
  readonly mimeType: string;
@@ -302,16 +304,16 @@ export declare const route: Route<{
302
304
  };
303
305
  } | {
304
306
  readonly functionCall: {
305
- readonly name: string;
306
307
  readonly id?: string | null | undefined;
308
+ readonly name: string;
307
309
  readonly args?: unknown;
308
310
  };
309
311
  readonly thoughtSignature?: string | null | undefined;
310
312
  } | {
311
313
  readonly functionResponse: {
314
+ readonly id?: string | undefined;
312
315
  readonly name: string;
313
316
  readonly response: unknown;
314
- readonly id?: string | undefined;
315
317
  readonly parts?: readonly {
316
318
  readonly inlineData: {
317
319
  readonly mimeType: string;
@@ -321,8 +323,20 @@ export declare const route: Route<{
321
323
  }[] | undefined;
322
324
  };
323
325
  })[] | null | undefined;
324
- readonly role?: "model" | "user" | null | undefined;
325
326
  }[];
327
+ readonly labels?: {
328
+ readonly [x: string]: string;
329
+ } | undefined;
330
+ readonly safetySettings?: readonly {
331
+ readonly category: import("../schema/options.js").OpenString<"HARM_CATEGORY_CIVIC_INTEGRITY" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_UNSPECIFIED">;
332
+ readonly threshold: import("../schema/options.js").OpenString<"BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_NONE" | "BLOCK_ONLY_HIGH" | "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "OFF">;
333
+ }[] | undefined;
334
+ readonly serviceTier?: string | undefined;
335
+ readonly systemInstruction?: {
336
+ readonly parts: readonly {
337
+ readonly text: string;
338
+ }[];
339
+ } | undefined;
326
340
  readonly tools?: readonly {
327
341
  readonly functionDeclarations: readonly {
328
342
  readonly name: string;
@@ -332,27 +346,14 @@ export declare const route: Route<{
332
346
  };
333
347
  }[];
334
348
  }[] | undefined;
335
- readonly serviceTier?: string | undefined;
336
349
  readonly toolConfig?: {
337
350
  readonly functionCallingConfig: {
338
- readonly mode: "NONE" | "AUTO" | "ANY";
351
+ readonly mode: "ANY" | "AUTO" | "NONE";
339
352
  readonly allowedFunctionNames?: readonly string[] | undefined;
340
353
  };
341
354
  } | undefined;
342
- readonly cachedContent?: string | undefined;
343
- readonly safetySettings?: readonly {
344
- readonly category: import("../schema/options.js").OpenString<"HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY">;
345
- readonly threshold: import("../schema/options.js").OpenString<"HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF">;
346
- }[] | undefined;
347
- readonly labels?: {
348
- readonly [x: string]: string;
349
- } | undefined;
350
- readonly systemInstruction?: {
351
- readonly parts: readonly {
352
- readonly text: string;
353
- }[];
354
- } | undefined;
355
355
  readonly generationConfig?: {
356
+ readonly maxOutputTokens?: number | undefined;
356
357
  readonly temperature?: number | undefined;
357
358
  readonly topP?: number | undefined;
358
359
  readonly topK?: number | undefined;
@@ -363,9 +364,8 @@ export declare const route: Route<{
363
364
  readonly thinkingConfig?: {
364
365
  readonly thinkingBudget?: number | undefined;
365
366
  readonly includeThoughts?: boolean | undefined;
366
- readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
367
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
367
368
  } | undefined;
368
- readonly maxOutputTokens?: number | undefined;
369
369
  } | undefined;
370
370
  readonly continuationToken?: string | undefined;
371
371
  }, Prepared, import("../route/client.js").CompactionOperations | undefined>;
@@ -14,5 +14,5 @@ export declare const protocol: MediaProtocol.Inline<Request, ImageResponse>;
14
14
  export declare const model: (input: MediaRoute.ModelInput) => ImageModel<GoogleImageOptions>;
15
15
  export declare const GoogleImages: {
16
16
  readonly protocol: MediaProtocol.Inline<Request, ImageResponse>;
17
- readonly model: (input: MediaRoute.ModelInput) => ImageModel<GoogleImageOptions>;
17
+ readonly model: typeof model;
18
18
  };
@@ -7,9 +7,9 @@ export declare const DEFAULT_BASE_URL = "https://generativelanguage.googleapis.c
7
7
  declare const Options: Schema.Struct<{
8
8
  readonly previousInteractionId: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.String>, never>>;
9
9
  readonly store: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.Boolean>, never>>;
10
- readonly thinkingLevel: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high">, import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high">>>, never>>;
10
+ readonly thinkingLevel: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">, import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal">>>, never>>;
11
11
  readonly thinkingSummaries: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"auto" | "none">, import("../schema/options.js").OpenString<"auto" | "none">>>, never>>;
12
- readonly serviceTier: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"standard" | "flex" | "priority" | "deferred">, import("../schema/options.js").OpenString<"standard" | "flex" | "priority" | "deferred">>>, never>>;
12
+ readonly serviceTier: Schema.optionalKey<Schema.middlewareDecoding<Schema.UndefinedOr<Schema.declare<import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard">, import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard">>>, never>>;
13
13
  }>;
14
14
  export type OptionsInput = typeof Options.Encoded;
15
15
  export type ProviderOptionsInput = OptionsInput;
@@ -38,75 +38,77 @@ interface ParserState {
38
38
  readonly completed: boolean;
39
39
  }
40
40
  export declare const protocol: Protocol<{
41
+ readonly model: string;
41
42
  readonly input: readonly ({
42
- readonly type: "user_input" | "model_output";
43
+ readonly type: "model_output" | "user_input";
43
44
  readonly content: readonly ({
44
- readonly type: "text";
45
- readonly text: string;
46
- } | {
47
- readonly type: "image" | "document" | "video" | "audio";
48
- readonly mime_type: string;
45
+ readonly type: "audio" | "document" | "image" | "video";
49
46
  readonly data?: string | undefined;
50
47
  readonly uri?: string | undefined;
48
+ readonly mime_type: string;
49
+ } | {
50
+ readonly type: "text";
51
+ readonly text: string;
51
52
  })[];
52
53
  } | {
53
54
  readonly type: "thought";
55
+ readonly signature?: string | undefined;
54
56
  readonly summary?: readonly {
55
57
  readonly type: "text";
56
58
  readonly text: string;
57
59
  }[] | undefined;
58
- readonly signature?: string | undefined;
59
60
  } | {
60
- readonly id: string;
61
61
  readonly type: "function_call";
62
+ readonly id: string;
62
63
  readonly name: string;
63
64
  readonly arguments: unknown;
64
65
  readonly signature?: string | undefined;
65
66
  } | {
66
67
  readonly type: "function_result";
68
+ readonly call_id: string;
67
69
  readonly name: string;
68
70
  readonly result: unknown;
69
- readonly call_id: string;
70
71
  readonly is_error?: boolean | undefined;
71
72
  })[];
72
- readonly model: string;
73
73
  readonly stream: true;
74
74
  readonly store: boolean;
75
+ readonly previous_interaction_id?: string | undefined;
76
+ readonly system_instruction?: string | undefined;
77
+ readonly service_tier?: string | undefined;
78
+ readonly tools?: readonly {
79
+ readonly type: "function";
80
+ readonly name: string;
81
+ readonly description: string;
82
+ readonly parameters: {
83
+ readonly [x: string]: unknown;
84
+ };
85
+ }[] | undefined;
75
86
  readonly generation_config: {
87
+ readonly max_output_tokens?: number | undefined;
76
88
  readonly temperature?: number | undefined;
89
+ readonly top_p?: number | undefined;
77
90
  readonly seed?: number | undefined;
78
- readonly tool_choice?: "auto" | "none" | "any" | {
91
+ readonly stop_sequences?: readonly string[] | undefined;
92
+ readonly thinking_level?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
93
+ readonly thinking_summaries?: string | undefined;
94
+ readonly tool_choice?: "any" | "auto" | "none" | {
79
95
  readonly allowed_tools: {
80
96
  readonly mode: "any";
81
97
  readonly tools: readonly string[];
82
98
  };
83
99
  } | undefined;
84
- readonly top_p?: number | undefined;
85
- readonly stop_sequences?: readonly string[] | undefined;
86
- readonly max_output_tokens?: number | undefined;
87
- readonly thinking_level?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
88
- readonly thinking_summaries?: string | undefined;
89
100
  };
90
- readonly tools?: readonly {
91
- readonly type: "function";
92
- readonly name: string;
93
- readonly description: string;
94
- readonly parameters: {
95
- readonly [x: string]: unknown;
96
- };
97
- }[] | undefined;
98
- readonly service_tier?: string | undefined;
99
- readonly previous_interaction_id?: string | undefined;
100
- readonly system_instruction?: string | undefined;
101
101
  }, string, {
102
- readonly event_type: "unknown";
103
- } | {
104
102
  readonly event_type: "step.start";
105
103
  readonly index: number;
106
104
  readonly step: {
107
105
  readonly type: string;
108
106
  readonly id?: string | undefined;
109
107
  readonly name?: string | undefined;
108
+ readonly arguments?: {
109
+ readonly [x: string]: unknown;
110
+ } | undefined;
111
+ readonly signature?: string | undefined;
110
112
  readonly summary?: readonly {
111
113
  readonly type: "text";
112
114
  readonly text: string;
@@ -115,10 +117,6 @@ export declare const protocol: Protocol<{
115
117
  readonly type: string;
116
118
  readonly text?: string | undefined;
117
119
  }[] | undefined;
118
- readonly signature?: string | undefined;
119
- readonly arguments?: {
120
- readonly [x: string]: unknown;
121
- } | undefined;
122
120
  };
123
121
  } | {
124
122
  readonly event_type: "step.delta";
@@ -150,15 +148,15 @@ export declare const protocol: Protocol<{
150
148
  readonly id?: string | undefined;
151
149
  };
152
150
  } | {
153
- readonly status: string;
154
151
  readonly event_type: "interaction.status_update";
155
152
  readonly interaction_id?: string | undefined;
153
+ readonly status: string;
156
154
  } | {
157
155
  readonly event_type: "interaction.completed";
158
156
  readonly interaction: {
159
157
  readonly [x: string]: unknown;
160
- readonly status: string;
161
158
  readonly id?: string | undefined;
159
+ readonly status: string;
162
160
  readonly usage?: {
163
161
  readonly [x: string]: unknown;
164
162
  readonly total_input_tokens?: number | null | undefined;
@@ -172,67 +170,69 @@ export declare const protocol: Protocol<{
172
170
  } | {
173
171
  readonly event_type: "error";
174
172
  readonly error: unknown;
173
+ } | {
174
+ readonly event_type: "unknown";
175
175
  }, ParserState>;
176
176
  export declare const route: Route<{
177
+ readonly model: string;
177
178
  readonly input: readonly ({
178
- readonly type: "user_input" | "model_output";
179
+ readonly type: "model_output" | "user_input";
179
180
  readonly content: readonly ({
180
- readonly type: "text";
181
- readonly text: string;
182
- } | {
183
- readonly type: "image" | "document" | "video" | "audio";
184
- readonly mime_type: string;
181
+ readonly type: "audio" | "document" | "image" | "video";
185
182
  readonly data?: string | undefined;
186
183
  readonly uri?: string | undefined;
184
+ readonly mime_type: string;
185
+ } | {
186
+ readonly type: "text";
187
+ readonly text: string;
187
188
  })[];
188
189
  } | {
189
190
  readonly type: "thought";
191
+ readonly signature?: string | undefined;
190
192
  readonly summary?: readonly {
191
193
  readonly type: "text";
192
194
  readonly text: string;
193
195
  }[] | undefined;
194
- readonly signature?: string | undefined;
195
196
  } | {
196
- readonly id: string;
197
197
  readonly type: "function_call";
198
+ readonly id: string;
198
199
  readonly name: string;
199
200
  readonly arguments: unknown;
200
201
  readonly signature?: string | undefined;
201
202
  } | {
202
203
  readonly type: "function_result";
204
+ readonly call_id: string;
203
205
  readonly name: string;
204
206
  readonly result: unknown;
205
- readonly call_id: string;
206
207
  readonly is_error?: boolean | undefined;
207
208
  })[];
208
- readonly model: string;
209
209
  readonly stream: true;
210
210
  readonly store: boolean;
211
+ readonly previous_interaction_id?: string | undefined;
212
+ readonly system_instruction?: string | undefined;
213
+ readonly service_tier?: string | undefined;
214
+ readonly tools?: readonly {
215
+ readonly type: "function";
216
+ readonly name: string;
217
+ readonly description: string;
218
+ readonly parameters: {
219
+ readonly [x: string]: unknown;
220
+ };
221
+ }[] | undefined;
211
222
  readonly generation_config: {
223
+ readonly max_output_tokens?: number | undefined;
212
224
  readonly temperature?: number | undefined;
225
+ readonly top_p?: number | undefined;
213
226
  readonly seed?: number | undefined;
214
- readonly tool_choice?: "auto" | "none" | "any" | {
227
+ readonly stop_sequences?: readonly string[] | undefined;
228
+ readonly thinking_level?: import("../schema/options.js").OpenString<"high" | "low" | "medium" | "minimal"> | undefined;
229
+ readonly thinking_summaries?: string | undefined;
230
+ readonly tool_choice?: "any" | "auto" | "none" | {
215
231
  readonly allowed_tools: {
216
232
  readonly mode: "any";
217
233
  readonly tools: readonly string[];
218
234
  };
219
235
  } | undefined;
220
- readonly top_p?: number | undefined;
221
- readonly stop_sequences?: readonly string[] | undefined;
222
- readonly max_output_tokens?: number | undefined;
223
- readonly thinking_level?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
224
- readonly thinking_summaries?: string | undefined;
225
236
  };
226
- readonly tools?: readonly {
227
- readonly type: "function";
228
- readonly name: string;
229
- readonly description: string;
230
- readonly parameters: {
231
- readonly [x: string]: unknown;
232
- };
233
- }[] | undefined;
234
- readonly service_tier?: string | undefined;
235
- readonly previous_interaction_id?: string | undefined;
236
- readonly system_instruction?: string | undefined;
237
237
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
238
238
  export * as GoogleInteractions from "./google-interactions.js";