@opencode/ai 2.0.21 → 2.0.23

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 (113) hide show
  1. package/README.md +61 -1
  2. package/dist/cache-policy.js +10 -2
  3. package/dist/llm.d.ts +4 -0
  4. package/dist/promise.d.ts +8 -0
  5. package/dist/protocols/alibaba-chat.d.ts +7 -3
  6. package/dist/protocols/alibaba-chat.js +2 -1
  7. package/dist/protocols/alibaba-responses.d.ts +16 -12
  8. package/dist/protocols/alibaba-responses.js +3 -5
  9. package/dist/protocols/anthropic-messages.js +58 -51
  10. package/dist/protocols/bedrock-converse.js +33 -4
  11. package/dist/protocols/cartesia-speech.js +3 -3
  12. package/dist/protocols/cohere-chat.d.ts +178 -0
  13. package/dist/protocols/cohere-chat.js +299 -0
  14. package/dist/protocols/elevenlabs-speech.js +3 -3
  15. package/dist/protocols/gemini.d.ts +2 -2
  16. package/dist/protocols/gemini.js +3 -3
  17. package/dist/protocols/google-interactions.d.ts +236 -0
  18. package/dist/protocols/google-interactions.js +478 -0
  19. package/dist/protocols/google-speech.js +1 -1
  20. package/dist/protocols/google-transcription.js +1 -1
  21. package/dist/protocols/index.d.ts +2 -0
  22. package/dist/protocols/index.js +2 -0
  23. package/dist/protocols/meta-responses.d.ts +31 -58
  24. package/dist/protocols/meta-responses.js +8 -27
  25. package/dist/protocols/mistral-chat.d.ts +24 -9
  26. package/dist/protocols/mistral-chat.js +22 -10
  27. package/dist/protocols/open-responses.d.ts +410 -91
  28. package/dist/protocols/open-responses.js +25 -15
  29. package/dist/protocols/openai-chat.d.ts +409 -5
  30. package/dist/protocols/openai-chat.js +27 -26
  31. package/dist/protocols/openai-compatible-chat.d.ts +1 -1
  32. package/dist/protocols/openai-compatible-responses.d.ts +16 -4
  33. package/dist/protocols/openai-images.js +2 -2
  34. package/dist/protocols/openai-responses.d.ts +87 -223
  35. package/dist/protocols/openai-responses.js +10 -16
  36. package/dist/protocols/openai-speech.js +1 -1
  37. package/dist/protocols/openai-transcription.js +1 -1
  38. package/dist/protocols/shared.js +2 -2
  39. package/dist/protocols/stability-images.js +1 -1
  40. package/dist/protocols/utils/bedrock-media.js +2 -2
  41. package/dist/protocols/utils/cache.d.ts +5 -0
  42. package/dist/protocols/utils/cache.js +9 -1
  43. package/dist/protocols/utils/responses-checkpoint.js +2 -2
  44. package/dist/protocols/utils/responses-hosted-tools.js +1 -1
  45. package/dist/protocols/utils/tool-stream.d.ts +12 -0
  46. package/dist/protocols/utils/tool-stream.js +15 -7
  47. package/dist/protocols/venice-chat.d.ts +280 -0
  48. package/dist/protocols/venice-chat.js +283 -0
  49. package/dist/protocols/xai-responses.d.ts +18 -21
  50. package/dist/protocols/xai-responses.js +2 -8
  51. package/dist/protocols/zai-chat.d.ts +7 -3
  52. package/dist/protocols/zai-chat.js +6 -3
  53. package/dist/provider-error.js +27 -7
  54. package/dist/providers/alibaba.d.ts +17 -13
  55. package/dist/providers/amazon-bedrock/mantle/messages.d.ts +2 -0
  56. package/dist/providers/amazon-bedrock/mantle/messages.js +1 -0
  57. package/dist/providers/amazon-bedrock-mantle.d.ts +301 -9
  58. package/dist/providers/amazon-bedrock-mantle.js +28 -3
  59. package/dist/providers/azure.d.ts +13 -61
  60. package/dist/providers/baseten.d.ts +2 -2
  61. package/dist/providers/cerebras.d.ts +2 -2
  62. package/dist/providers/cloudflare-ai-gateway.d.ts +14 -62
  63. package/dist/providers/cloudflare-workers-ai.d.ts +2 -2
  64. package/dist/providers/cohere/chat.d.ts +4 -0
  65. package/dist/providers/cohere/chat.js +8 -0
  66. package/dist/providers/cohere.d.ts +395 -0
  67. package/dist/providers/cohere.js +48 -0
  68. package/dist/providers/deepinfra.d.ts +2 -2
  69. package/dist/providers/deepseek.d.ts +2 -2
  70. package/dist/providers/digitalocean.d.ts +469 -0
  71. package/dist/providers/digitalocean.js +53 -0
  72. package/dist/providers/fireworks.d.ts +2 -2
  73. package/dist/providers/google/interactions.d.ts +7 -0
  74. package/dist/providers/google/interactions.js +8 -0
  75. package/dist/providers/google-vertex-chat.d.ts +1 -1
  76. package/dist/providers/google-vertex-messages.js +1 -1
  77. package/dist/providers/google-vertex-responses.d.ts +16 -4
  78. package/dist/providers/google-vertex.d.ts +1 -1
  79. package/dist/providers/google.d.ts +95 -4
  80. package/dist/providers/google.js +8 -1
  81. package/dist/providers/groq.d.ts +8 -4
  82. package/dist/providers/groq.js +1 -1
  83. package/dist/providers/index.d.ts +3 -0
  84. package/dist/providers/index.js +3 -0
  85. package/dist/providers/meta.d.ts +15 -28
  86. package/dist/providers/minimax.d.ts +17 -5
  87. package/dist/providers/mistral.d.ts +10 -4
  88. package/dist/providers/moonshot.d.ts +17 -5
  89. package/dist/providers/openai-compatible-responses.d.ts +16 -4
  90. package/dist/providers/openai-compatible.d.ts +1 -1
  91. package/dist/providers/openai-options.d.ts +1 -1
  92. package/dist/providers/openai.d.ts +7 -31
  93. package/dist/providers/openrouter.d.ts +9 -5
  94. package/dist/providers/openrouter.js +1 -13
  95. package/dist/providers/togetherai.d.ts +2 -2
  96. package/dist/providers/venice.d.ts +183 -0
  97. package/dist/providers/venice.js +38 -0
  98. package/dist/providers/xai.d.ts +1 -1
  99. package/dist/providers/zai-coding-plan.d.ts +17 -5
  100. package/dist/providers/zai.d.ts +1 -1
  101. package/dist/route/client.d.ts +4 -0
  102. package/dist/route/client.js +2 -5
  103. package/dist/route/executor.js +13 -6
  104. package/dist/route/framing.js +23 -23
  105. package/dist/route/transport/http.d.ts +2 -1
  106. package/dist/route/transport/http.js +28 -6
  107. package/dist/schema/events.d.ts +176 -0
  108. package/dist/schema/events.js +4 -0
  109. package/dist/schema/options.d.ts +11 -0
  110. package/dist/schema/options.js +15 -2
  111. package/dist/testing.d.ts +32 -0
  112. package/dist/tool-history.js +17 -3
  113. package/package.json +3 -3
