@openrouter/sdk 0.2.6 → 0.2.11

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.
@@ -45,8 +45,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
45
45
  export declare const SDK_METADATA: {
46
46
  readonly language: "typescript";
47
47
  readonly openapiDocVersion: "1.0.0";
48
- readonly sdkVersion: "0.2.6";
48
+ readonly sdkVersion: "0.2.11";
49
49
  readonly genVersion: "2.768.0";
50
- readonly userAgent: "speakeasy-sdk/typescript 0.2.6 2.768.0 1.0.0 @openrouter/sdk";
50
+ readonly userAgent: "speakeasy-sdk/typescript 0.2.11 2.768.0 1.0.0 @openrouter/sdk";
51
51
  };
52
52
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
25
25
  export const SDK_METADATA = {
26
26
  language: "typescript",
27
27
  openapiDocVersion: "1.0.0",
28
- sdkVersion: "0.2.6",
28
+ sdkVersion: "0.2.11",
29
29
  genVersion: "2.768.0",
30
- userAgent: "speakeasy-sdk/typescript 0.2.6 2.768.0 1.0.0 @openrouter/sdk",
30
+ userAgent: "speakeasy-sdk/typescript 0.2.11 2.768.0 1.0.0 @openrouter/sdk",
31
31
  };
32
32
  //# sourceMappingURL=config.js.map