@@ -3,14 +3,16 @@ import type { ProviderAuthOption } from "../route/auth-options.js";
3
3
  import type { ProviderPackage } from "../provider-package.js";
4
4
  import { type ModelID } from "../schema/index.js";
5
5
  import { Gemini } from "../protocols/gemini.js";
6
+ import { GoogleInteractions } from "../protocols/google-interactions.js";
6
7
  export type { GoogleImageOptions } from "../protocols/google-images.js";
7
8
  export type { GoogleSpeechOptions } from "../protocols/google-speech.js";
8
9
  export type { GoogleTranscriptionOptions } from "../protocols/google-transcription.js";
9
10
  export type { GoogleVideoOptions } from "../protocols/google-video.js";
10
11
  export type GeminiOptionsInput = Gemini.OptionsInput;
11
12
  export type GeminiProviderOptionsInput = Gemini.ProviderOptionsInput;
13
+ export type GoogleInteractionsOptionsInput = GoogleInteractions.OptionsInput;
12
14
  export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
13
- export declare const routes: import("../route/client.js").Route<{
15
+ export declare const routes: (import("../route/client.js").Route<{
14
16
  readonly contents: readonly {
15
17
  readonly parts?: readonly ({
16
18
  readonly inlineData: {
@@ -62,7 +64,7 @@ export declare const routes: import("../route/client.js").Route<{
62
64
  readonly serviceTier?: string | undefined;
63
65
  readonly toolConfig?: {
64
66
  readonly functionCallingConfig: {
65
- readonly mode: "AUTO" | "NONE" | "ANY";
67
+ readonly mode: "NONE" | "AUTO" | "ANY";
66
68
  readonly allowedFunctionNames?: readonly string[] | undefined;
67
69
  };
68
70
  } | undefined;
@@ -94,10 +96,71 @@ export declare const routes: import("../route/client.js").Route<{
94
96
  } | undefined;
95
97
  readonly maxOutputTokens?: number | undefined;
96
98
  } | undefined;
97
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
99
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
100
+ readonly input: readonly ({
101
+ readonly type: "user_input" | "model_output";
102
+ readonly content: readonly ({
103
+ readonly type: "text";
104
+ readonly text: string;
105
+ } | {
106
+ readonly type: "image" | "document" | "video" | "audio";
107
+ readonly mime_type: string;
108
+ readonly data?: string | undefined;
109
+ readonly uri?: string | undefined;
110
+ })[];
111
+ } | {
112
+ readonly type: "thought";
113
+ readonly summary?: readonly {
114
+ readonly type: "text";
115
+ readonly text: string;
116
+ }[] | undefined;
117
+ readonly signature?: string | undefined;
118
+ } | {
119
+ readonly id: string;
120
+ readonly type: "function_call";
121
+ readonly name: string;
122
+ readonly arguments: unknown;
123
+ readonly signature?: string | undefined;
124
+ } | {
125
+ readonly type: "function_result";
126
+ readonly name: string;
127
+ readonly result: unknown;
128
+ readonly call_id: string;
129
+ readonly is_error?: boolean | undefined;
130
+ })[];
131
+ readonly model: string;
132
+ readonly stream: true;
133
+ readonly store: boolean;
134
+ readonly generation_config: {
135
+ readonly temperature?: number | undefined;
136
+ readonly seed?: number | undefined;
137
+ readonly tool_choice?: "auto" | "none" | "any" | {
138
+ readonly allowed_tools: {
139
+ readonly mode: "any";
140
+ readonly tools: readonly string[];
141
+ };
142
+ } | undefined;
143
+ readonly top_p?: number | undefined;
144
+ readonly stop_sequences?: readonly string[] | undefined;
145
+ readonly max_output_tokens?: number | undefined;
146
+ readonly thinking_level?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
147
+ readonly thinking_summaries?: string | undefined;
148
+ };
149
+ readonly tools?: readonly {
150
+ readonly type: "function";
151
+ readonly name: string;
152
+ readonly description: string;
153
+ readonly parameters: {
154
+ readonly [x: string]: unknown;
155
+ };
156
+ }[] | undefined;
157
+ readonly service_tier?: string | undefined;
158
+ readonly previous_interaction_id?: string | undefined;
159
+ readonly system_instruction?: string | undefined;
160
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
98
161
  export type Config = RouteDefaultsInput & ProviderAuthOption<"optional"> & {
99
162
  readonly baseURL?: string;
100
- readonly providerOptions?: Gemini.ProviderOptionsInput;
163
+ readonly providerOptions?: Gemini.ProviderOptionsInput & GoogleInteractions.ProviderOptionsInput;
101
164
  };
102
165
  export type Settings = ProviderPackage.Settings & Gemini.ProviderOptionsInput & {
103
166
  readonly apiKey?: string;
@@ -106,6 +169,13 @@ export type Settings = ProviderPackage.Settings & Gemini.ProviderOptionsInput &
106
169
  export declare const configure: (input?: Config) => {
107
170
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
108
171
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
172
+ interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
173
+ readonly serviceTier?: import("../schema/options.js").OpenString<"standard" | "flex" | "priority"> | undefined;
174
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
175
+ readonly previousInteractionId?: string | undefined;
176
+ readonly store?: boolean | undefined;
177
+ readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
178
+ }, import("../route/client.js").CompactionOperations | undefined>;
109
179
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
110
180
  video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
111
181
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
@@ -115,6 +185,13 @@ export declare const configure: (input?: Config) => {
115
185
  export declare const provider: {
116
186
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
117
187
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
188
+ interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
189
+ readonly serviceTier?: import("../schema/options.js").OpenString<"standard" | "flex" | "priority"> | undefined;
190
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
191
+ readonly previousInteractionId?: string | undefined;
192
+ readonly store?: boolean | undefined;
193
+ readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
194
+ }, import("../route/client.js").CompactionOperations | undefined>;
118
195
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
119
196
  video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
120
197
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
@@ -122,6 +199,13 @@ export declare const provider: {
122
199
  configure: (input?: Config) => {
123
200
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
124
201
  model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
202
+ interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
203
+ readonly serviceTier?: import("../schema/options.js").OpenString<"standard" | "flex" | "priority"> | undefined;
204
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
205
+ readonly previousInteractionId?: string | undefined;
206
+ readonly store?: boolean | undefined;
207
+ readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
208
+ }, import("../route/client.js").CompactionOperations | undefined>;
125
209
  image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
126
210
  video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
127
211
  speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
@@ -131,6 +215,13 @@ export declare const provider: {
131
215
  };
132
216
  export declare const model: ProviderPackage.Definition<Settings, Gemini.ProviderOptionsInput>["model"];
133
217
  export declare const image: (modelID: string | ModelID) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
218
+ export declare const interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
219
+ readonly serviceTier?: import("../schema/options.js").OpenString<"standard" | "flex" | "priority"> | undefined;
220
+ readonly thinkingLevel?: import("../schema/options.js").OpenString<"minimal" | "low" | "medium" | "high"> | undefined;
221
+ readonly previousInteractionId?: string | undefined;
222
+ readonly store?: boolean | undefined;
223
+ readonly thinkingSummaries?: import("../schema/options.js").OpenString<"auto" | "none"> | undefined;
224
+ }, import("../route/client.js").CompactionOperations | undefined>;
134
225
  export declare const video: (modelID: string | ModelID) => import("../video.js").VideoModel<import("../protocols/google-video.js").GoogleVideoOptions>;
135
226
  export declare const speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
136
227
  export declare const transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
@@ -2,12 +2,13 @@ import { Auth } from "../route/auth.js";
2
2
  import { MediaRoute } from "../route/media.js";
3
3
  import { ProviderID } from "../schema/index.js";
4
4
  import { Gemini } from "../protocols/gemini.js";
5
+ import { GoogleInteractions } from "../protocols/google-interactions.js";
5
6
  import { GoogleImages } from "../protocols/google-images.js";
6
7
  import { GoogleSpeech } from "../protocols/google-speech.js";
7
8
  import { GoogleTranscription } from "../protocols/google-transcription.js";
8
9
  import { GoogleVideo } from "../protocols/google-video.js";
9
10
  export const id = ProviderID.make("google");
10
- export const routes = [Gemini.route];
11
+ export const routes = [Gemini.route, GoogleInteractions.route];
11
12
  const auth = (options) => {
12
13
  if ("auth" in options && options.auth)
13
14
  return options.auth;
@@ -19,12 +20,17 @@ const configuredRoute = (input) => {
19
20
  const { apiKey: _, auth: _auth, baseURL, ...rest } = input;
20
21
  return Gemini.route.with({ ...rest, endpoint: { baseURL }, auth: auth(input) });
21
22
  };
23
+ const interactionsRoute = (input) => {
24
+ const { apiKey: _, auth: _auth, baseURL, ...rest } = input;
25
+ return GoogleInteractions.route.with({ ...rest, endpoint: { baseURL }, auth: auth(input) });
26
+ };
22
27
  export const configure = (input = {}) => {
23
28
  const route = configuredRoute(input);
24
29
  const media = MediaRoute.deployment(input, auth(input));
25
30
  return {
26
31
  id,
27
32
  model: (modelID) => route.model({ id: modelID }),
33
+ interactions: (modelID) => interactionsRoute(input).model({ id: modelID }),
28
34
  image: (modelID) => GoogleImages.model({ ...media, id: modelID }),
29
35
  video: (modelID) => GoogleVideo.model({ ...media, id: modelID }),
30
36
  speech: (modelID) => GoogleSpeech.model({ ...media, id: modelID }),
@@ -41,6 +47,7 @@ export const model = (modelID, { apiKey, baseURL, body, headers, ...providerOpti
41
47
  providerOptions,
42
48
  }).model(modelID);
43
49
  export const image = provider.image;
50
+ export const interactions = provider.interactions;
44
51
  export const video = provider.video;
45
52
  export const speech = provider.speech;
46
53
  export const transcription = provider.transcription;
@@ -137,10 +137,10 @@ export declare const protocol: Protocol<{
137
137
  readonly top_p?: number | undefined;
138
138
  readonly frequency_penalty?: number | undefined;
139
139
  readonly presence_penalty?: number | undefined;
140
+ readonly store?: boolean | undefined;
140
141
  readonly prompt_cache_key?: string | undefined;
141
142
  readonly parallel_tool_calls?: boolean | undefined;
142
143
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
143
- readonly store?: boolean | undefined;
144
144
  readonly stream_options?: {
145
145
  readonly include_usage: boolean;
146
146
  } | undefined;
@@ -156,16 +156,18 @@ export declare const protocol: Protocol<{
156
156
  } | null | undefined;
157
157
  readonly usage?: {
158
158
  readonly [x: string]: unknown;
159
+ readonly cache_read_input_tokens?: number | null | undefined;
159
160
  readonly cached_tokens?: number | null | undefined;
161
+ readonly total_tokens?: number | null | undefined;
160
162
  readonly prompt_tokens?: number | null | undefined;
161
163
  readonly completion_tokens?: number | null | undefined;
162
- readonly total_tokens?: number | null | undefined;
163
164
  readonly prompt_tokens_details?: {
164
165
  readonly [x: string]: unknown;
165
166
  readonly cached_tokens?: number | null | undefined;
166
167
  readonly cache_write_tokens?: number | null | undefined;
167
168
  } | null | undefined;
168
169
  readonly prompt_cache_hit_tokens?: number | null | undefined;
170
+ readonly cache_created_input_tokens?: number | null | undefined;
169
171
  readonly completion_tokens_details?: {
170
172
  readonly [x: string]: unknown;
171
173
  readonly reasoning_tokens?: number | null | undefined;
@@ -195,16 +197,18 @@ export declare const protocol: Protocol<{
195
197
  } | null | undefined;
196
198
  readonly usage?: {
197
199
  readonly [x: string]: unknown;
200
+ readonly cache_read_input_tokens?: number | null | undefined;
198
201
  readonly cached_tokens?: number | null | undefined;
202
+ readonly total_tokens?: number | null | undefined;
199
203
  readonly prompt_tokens?: number | null | undefined;
200
204
  readonly completion_tokens?: number | null | undefined;
201
- readonly total_tokens?: number | null | undefined;
202
205
  readonly prompt_tokens_details?: {
203
206
  readonly [x: string]: unknown;
204
207
  readonly cached_tokens?: number | null | undefined;
205
208
  readonly cache_write_tokens?: number | null | undefined;
206
209
  } | null | undefined;
207
210
  readonly prompt_cache_hit_tokens?: number | null | undefined;
211
+ readonly cache_created_input_tokens?: number | null | undefined;
208
212
  readonly completion_tokens_details?: {
209
213
  readonly [x: string]: unknown;
210
214
  readonly reasoning_tokens?: number | null | undefined;
@@ -332,10 +336,10 @@ export declare const route: Route<{
332
336
  readonly top_p?: number | undefined;
333
337
  readonly frequency_penalty?: number | undefined;
334
338
  readonly presence_penalty?: number | undefined;
339
+ readonly store?: boolean | undefined;
335
340
  readonly prompt_cache_key?: string | undefined;
336
341
  readonly parallel_tool_calls?: boolean | undefined;
337
342
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
338
- readonly store?: boolean | undefined;
339
343
  readonly stream_options?: {
340
344
  readonly include_usage: boolean;
341
345
  } | undefined;
@@ -43,7 +43,7 @@ export const protocol = Protocol.make({
43
43
  export const route = Route.make({
44
44
  id: "groq-chat",
45
45
  provider: id,
46
- providerMetadataKey: "openai",
46
+ providerMetadataKey: "groq",
47
47
  protocol,
48
48
  endpoint: Endpoint.path("/chat/completions", { baseURL }),
49
49
  framing: OpenAIChat.framing,
@@ -9,11 +9,13 @@ export * as Baseten from "./baseten.js";
9
9
  export * as BlackForestLabs from "./black-forest-labs.js";
10
10
  export * as Cartesia from "./cartesia.js";
11
11
  export * as Cerebras from "./cerebras.js";
12
+ export * as Cohere from "./cohere.js";
12
13
  export * as CloudflareAIGateway from "./cloudflare-ai-gateway.js";
13
14
  export * as CloudflareWorkersAI from "./cloudflare-workers-ai.js";
14
15
  export * as DeepInfra from "./deepinfra.js";
15
16
  export * as Deepgram from "./deepgram.js";
16
17
  export * as DeepSeek from "./deepseek.js";
18
+ export * as DigitalOcean from "./digitalocean.js";
17
19
  export * as ElevenLabs from "./elevenlabs.js";
18
20
  export * as Fal from "./fal.js";
19
21
  export * as Fireworks from "./fireworks.js";
@@ -38,6 +40,7 @@ export * as Stability from "./stability.js";
38
40
  export * as TogetherAI from "./togetherai.js";
39
41
  export * as TypeSafeAI from "./typesafe-ai.js";
40
42
  export * as VercelAIGateway from "./vercel-ai-gateway.js";
43
+ export * as Venice from "./venice.js";
41
44
  export * as XAI from "./xai.js";
42
45
  export * as ZAI from "./zai.js";
43
46
  export * as ZAICodingPlan from "./zai-coding-plan.js";
@@ -9,11 +9,13 @@ export * as Baseten from "./baseten.js";
9
9
  export * as BlackForestLabs from "./black-forest-labs.js";
10
10
  export * as Cartesia from "./cartesia.js";
11
11
  export * as Cerebras from "./cerebras.js";
12
+ export * as Cohere from "./cohere.js";
12
13
  export * as CloudflareAIGateway from "./cloudflare-ai-gateway.js";
13
14
  export * as CloudflareWorkersAI from "./cloudflare-workers-ai.js";
14
15
  export * as DeepInfra from "./deepinfra.js";
15
16
  export * as Deepgram from "./deepgram.js";
16
17
  export * as DeepSeek from "./deepseek.js";
18
+ export * as DigitalOcean from "./digitalocean.js";
17
19
  export * as ElevenLabs from "./elevenlabs.js";
18
20
  export * as Fal from "./fal.js";
19
21
  export * as Fireworks from "./fireworks.js";
@@ -38,6 +40,7 @@ export * as Stability from "./stability.js";
38
40
  export * as TogetherAI from "./togetherai.js";
39
41
  export * as TypeSafeAI from "./typesafe-ai.js";
40
42
  export * as VercelAIGateway from "./vercel-ai-gateway.js";
43
+ export * as Venice from "./venice.js";
41
44
  export * as XAI from "./xai.js";
42
45
  export * as ZAI from "./zai.js";
43
46
  export * as ZAICodingPlan from "./zai-coding-plan.js";
@@ -152,9 +152,9 @@ export declare const routes: (Route<{
152
152
  readonly top_p?: number | undefined;
153
153
  readonly frequency_penalty?: number | undefined;
154
154
  readonly presence_penalty?: number | undefined;
155
+ readonly store?: boolean | undefined;
155
156
  readonly prompt_cache_key?: string | undefined;
156
157
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
157
- readonly store?: boolean | undefined;
158
158
  readonly stream_options?: {
159
159
  readonly include_usage: boolean;
160
160
  } | undefined;
@@ -197,6 +197,15 @@ export declare const routes: (Route<{
197
197
  readonly error?: unknown;
198
198
  readonly arguments?: string | undefined;
199
199
  readonly server_label?: string | undefined;
200
+ } | {
201
+ readonly type: "configuration_update";
202
+ readonly reasoning: {
203
+ readonly effort: import("../schema/options.js").ReasoningEffort;
204
+ };
205
+ } | {
206
+ readonly [x: string]: unknown;
207
+ readonly type: string;
208
+ readonly id: string;
200
209
  } | {
201
210
  readonly type: "reasoning";
202
211
  readonly summary: readonly {
@@ -273,13 +282,6 @@ export declare const routes: (Route<{
273
282
  readonly type: "input_video";
274
283
  readonly video_url: string;
275
284
  })[];
276
- } | {
277
- readonly id: string;
278
- readonly type: "image_generation_call";
279
- readonly status?: string | undefined;
280
- readonly error?: unknown;
281
- readonly result?: string | null | undefined;
282
- readonly output_format?: string | undefined;
283
285
  })[];
284
286
  readonly model: string;
285
287
  readonly stream: true;
@@ -292,6 +294,9 @@ export declare const routes: (Route<{
292
294
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
293
295
  } | undefined;
294
296
  readonly tools?: readonly ({
297
+ readonly [x: string]: unknown;
298
+ readonly type: string;
299
+ } | {
295
300
  readonly type: "function";
296
301
  readonly description: string;
297
302
  readonly name: string;
@@ -299,24 +304,6 @@ export declare const routes: (Route<{
299
304
  readonly [x: string]: unknown;
300
305
  };
301
306
  readonly strict?: boolean | undefined;
302
- } | {
303
- readonly type: "web_search";
304
- readonly search_context_size?: string | undefined;
305
- readonly user_location?: {
306
- readonly type: "approximate";
307
- readonly region?: string | undefined;
308
- readonly city?: string | undefined;
309
- readonly country?: string | undefined;
310
- readonly timezone?: string | undefined;
311
- } | undefined;
312
- } | {
313
- readonly type: "image_generation";
314
- readonly size?: string | undefined;
315
- readonly output_format?: string | undefined;
316
- readonly reasoning_strength?: string | undefined;
317
- readonly enable_image_search?: boolean | undefined;
318
- readonly enable_web_search?: boolean | undefined;
319
- readonly enable_shell?: boolean | undefined;
320
307
  })[] | undefined;
321
308
  readonly text?: {
322
309
  readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
@@ -337,9 +324,10 @@ export declare const routes: (Route<{
337
324
  readonly top_p?: number | undefined;
338
325
  readonly frequency_penalty?: number | undefined;
339
326
  readonly presence_penalty?: number | undefined;
327
+ readonly store?: boolean | undefined;
328
+ readonly max_output_tokens?: number | undefined;
340
329
  readonly prompt_cache_key?: string | undefined;
341
330
  readonly parallel_tool_calls?: boolean | undefined;
342
- readonly store?: boolean | undefined;
343
331
  readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
344
332
  readonly truncation?: "auto" | "disabled" | undefined;
345
333
  readonly stream_options?: {
@@ -347,7 +335,6 @@ export declare const routes: (Route<{
347
335
  } | undefined;
348
336
  readonly safety_identifier?: string | undefined;
349
337
  readonly top_logprobs?: number | undefined;
350
- readonly max_output_tokens?: number | undefined;
351
338
  readonly max_tool_calls?: number | undefined;
352
339
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
353
340
  readonly max_tokens: number;
@@ -343,6 +343,15 @@ export declare const routes: (Route<{
343
343
  readonly error?: unknown;
344
344
  readonly arguments?: string | undefined;
345
345
  readonly server_label?: string | undefined;
346
+ } | {
347
+ readonly type: "configuration_update";
348
+ readonly reasoning: {
349
+ readonly effort: import("../schema/options.js").ReasoningEffort;
350
+ };
351
+ } | {
352
+ readonly [x: string]: unknown;
353
+ readonly type: string;
354
+ readonly id: string;
346
355
  } | {
347
356
  readonly type: "reasoning";
348
357
  readonly summary: readonly {
@@ -430,7 +439,10 @@ export declare const routes: (Route<{
430
439
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
431
440
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
432
441
  } | undefined;
433
- readonly tools?: readonly {
442
+ readonly tools?: readonly ({
443
+ readonly [x: string]: unknown;
444
+ readonly type: string;
445
+ } | {
434
446
  readonly type: "function";
435
447
  readonly description: string;
436
448
  readonly name: string;
@@ -438,7 +450,7 @@ export declare const routes: (Route<{
438
450
  readonly [x: string]: unknown;
439
451
  };
440
452
  readonly strict?: boolean | undefined;
441
- }[] | undefined;
453
+ })[] | undefined;
442
454
  readonly text?: {
443
455
  readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
444
456
  } | undefined;
@@ -458,9 +470,10 @@ export declare const routes: (Route<{
458
470
  readonly top_p?: number | undefined;
459
471
  readonly frequency_penalty?: number | undefined;
460
472
  readonly presence_penalty?: number | undefined;
473
+ readonly store?: boolean | undefined;
474
+ readonly max_output_tokens?: number | undefined;
461
475
  readonly prompt_cache_key?: string | undefined;
462
476
  readonly parallel_tool_calls?: boolean | undefined;
463
- readonly store?: boolean | undefined;
464
477
  readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
465
478
  readonly truncation?: "auto" | "disabled" | undefined;
466
479
  readonly stream_options?: {
@@ -468,7 +481,6 @@ export declare const routes: (Route<{
468
481
  } | undefined;
469
482
  readonly safety_identifier?: string | undefined;
470
483
  readonly top_logprobs?: number | undefined;
471
- readonly max_output_tokens?: number | undefined;
472
484
  readonly max_tool_calls?: number | undefined;
473
485
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
474
486
  readonly model: string;
@@ -588,9 +600,9 @@ export declare const routes: (Route<{
588
600
  readonly top_p?: number | undefined;
589
601
  readonly frequency_penalty?: number | undefined;
590
602
  readonly presence_penalty?: number | undefined;
603
+ readonly store?: boolean | undefined;
591
604
  readonly prompt_cache_key?: string | undefined;
592
605
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
593
- readonly store?: boolean | undefined;
594
606
  readonly stream_options?: {
595
607
  readonly include_usage: boolean;
596
608
  } | undefined;
@@ -17,7 +17,10 @@ export declare const route: import("../route/client.js").Route<{
17
17
  readonly model: string;
18
18
  readonly messages: readonly ({
19
19
  readonly role: "system";
20
- readonly content: string;
20
+ readonly content: string | readonly {
21
+ readonly type: "text";
22
+ readonly text: string;
23
+ }[];
21
24
  } | {
22
25
  readonly role: "user";
23
26
  readonly content: string | readonly ({
@@ -90,9 +93,9 @@ export declare const route: import("../route/client.js").Route<{
90
93
  };
91
94
  } | undefined;
92
95
  readonly top_p?: number | undefined;
93
- readonly random_seed?: number | undefined;
94
96
  readonly frequency_penalty?: number | undefined;
95
97
  readonly presence_penalty?: number | undefined;
98
+ readonly random_seed?: number | undefined;
96
99
  readonly prompt_cache_key?: string | undefined;
97
100
  readonly safe_prompt?: boolean | undefined;
98
101
  readonly document_image_limit?: number | undefined;
@@ -105,7 +108,10 @@ export declare const routes: import("../route/client.js").Route<{
105
108
  readonly model: string;
106
109
  readonly messages: readonly ({
107
110
  readonly role: "system";
108
- readonly content: string;
111
+ readonly content: string | readonly {
112
+ readonly type: "text";
113
+ readonly text: string;
114
+ }[];
109
115
  } | {
110
116
  readonly role: "user";
111
117
  readonly content: string | readonly ({
@@ -178,9 +184,9 @@ export declare const routes: import("../route/client.js").Route<{
178
184
  };
179
185
  } | undefined;
180
186
  readonly top_p?: number | undefined;
181
- readonly random_seed?: number | undefined;
182
187
  readonly frequency_penalty?: number | undefined;
183
188
  readonly presence_penalty?: number | undefined;
189
+ readonly random_seed?: number | undefined;
184
190
  readonly prompt_cache_key?: string | undefined;
185
191
  readonly safe_prompt?: boolean | undefined;
186
192
  readonly document_image_limit?: number | undefined;
@@ -341,6 +341,15 @@ export declare const routes: (Route<{
341
341
  readonly error?: unknown;
342
342
  readonly arguments?: string | undefined;
343
343
  readonly server_label?: string | undefined;
344
+ } | {
345
+ readonly type: "configuration_update";
346
+ readonly reasoning: {
347
+ readonly effort: import("../schema/options.js").ReasoningEffort;
348
+ };
349
+ } | {
350
+ readonly [x: string]: unknown;
351
+ readonly type: string;
352
+ readonly id: string;
344
353
  } | {
345
354
  readonly type: "reasoning";
346
355
  readonly summary: readonly {
@@ -428,7 +437,10 @@ export declare const routes: (Route<{
428
437
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
429
438
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
430
439
  } | undefined;
431
- readonly tools?: readonly {
440
+ readonly tools?: readonly ({
441
+ readonly [x: string]: unknown;
442
+ readonly type: string;
443
+ } | {
432
444
  readonly type: "function";
433
445
  readonly description: string;
434
446
  readonly name: string;
@@ -436,7 +448,7 @@ export declare const routes: (Route<{
436
448
  readonly [x: string]: unknown;
437
449
  };
438
450
  readonly strict?: boolean | undefined;
439
- }[] | undefined;
451
+ })[] | undefined;
440
452
  readonly text?: {
441
453
  readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
442
454
  } | undefined;
@@ -456,9 +468,10 @@ export declare const routes: (Route<{
456
468
  readonly top_p?: number | undefined;
457
469
  readonly frequency_penalty?: number | undefined;
458
470
  readonly presence_penalty?: number | undefined;
471
+ readonly store?: boolean | undefined;
472
+ readonly max_output_tokens?: number | undefined;
459
473
  readonly prompt_cache_key?: string | undefined;
460
474
  readonly parallel_tool_calls?: boolean | undefined;
461
- readonly store?: boolean | undefined;
462
475
  readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
463
476
  readonly truncation?: "auto" | "disabled" | undefined;
464
477
  readonly stream_options?: {
@@ -466,7 +479,6 @@ export declare const routes: (Route<{
466
479
  } | undefined;
467
480
  readonly safety_identifier?: string | undefined;
468
481
  readonly top_logprobs?: number | undefined;
469
- readonly max_output_tokens?: number | undefined;
470
482
  readonly max_tool_calls?: number | undefined;
471
483
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
472
484
  readonly model: string;
@@ -586,9 +598,9 @@ export declare const routes: (Route<{
586
598
  readonly top_p?: number | undefined;
587
599
  readonly frequency_penalty?: number | undefined;
588
600
  readonly presence_penalty?: number | undefined;
601
+ readonly store?: boolean | undefined;
589
602
  readonly prompt_cache_key?: string | undefined;
590
603
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
591
- readonly store?: boolean | undefined;
592
604
  readonly stream_options?: {
593
605
  readonly include_usage: boolean;
594
606
  } | undefined;
@@ -53,6 +53,15 @@ export declare const routes: import("../route/client.js").Route<{
53
53
  readonly error?: unknown;
54
54
  readonly arguments?: string | undefined;
55
55
  readonly server_label?: string | undefined;
56
+ } | {
57
+ readonly type: "configuration_update";
58
+ readonly reasoning: {
59
+ readonly effort: import("../schema/options.js").ReasoningEffort;
60
+ };
61
+ } | {
62
+ readonly [x: string]: unknown;
63
+ readonly type: string;
64
+ readonly id: string;
56
65
  } | {
57
66
  readonly type: "reasoning";
58
67
  readonly summary: readonly {
@@ -140,7 +149,10 @@ export declare const routes: import("../route/client.js").Route<{
140
149
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
141
150
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
142
151
  } | undefined;
143
- readonly tools?: readonly {
152
+ readonly tools?: readonly ({
153
+ readonly [x: string]: unknown;
154
+ readonly type: string;
155
+ } | {
144
156
  readonly type: "function";
145
157
  readonly description: string;
146
158
  readonly name: string;
@@ -148,7 +160,7 @@ export declare const routes: import("../route/client.js").Route<{
148
160
  readonly [x: string]: unknown;
149
161
  };
150
162
  readonly strict?: boolean | undefined;
151
- }[] | undefined;
163
+ })[] | undefined;
152
164
  readonly text?: {
153
165
  readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
154
166
  } | undefined;
@@ -168,9 +180,10 @@ export declare const routes: import("../route/client.js").Route<{
168
180
  readonly top_p?: number | undefined;
169
181
  readonly frequency_penalty?: number | undefined;
170
182
  readonly presence_penalty?: number | undefined;
183
+ readonly store?: boolean | undefined;
184
+ readonly max_output_tokens?: number | undefined;
171
185
  readonly prompt_cache_key?: string | undefined;
172
186
  readonly parallel_tool_calls?: boolean | undefined;
173
- readonly store?: boolean | undefined;
174
187
  readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
175
188
  readonly truncation?: "auto" | "disabled" | undefined;
176
189
  readonly stream_options?: {
@@ -178,7 +191,6 @@ export declare const routes: import("../route/client.js").Route<{
178
191
  } | undefined;
179
192
  readonly safety_identifier?: string | undefined;
180
193
  readonly top_logprobs?: number | undefined;
181
- readonly max_output_tokens?: number | undefined;
182
194
  readonly max_tool_calls?: number | undefined;
183
195
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
184
196
  export declare const configure: (input: Config) => {
@@ -128,9 +128,9 @@ export declare const routes: import("../route/client.js").Route<{
128
128
  readonly top_p?: number | undefined;
129
129
  readonly frequency_penalty?: number | undefined;
130
130
  readonly presence_penalty?: number | undefined;
131
+ readonly store?: boolean | undefined;
131
132
  readonly prompt_cache_key?: string | undefined;
132
133
  readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
133
- readonly store?: boolean | undefined;
134
134
  readonly stream_options?: {
135
135
  readonly include_usage: boolean;
136
136
  } | undefined;