@@ -34,6 +34,10 @@ export declare class ResponseWrapper {
34
34
  private preliminaryResults;
35
35
  private allToolExecutionRounds;
36
36
  constructor(options: GetResponseOptions);
37
+ /**
38
+ * Type guard to check if a value is a non-streaming response
39
+ */
40
+ private isNonStreamingResponse;
37
41
  /**
38
42
  * Initialize the stream if not already started
39
43
  * This is idempotent - multiple calls will return the same promise
@@ -44,6 +48,14 @@ export declare class ResponseWrapper {
44
48
  * This is idempotent - multiple calls will return the same promise
45
49
  */
46
50
  private executeToolsIfNeeded;
51
+ /**
52
+ * Internal helper to get the message after tool execution
53
+ */
54
+ private getMessageInternal;
55
+ /**
56
+ * Internal helper to get the text after tool execution
57
+ */
58
+ private getTextInternal;
47
59
  /**
48
60
  * Get the completed message from the response.
49
61
  * This will consume the stream until completion, execute any tools, and extract the first message.
@@ -29,6 +29,17 @@ export class ResponseWrapper {
29
29
  this.allToolExecutionRounds = [];
30
30
  this.options = options;
31
31
  }
32
+ /**
33
+ * Type guard to check if a value is a non-streaming response
34
+ */
35
+ isNonStreamingResponse(value) {
36
+ return (value !== null &&
37
+ typeof value === "object" &&
38
+ "id" in value &&
39
+ "object" in value &&
40
+ "output" in value &&
41
+ !("toReadableStream" in value));
42
+ }
32
43
  /**
33
44
  * Initialize the stream if not already started
34
45
  * This is idempotent - multiple calls will return the same promise
@@ -201,15 +212,46 @@ export class ResponseWrapper {
201
212
  const stream = new ReusableReadableStream(value);
202
213
  currentResponse = await consumeStreamForCompletion(stream);
203
214
  }
204
- else {
215
+ else if (this.isNonStreamingResponse(value)) {
205
216
  currentResponse = value;
206
217
  }
218
+ else {
219
+ throw new Error("Unexpected response type from API");
220
+ }
207
221
  currentRound++;
208
222
  }
223
+ // Validate the final response has required fields
224
+ if (!currentResponse || !currentResponse.id || !currentResponse.output) {
225
+ throw new Error("Invalid final response: missing required fields");
226
+ }
227
+ // Ensure the response is in a completed state (has output content)
228
+ if (!Array.isArray(currentResponse.output) || currentResponse.output.length === 0) {
229
+ throw new Error("Invalid final response: empty or invalid output");
230
+ }
209
231
  this.finalResponse = currentResponse;
210
232
  })();
211
233
  return this.toolExecutionPromise;
212
234
  }
235
+ /**
236
+ * Internal helper to get the message after tool execution
237
+ */
238
+ async getMessageInternal() {
239
+ await this.executeToolsIfNeeded();
240
+ if (!this.finalResponse) {
241
+ throw new Error("Response not available");
242
+ }
243
+ return extractMessageFromResponse(this.finalResponse);
244
+ }
245
+ /**
246
+ * Internal helper to get the text after tool execution
247
+ */
248
+ async getTextInternal() {
249
+ await this.executeToolsIfNeeded();
250
+ if (!this.finalResponse) {
251
+ throw new Error("Response not available");
252
+ }
253
+ return extractTextFromResponse(this.finalResponse);
254
+ }
213
255
  /**
214
256
  * Get the completed message from the response.
215
257
  * This will consume the stream until completion, execute any tools, and extract the first message.
@@ -219,13 +261,7 @@ export class ResponseWrapper {
219
261
  if (this.messagePromise) {
220
262
  return this.messagePromise;
221
263
  }
222
- this.messagePromise = (async () => {
223
- await this.executeToolsIfNeeded();
224
- if (!this.finalResponse) {
225
- throw new Error('Response not available');
226
- }
227
- return extractMessageFromResponse(this.finalResponse);
228
- })();
264
+ this.messagePromise = this.getMessageInternal();
229
265
  return this.messagePromise;
230
266
  }
231
267
  /**
@@ -236,13 +272,7 @@ export class ResponseWrapper {
236
272
  if (this.textPromise) {
237
273
  return this.textPromise;
238
274
  }
239
- this.textPromise = (async () => {
240
- await this.executeToolsIfNeeded();
241
- if (!this.finalResponse) {
242
- throw new Error('Response not available');
243
- }
244
- return extractTextFromResponse(this.finalResponse);
245
- })();
275
+ this.textPromise = this.getTextInternal();
246
276
  return this.textPromise;
247
277
  }
248
278
  /**
@@ -40,23 +40,21 @@ export async function executeToolLoop(sendRequest, initialInput, tools, apiTools
40
40
  if (!hasExecutableTools) {
41
41
  break;
42
42
  }
43
- // Execute all tool calls
44
- const roundResults = [];
45
- for (const toolCall of toolCalls) {
43
+ // Execute all tool calls in parallel (parallel tool calling)
44
+ const toolCallPromises = toolCalls.map(async (toolCall) => {
46
45
  const tool = findToolByName(tools, toolCall.name);
47
46
  if (!tool) {
48
47
  // Tool not found in definitions
49
- roundResults.push({
48
+ return {
50
49
  toolCallId: toolCall.id,
51
50
  toolName: toolCall.name,
52
51
  result: null,
53
52
  error: new Error(`Tool "${toolCall.name}" not found in tool definitions`),
54
- });
55
- continue;
53
+ };
56
54
  }
57
55
  if (!hasExecuteFunction(tool)) {
58
- // Tool has no execute function - skip
59
- continue;
56
+ // Tool has no execute function - return null to filter out
57
+ return null;
60
58
  }
61
59
  // Build turn context
62
60
  const turnContext = {
@@ -64,9 +62,33 @@ export async function executeToolLoop(sendRequest, initialInput, tools, apiTools
64
62
  messageHistory: conversationInput,
65
63
  };
66
64
  // Execute the tool
67
- const result = await executeTool(tool, toolCall, turnContext, onPreliminaryResult);
68
- roundResults.push(result);
69
- }
65
+ return executeTool(tool, toolCall, turnContext, onPreliminaryResult);
66
+ });
67
+ // Wait for all tool executions to complete in parallel
68
+ const settledResults = await Promise.allSettled(toolCallPromises);
69
+ // Process settled results, handling both fulfilled and rejected promises
70
+ const roundResults = [];
71
+ settledResults.forEach((settled, i) => {
72
+ const toolCall = toolCalls[i];
73
+ if (!toolCall)
74
+ return;
75
+ if (settled.status === "fulfilled") {
76
+ if (settled.value !== null) {
77
+ roundResults.push(settled.value);
78
+ }
79
+ }
80
+ else {
81
+ // Promise rejected - create error result
82
+ roundResults.push({
83
+ toolCallId: toolCall.id,
84
+ toolName: toolCall.name,
85
+ result: null,
86
+ error: settled.reason instanceof Error
87
+ ? settled.reason
88
+ : new Error(String(settled.reason)),
89
+ });
90
+ }
91
+ });
70
92
  toolExecutionResults.push(...roundResults);
71
93
  // Build array input with all output from previous response plus tool results
72
94
  // The API expects continuation via previousResponseId, not by including outputs
@@ -5,13 +5,145 @@ import { Message, Message$Outbound } from "./message.js";
5
5
  import { ReasoningSummaryVerbosity } from "./reasoningsummaryverbosity.js";
6
6
  import { ResponseFormatJSONSchema, ResponseFormatJSONSchema$Outbound } from "./responseformatjsonschema.js";
7
7
  import { ResponseFormatTextGrammar, ResponseFormatTextGrammar$Outbound } from "./responseformattextgrammar.js";
8
+ import { Schema0, Schema0$Outbound } from "./schema0.js";
8
9
  import { ToolDefinitionJson, ToolDefinitionJson$Outbound } from "./tooldefinitionjson.js";
10
+ export declare const ChatGenerationParamsDataCollection: {
11
+ readonly Deny: "deny";
12
+ readonly Allow: "allow";
13
+ };
14
+ export type ChatGenerationParamsDataCollection = OpenEnum<typeof ChatGenerationParamsDataCollection>;
15
+ export declare const Quantizations: {
16
+ readonly Int4: "int4";
17
+ readonly Int8: "int8";
18
+ readonly Fp4: "fp4";
19
+ readonly Fp6: "fp6";
20
+ readonly Fp8: "fp8";
21
+ readonly Fp16: "fp16";
22
+ readonly Bf16: "bf16";
23
+ readonly Fp32: "fp32";
24
+ readonly Unknown: "unknown";
25
+ };
26
+ export type Quantizations = OpenEnum<typeof Quantizations>;
27
+ export declare const Sort: {
28
+ readonly Price: "price";
29
+ readonly Throughput: "throughput";
30
+ readonly Latency: "latency";
31
+ };
32
+ export type Sort = OpenEnum<typeof Sort>;
33
+ /**
34
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
35
+ */
36
+ export type ChatGenerationParamsMaxPrice = {
37
+ prompt?: any | undefined;
38
+ completion?: any | undefined;
39
+ image?: any | undefined;
40
+ audio?: any | undefined;
41
+ request?: any | undefined;
42
+ };
43
+ export type ChatGenerationParamsProvider = {
44
+ /**
45
+ * Whether to allow backup providers to serve requests
46
+ *
47
+ * @remarks
48
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
49
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
50
+ */
51
+ allowFallbacks?: boolean | null | undefined;
52
+ /**
53
+ * Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
54
+ */
55
+ requireParameters?: boolean | null | undefined;
56
+ /**
57
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
58
+ *
59
+ * @remarks
60
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
61
+ *
62
+ * - deny: use only providers which do not collect user data.
63
+ */
64
+ dataCollection?: ChatGenerationParamsDataCollection | null | undefined;
65
+ zdr?: boolean | null | undefined;
66
+ enforceDistillableText?: boolean | null | undefined;
67
+ /**
68
+ * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
69
+ */
70
+ order?: Array<Schema0> | null | undefined;
71
+ /**
72
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
73
+ */
74
+ only?: Array<Schema0> | null | undefined;
75
+ /**
76
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
77
+ */
78
+ ignore?: Array<Schema0> | null | undefined;
79
+ /**
80
+ * A list of quantization levels to filter the provider by.
81
+ */
82
+ quantizations?: Array<Quantizations> | null | undefined;
83
+ /**
84
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
85
+ */
86
+ sort?: Sort | null | undefined;
87
+ /**
88
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
89
+ */
90
+ maxPrice?: ChatGenerationParamsMaxPrice | undefined;
91
+ /**
92
+ * The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
93
+ */
94
+ minThroughput?: number | null | undefined;
95
+ /**
96
+ * The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
97
+ */
98
+ maxLatency?: number | null | undefined;
99
+ };
100
+ export type ChatGenerationParamsPluginResponseHealing = {
101
+ id: "response-healing";
102
+ enabled?: boolean | undefined;
103
+ };
104
+ export declare const ChatGenerationParamsPdfEngine: {
105
+ readonly MistralOcr: "mistral-ocr";
106
+ readonly PdfText: "pdf-text";
107
+ readonly Native: "native";
108
+ };
109
+ export type ChatGenerationParamsPdfEngine = OpenEnum<typeof ChatGenerationParamsPdfEngine>;
110
+ export type ChatGenerationParamsPdf = {
111
+ engine?: ChatGenerationParamsPdfEngine | undefined;
112
+ };
113
+ export type ChatGenerationParamsPluginFileParser = {
114
+ id: "file-parser";
115
+ enabled?: boolean | undefined;
116
+ maxFiles?: number | undefined;
117
+ pdf?: ChatGenerationParamsPdf | undefined;
118
+ };
119
+ export declare const ChatGenerationParamsEngine: {
120
+ readonly Native: "native";
121
+ readonly Exa: "exa";
122
+ };
123
+ export type ChatGenerationParamsEngine = OpenEnum<typeof ChatGenerationParamsEngine>;
124
+ export type ChatGenerationParamsPluginWeb = {
125
+ id: "web";
126
+ enabled?: boolean | undefined;
127
+ maxResults?: number | undefined;
128
+ searchPrompt?: string | undefined;
129
+ engine?: ChatGenerationParamsEngine | undefined;
130
+ };
131
+ export type ChatGenerationParamsPluginModeration = {
132
+ id: "moderation";
133
+ };
134
+ export type ChatGenerationParamsPluginUnion = ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing;
135
+ export declare const ChatGenerationParamsRoute: {
136
+ readonly Fallback: "fallback";
137
+ readonly Sort: "sort";
138
+ };
139
+ export type ChatGenerationParamsRoute = OpenEnum<typeof ChatGenerationParamsRoute>;
9
140
  export declare const Effort: {
10
141
  readonly None: "none";
11
142
  readonly Minimal: "minimal";
12
143
  readonly Low: "low";
13
144
  readonly Medium: "medium";
14
145
  readonly High: "high";
146
+ readonly Xhigh: "xhigh";
15
147
  };
16
148
  export type Effort = OpenEnum<typeof Effort>;
17
149
  export type Reasoning = {
@@ -29,7 +161,27 @@ export type ChatGenerationParamsResponseFormatText = {
29
161
  };
30
162
  export type ChatGenerationParamsResponseFormatUnion = ChatGenerationParamsResponseFormatText | ChatGenerationParamsResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ChatGenerationParamsResponseFormatPython;
31
163
  export type ChatGenerationParamsStop = string | Array<string>;
164
+ export type Debug = {
165
+ echoUpstreamBody?: boolean | undefined;
166
+ };
32
167
  export type ChatGenerationParams = {
168
+ /**
169
+ * When multiple model providers are available, optionally indicate your routing preference.
170
+ */
171
+ provider?: ChatGenerationParamsProvider | null | undefined;
172
+ /**
173
+ * Plugins you want to enable for this request, including their settings.
174
+ */
175
+ plugins?: Array<ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing> | undefined;
176
+ /**
177
+ * Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
178
+ */
179
+ route?: ChatGenerationParamsRoute | null | undefined;
180
+ user?: string | undefined;
181
+ /**
182
+ * A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
183
+ */
184
+ sessionId?: string | undefined;
33
185
  messages: Array<Message>;
34
186
  model?: string | undefined;
35
187
  models?: Array<string> | undefined;
@@ -55,9 +207,99 @@ export type ChatGenerationParams = {
55
207
  toolChoice?: any | undefined;
56
208
  tools?: Array<ToolDefinitionJson> | undefined;
57
209
  topP?: number | null | undefined;
58
- user?: string | undefined;
210
+ debug?: Debug | undefined;
211
+ };
212
+ /** @internal */
213
+ export declare const ChatGenerationParamsDataCollection$outboundSchema: z.ZodType<string, ChatGenerationParamsDataCollection>;
214
+ /** @internal */
215
+ export declare const Quantizations$outboundSchema: z.ZodType<string, Quantizations>;
216
+ /** @internal */
217
+ export declare const Sort$outboundSchema: z.ZodType<string, Sort>;
218
+ /** @internal */
219
+ export type ChatGenerationParamsMaxPrice$Outbound = {
220
+ prompt?: any | undefined;
221
+ completion?: any | undefined;
222
+ image?: any | undefined;
223
+ audio?: any | undefined;
224
+ request?: any | undefined;
225
+ };
226
+ /** @internal */
227
+ export declare const ChatGenerationParamsMaxPrice$outboundSchema: z.ZodType<ChatGenerationParamsMaxPrice$Outbound, ChatGenerationParamsMaxPrice>;
228
+ export declare function chatGenerationParamsMaxPriceToJSON(chatGenerationParamsMaxPrice: ChatGenerationParamsMaxPrice): string;
229
+ /** @internal */
230
+ export type ChatGenerationParamsProvider$Outbound = {
231
+ allow_fallbacks?: boolean | null | undefined;
232
+ require_parameters?: boolean | null | undefined;
233
+ data_collection?: string | null | undefined;
234
+ zdr?: boolean | null | undefined;
235
+ enforce_distillable_text?: boolean | null | undefined;
236
+ order?: Array<Schema0$Outbound> | null | undefined;
237
+ only?: Array<Schema0$Outbound> | null | undefined;
238
+ ignore?: Array<Schema0$Outbound> | null | undefined;
239
+ quantizations?: Array<string> | null | undefined;
240
+ sort?: string | null | undefined;
241
+ max_price?: ChatGenerationParamsMaxPrice$Outbound | undefined;
242
+ min_throughput?: number | null | undefined;
243
+ max_latency?: number | null | undefined;
244
+ };
245
+ /** @internal */
246
+ export declare const ChatGenerationParamsProvider$outboundSchema: z.ZodType<ChatGenerationParamsProvider$Outbound, ChatGenerationParamsProvider>;
247
+ export declare function chatGenerationParamsProviderToJSON(chatGenerationParamsProvider: ChatGenerationParamsProvider): string;
248
+ /** @internal */
249
+ export type ChatGenerationParamsPluginResponseHealing$Outbound = {
250
+ id: "response-healing";
251
+ enabled?: boolean | undefined;
252
+ };
253
+ /** @internal */
254
+ export declare const ChatGenerationParamsPluginResponseHealing$outboundSchema: z.ZodType<ChatGenerationParamsPluginResponseHealing$Outbound, ChatGenerationParamsPluginResponseHealing>;
255
+ export declare function chatGenerationParamsPluginResponseHealingToJSON(chatGenerationParamsPluginResponseHealing: ChatGenerationParamsPluginResponseHealing): string;
256
+ /** @internal */
257
+ export declare const ChatGenerationParamsPdfEngine$outboundSchema: z.ZodType<string, ChatGenerationParamsPdfEngine>;
258
+ /** @internal */
259
+ export type ChatGenerationParamsPdf$Outbound = {
260
+ engine?: string | undefined;
261
+ };
262
+ /** @internal */
263
+ export declare const ChatGenerationParamsPdf$outboundSchema: z.ZodType<ChatGenerationParamsPdf$Outbound, ChatGenerationParamsPdf>;
264
+ export declare function chatGenerationParamsPdfToJSON(chatGenerationParamsPdf: ChatGenerationParamsPdf): string;
265
+ /** @internal */
266
+ export type ChatGenerationParamsPluginFileParser$Outbound = {
267
+ id: "file-parser";
268
+ enabled?: boolean | undefined;
269
+ max_files?: number | undefined;
270
+ pdf?: ChatGenerationParamsPdf$Outbound | undefined;
271
+ };
272
+ /** @internal */
273
+ export declare const ChatGenerationParamsPluginFileParser$outboundSchema: z.ZodType<ChatGenerationParamsPluginFileParser$Outbound, ChatGenerationParamsPluginFileParser>;
274
+ export declare function chatGenerationParamsPluginFileParserToJSON(chatGenerationParamsPluginFileParser: ChatGenerationParamsPluginFileParser): string;
275
+ /** @internal */
276
+ export declare const ChatGenerationParamsEngine$outboundSchema: z.ZodType<string, ChatGenerationParamsEngine>;
277
+ /** @internal */
278
+ export type ChatGenerationParamsPluginWeb$Outbound = {
279
+ id: "web";
280
+ enabled?: boolean | undefined;
281
+ max_results?: number | undefined;
282
+ search_prompt?: string | undefined;
283
+ engine?: string | undefined;
59
284
  };
60
285
  /** @internal */
286
+ export declare const ChatGenerationParamsPluginWeb$outboundSchema: z.ZodType<ChatGenerationParamsPluginWeb$Outbound, ChatGenerationParamsPluginWeb>;
287
+ export declare function chatGenerationParamsPluginWebToJSON(chatGenerationParamsPluginWeb: ChatGenerationParamsPluginWeb): string;
288
+ /** @internal */
289
+ export type ChatGenerationParamsPluginModeration$Outbound = {
290
+ id: "moderation";
291
+ };
292
+ /** @internal */
293
+ export declare const ChatGenerationParamsPluginModeration$outboundSchema: z.ZodType<ChatGenerationParamsPluginModeration$Outbound, ChatGenerationParamsPluginModeration>;
294
+ export declare function chatGenerationParamsPluginModerationToJSON(chatGenerationParamsPluginModeration: ChatGenerationParamsPluginModeration): string;
295
+ /** @internal */
296
+ export type ChatGenerationParamsPluginUnion$Outbound = ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound | ChatGenerationParamsPluginResponseHealing$Outbound;
297
+ /** @internal */
298
+ export declare const ChatGenerationParamsPluginUnion$outboundSchema: z.ZodType<ChatGenerationParamsPluginUnion$Outbound, ChatGenerationParamsPluginUnion>;
299
+ export declare function chatGenerationParamsPluginUnionToJSON(chatGenerationParamsPluginUnion: ChatGenerationParamsPluginUnion): string;
300
+ /** @internal */
301
+ export declare const ChatGenerationParamsRoute$outboundSchema: z.ZodType<string, ChatGenerationParamsRoute>;
302
+ /** @internal */
61
303
  export declare const Effort$outboundSchema: z.ZodType<string, Effort>;
62
304
  /** @internal */
63
305
  export type Reasoning$Outbound = {
@@ -99,7 +341,19 @@ export type ChatGenerationParamsStop$Outbound = string | Array<string>;
99
341
  export declare const ChatGenerationParamsStop$outboundSchema: z.ZodType<ChatGenerationParamsStop$Outbound, ChatGenerationParamsStop>;
100
342
  export declare function chatGenerationParamsStopToJSON(chatGenerationParamsStop: ChatGenerationParamsStop): string;
101
343
  /** @internal */
344
+ export type Debug$Outbound = {
345
+ echo_upstream_body?: boolean | undefined;
346
+ };
347
+ /** @internal */
348
+ export declare const Debug$outboundSchema: z.ZodType<Debug$Outbound, Debug>;
349
+ export declare function debugToJSON(debug: Debug): string;
350
+ /** @internal */
102
351
  export type ChatGenerationParams$Outbound = {
352
+ provider?: ChatGenerationParamsProvider$Outbound | null | undefined;
353
+ plugins?: Array<ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound | ChatGenerationParamsPluginResponseHealing$Outbound> | undefined;
354
+ route?: string | null | undefined;
355
+ user?: string | undefined;
356
+ session_id?: string | undefined;
103
357
  messages: Array<Message$Outbound>;
104
358
  model?: string | undefined;
105
359
  models?: Array<string> | undefined;
@@ -125,7 +379,7 @@ export type ChatGenerationParams$Outbound = {
125
379
  tool_choice?: any | undefined;
126
380
  tools?: Array<ToolDefinitionJson$Outbound> | undefined;
127
381
  top_p?: number | null | undefined;
128
- user?: string | undefined;
382
+ debug?: Debug$Outbound | undefined;
129
383
  };
130
384
  /** @internal */
131
385
  export declare const ChatGenerationParams$outboundSchema: z.ZodType<ChatGenerationParams$Outbound, ChatGenerationParams>;