@openrouter/sdk 0.12.19 → 0.12.21

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 (62) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/chatwebsearchshorthand.d.ts +1 -1
  4. package/esm/models/createworkspacerequest.d.ts +10 -0
  5. package/esm/models/createworkspacerequest.js +4 -0
  6. package/esm/models/generationresponse.d.ts +4 -0
  7. package/esm/models/generationresponse.js +2 -0
  8. package/esm/models/inputsunion.d.ts +18 -4
  9. package/esm/models/inputsunion.js +42 -0
  10. package/esm/models/outputapplypatchservertoolitem.d.ts +21 -1
  11. package/esm/models/outputapplypatchservertoolitem.js +20 -2
  12. package/esm/models/outputbashservertoolitem.d.ts +23 -1
  13. package/esm/models/outputbashservertoolitem.js +22 -2
  14. package/esm/models/outputbrowseruseservertoolitem.d.ts +21 -1
  15. package/esm/models/outputbrowseruseservertoolitem.js +20 -2
  16. package/esm/models/outputcodeinterpretercallitem.d.ts +43 -1
  17. package/esm/models/outputcodeinterpretercallitem.js +52 -2
  18. package/esm/models/outputcodeinterpreterservertoolitem.d.ts +24 -1
  19. package/esm/models/outputcodeinterpreterservertoolitem.js +23 -2
  20. package/esm/models/outputcomputercallitem.d.ts +33 -2
  21. package/esm/models/outputcomputercallitem.js +36 -1
  22. package/esm/models/outputfilesearchservertoolitem.d.ts +20 -1
  23. package/esm/models/outputfilesearchservertoolitem.js +19 -2
  24. package/esm/models/outputimagegenerationservertoolitem.d.ts +23 -1
  25. package/esm/models/outputimagegenerationservertoolitem.js +22 -2
  26. package/esm/models/outputitems.d.ts +31 -3
  27. package/esm/models/outputitems.js +19 -14
  28. package/esm/models/outputmcpservertoolitem.d.ts +21 -1
  29. package/esm/models/outputmcpservertoolitem.js +20 -2
  30. package/esm/models/outputmemoryservertoolitem.d.ts +24 -2
  31. package/esm/models/outputmemoryservertoolitem.js +23 -2
  32. package/esm/models/outputmodality.d.ts +1 -1
  33. package/esm/models/outputmodality.js +1 -1
  34. package/esm/models/outputsearchmodelsservertoolitem.d.ts +21 -1
  35. package/esm/models/outputsearchmodelsservertoolitem.js +20 -2
  36. package/esm/models/outputtexteditorservertoolitem.d.ts +23 -2
  37. package/esm/models/outputtexteditorservertoolitem.js +23 -2
  38. package/esm/models/outputtoolsearchservertoolitem.d.ts +20 -1
  39. package/esm/models/outputtoolsearchservertoolitem.js +19 -2
  40. package/esm/models/outputwebfetchservertoolitem.d.ts +22 -1
  41. package/esm/models/outputwebfetchservertoolitem.js +21 -2
  42. package/esm/models/providername.d.ts +2 -0
  43. package/esm/models/providername.js +2 -0
  44. package/esm/models/providerresponse.d.ts +2 -0
  45. package/esm/models/providerresponse.js +2 -0
  46. package/esm/models/searchqualitylevel.d.ts +2 -2
  47. package/esm/models/searchqualitylevel.js +1 -1
  48. package/esm/models/speechrequest.d.ts +12 -0
  49. package/esm/models/speechrequest.js +3 -0
  50. package/esm/models/updateworkspacerequest.d.ts +10 -0
  51. package/esm/models/updateworkspacerequest.js +4 -0
  52. package/esm/models/videogenerationrequest.d.ts +17 -0
  53. package/esm/models/videogenerationrequest.js +5 -0
  54. package/esm/models/websearchconfig.d.ts +1 -1
  55. package/esm/models/websearchplugin.d.ts +35 -0
  56. package/esm/models/websearchplugin.js +21 -0
  57. package/esm/models/websearchuserlocationservertool.d.ts +8 -8
  58. package/esm/models/websearchuserlocationservertool.js +4 -4
  59. package/esm/models/workspace.d.ts +8 -0
  60. package/esm/models/workspace.js +4 -0
  61. package/jsr.json +1 -1
  62. package/package.json +4 -4
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
49
49
  export declare const SDK_METADATA: {
50
50
  readonly language: "typescript";
51
51
  readonly openapiDocVersion: "1.0.0";
52
- readonly sdkVersion: "0.12.19";
52
+ readonly sdkVersion: "0.12.21";
53
53
  readonly genVersion: "2.879.1";
54
- readonly userAgent: "speakeasy-sdk/typescript 0.12.19 2.879.1 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 0.12.21 2.879.1 1.0.0 @openrouter/sdk";
55
55
  };
56
56
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
26
26
  export const SDK_METADATA = {
27
27
  language: "typescript",
28
28
  openapiDocVersion: "1.0.0",
29
- sdkVersion: "0.12.19",
29
+ sdkVersion: "0.12.21",
30
30
  genVersion: "2.879.1",
31
- userAgent: "speakeasy-sdk/typescript 0.12.19 2.879.1 1.0.0 @openrouter/sdk",
31
+ userAgent: "speakeasy-sdk/typescript 0.12.21 2.879.1 1.0.0 @openrouter/sdk",
32
32
  };
33
33
  //# sourceMappingURL=config.js.map
@@ -37,7 +37,7 @@ export type ChatWebSearchShorthand = {
37
37
  maxTotalResults?: number | undefined;
38
38
  parameters?: WebSearchConfig | undefined;
39
39
  /**
40
- * How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa engine; ignored with native provider search.
40
+ * How much context to retrieve per result. Defaults to medium (15000 chars). Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl.
41
41
  */
42
42
  searchContextSize?: SearchQualityLevel | undefined;
43
43
  type: ChatWebSearchShorthandType;
@@ -16,6 +16,14 @@ export type CreateWorkspaceRequest = {
16
16
  * Description of the workspace
17
17
  */
18
18
  description?: string | null | undefined;
19
+ /**
20
+ * Optional array of API key IDs to filter I/O logging
21
+ */
22
+ ioLoggingApiKeyIds?: Array<number> | null | undefined;
23
+ /**
24
+ * Sampling rate for I/O logging (0.0001-1)
25
+ */
26
+ ioLoggingSamplingRate?: number | undefined;
19
27
  /**
20
28
  * Whether data discount logging is enabled
21
29
  */
@@ -43,6 +51,8 @@ export type CreateWorkspaceRequest$Outbound = {
43
51
  default_provider_sort?: string | null | undefined;
44
52
  default_text_model?: string | null | undefined;
45
53
  description?: string | null | undefined;
54
+ io_logging_api_key_ids?: Array<number> | null | undefined;
55
+ io_logging_sampling_rate?: number | undefined;
46
56
  is_data_discount_logging_enabled?: boolean | undefined;
47
57
  is_observability_broadcast_enabled?: boolean | undefined;
48
58
  is_observability_io_logging_enabled?: boolean | undefined;
@@ -10,6 +10,8 @@ export const CreateWorkspaceRequest$outboundSchema = z.object({
10
10
  defaultProviderSort: z.nullable(z.string()).optional(),
11
11
  defaultTextModel: z.nullable(z.string()).optional(),
12
12
  description: z.nullable(z.string()).optional(),
13
+ ioLoggingApiKeyIds: z.nullable(z.array(z.int())).optional(),
14
+ ioLoggingSamplingRate: z.number().optional(),
13
15
  isDataDiscountLoggingEnabled: z.boolean().optional(),
14
16
  isObservabilityBroadcastEnabled: z.boolean().optional(),
15
17
  isObservabilityIoLoggingEnabled: z.boolean().optional(),
@@ -20,6 +22,8 @@ export const CreateWorkspaceRequest$outboundSchema = z.object({
20
22
  defaultImageModel: "default_image_model",
21
23
  defaultProviderSort: "default_provider_sort",
22
24
  defaultTextModel: "default_text_model",
25
+ ioLoggingApiKeyIds: "io_logging_api_key_ids",
26
+ ioLoggingSamplingRate: "io_logging_sampling_rate",
23
27
  isDataDiscountLoggingEnabled: "is_data_discount_logging_enabled",
24
28
  isObservabilityBroadcastEnabled: "is_observability_broadcast_enabled",
25
29
  isObservabilityIoLoggingEnabled: "is_observability_io_logging_enabled",
@@ -137,6 +137,10 @@ export type GenerationResponseData = {
137
137
  * Unique identifier grouping all generations from a single API request
138
138
  */
139
139
  requestId?: string | null | undefined;
140
+ /**
141
+ * If this generation was served from response cache, contains the original generation ID. Null otherwise.
142
+ */
143
+ responseCacheSourceId?: string | null | undefined;
140
144
  /**
141
145
  * Router used for the request (e.g., openrouter/auto)
142
146
  */
@@ -51,6 +51,7 @@ export const GenerationResponseData$inboundSchema = z.object({
51
51
  provider_name: z.nullable(z.string()),
52
52
  provider_responses: z.nullable(z.array(ProviderResponse$inboundSchema)),
53
53
  request_id: z.nullable(z.string()).optional(),
54
+ response_cache_source_id: z.nullable(z.string()).optional(),
54
55
  router: z.nullable(z.string()),
55
56
  session_id: z.nullable(z.string()).optional(),
56
57
  streamed: z.nullable(z.boolean()),
@@ -88,6 +89,7 @@ export const GenerationResponseData$inboundSchema = z.object({
88
89
  "provider_name": "providerName",
89
90
  "provider_responses": "providerResponses",
90
91
  "request_id": "requestId",
92
+ "response_cache_source_id": "responseCacheSourceId",
91
93
  "session_id": "sessionId",
92
94
  "tokens_completion": "tokensCompletion",
93
95
  "tokens_prompt": "tokensPrompt",
@@ -5,10 +5,24 @@ import { FunctionCallItem, FunctionCallItem$Outbound } from "./functioncallitem.
5
5
  import { FunctionCallOutputItem, FunctionCallOutputItem$Outbound } from "./functioncalloutputitem.js";
6
6
  import { InputMessageItem, InputMessageItem$Outbound } from "./inputmessageitem.js";
7
7
  import { OpenAIResponsesRefusalContent, OpenAIResponsesRefusalContent$Outbound } from "./openairesponsesrefusalcontent.js";
8
+ import { OutputApplyPatchServerToolItem, OutputApplyPatchServerToolItem$Outbound } from "./outputapplypatchservertoolitem.js";
9
+ import { OutputBashServerToolItem, OutputBashServerToolItem$Outbound } from "./outputbashservertoolitem.js";
10
+ import { OutputBrowserUseServerToolItem, OutputBrowserUseServerToolItem$Outbound } from "./outputbrowseruseservertoolitem.js";
11
+ import { OutputCodeInterpreterCallItem, OutputCodeInterpreterCallItem$Outbound } from "./outputcodeinterpretercallitem.js";
12
+ import { OutputCodeInterpreterServerToolItem, OutputCodeInterpreterServerToolItem$Outbound } from "./outputcodeinterpreterservertoolitem.js";
13
+ import { OutputComputerCallItem, OutputComputerCallItem$Outbound } from "./outputcomputercallitem.js";
8
14
  import { OutputDatetimeItem, OutputDatetimeItem$Outbound } from "./outputdatetimeitem.js";
9
15
  import { OutputFileSearchCallItem, OutputFileSearchCallItem$Outbound } from "./outputfilesearchcallitem.js";
16
+ import { OutputFileSearchServerToolItem, OutputFileSearchServerToolItem$Outbound } from "./outputfilesearchservertoolitem.js";
10
17
  import { OutputFunctionCallItem, OutputFunctionCallItem$Outbound } from "./outputfunctioncallitem.js";
11
18
  import { OutputImageGenerationCallItem, OutputImageGenerationCallItem$Outbound } from "./outputimagegenerationcallitem.js";
19
+ import { OutputImageGenerationServerToolItem, OutputImageGenerationServerToolItem$Outbound } from "./outputimagegenerationservertoolitem.js";
20
+ import { OutputMcpServerToolItem, OutputMcpServerToolItem$Outbound } from "./outputmcpservertoolitem.js";
21
+ import { OutputMemoryServerToolItem, OutputMemoryServerToolItem$Outbound } from "./outputmemoryservertoolitem.js";
22
+ import { OutputSearchModelsServerToolItem, OutputSearchModelsServerToolItem$Outbound } from "./outputsearchmodelsservertoolitem.js";
23
+ import { OutputTextEditorServerToolItem, OutputTextEditorServerToolItem$Outbound } from "./outputtexteditorservertoolitem.js";
24
+ import { OutputToolSearchServerToolItem, OutputToolSearchServerToolItem$Outbound } from "./outputtoolsearchservertoolitem.js";
25
+ import { OutputWebFetchServerToolItem, OutputWebFetchServerToolItem$Outbound } from "./outputwebfetchservertoolitem.js";
12
26
  import { OutputWebSearchCallItem, OutputWebSearchCallItem$Outbound } from "./outputwebsearchcallitem.js";
13
27
  import { OutputWebSearchServerToolItem, OutputWebSearchServerToolItem$Outbound } from "./outputwebsearchservertoolitem.js";
14
28
  import { ReasoningFormat } from "./reasoningformat.js";
@@ -98,11 +112,11 @@ export type InputsMessage = {
98
112
  status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
99
113
  type: InputsTypeMessage;
100
114
  };
101
- export type InputsUnion1 = FunctionCallItem | InputsMessage | OutputFunctionCallItem | OutputWebSearchCallItem | OutputFileSearchCallItem | OutputDatetimeItem | ReasoningItem | FunctionCallOutputItem | InputsReasoning | OutputImageGenerationCallItem | OutputWebSearchServerToolItem | EasyInputMessage | InputMessageItem;
115
+ export type InputsUnion1 = OutputCodeInterpreterCallItem | FunctionCallItem | InputsMessage | OutputFunctionCallItem | OutputWebSearchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | ReasoningItem | FunctionCallOutputItem | InputsReasoning | OutputImageGenerationCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | EasyInputMessage | InputMessageItem;
102
116
  /**
103
117
  * Input for a response request - can be a string or array of items
104
118
  */
105
- export type InputsUnion = string | Array<FunctionCallItem | InputsMessage | OutputFunctionCallItem | OutputWebSearchCallItem | OutputFileSearchCallItem | OutputDatetimeItem | ReasoningItem | FunctionCallOutputItem | InputsReasoning | OutputImageGenerationCallItem | OutputWebSearchServerToolItem | EasyInputMessage | InputMessageItem>;
119
+ export type InputsUnion = string | Array<OutputCodeInterpreterCallItem | FunctionCallItem | InputsMessage | OutputFunctionCallItem | OutputWebSearchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | ReasoningItem | FunctionCallOutputItem | InputsReasoning | OutputImageGenerationCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | EasyInputMessage | InputMessageItem>;
106
120
  /** @internal */
107
121
  export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
108
122
  /** @internal */
@@ -177,12 +191,12 @@ export type InputsMessage$Outbound = {
177
191
  export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
178
192
  export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
179
193
  /** @internal */
180
- export type InputsUnion1$Outbound = FunctionCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputWebSearchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputDatetimeItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | InputsReasoning$Outbound | OutputImageGenerationCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound;
194
+ export type InputsUnion1$Outbound = OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputWebSearchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | InputsReasoning$Outbound | OutputImageGenerationCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound;
181
195
  /** @internal */
182
196
  export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
183
197
  export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
184
198
  /** @internal */
185
- export type InputsUnion$Outbound = string | Array<FunctionCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputWebSearchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputDatetimeItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | InputsReasoning$Outbound | OutputImageGenerationCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound>;
199
+ export type InputsUnion$Outbound = string | Array<OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputWebSearchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | InputsReasoning$Outbound | OutputImageGenerationCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound>;
186
200
  /** @internal */
187
201
  export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
188
202
  export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
@@ -9,10 +9,24 @@ import { FunctionCallItem$outboundSchema, } from "./functioncallitem.js";
9
9
  import { FunctionCallOutputItem$outboundSchema, } from "./functioncalloutputitem.js";
10
10
  import { InputMessageItem$outboundSchema, } from "./inputmessageitem.js";
11
11
  import { OpenAIResponsesRefusalContent$outboundSchema, } from "./openairesponsesrefusalcontent.js";
12
+ import { OutputApplyPatchServerToolItem$outboundSchema, } from "./outputapplypatchservertoolitem.js";
13
+ import { OutputBashServerToolItem$outboundSchema, } from "./outputbashservertoolitem.js";
14
+ import { OutputBrowserUseServerToolItem$outboundSchema, } from "./outputbrowseruseservertoolitem.js";
15
+ import { OutputCodeInterpreterCallItem$outboundSchema, } from "./outputcodeinterpretercallitem.js";
16
+ import { OutputCodeInterpreterServerToolItem$outboundSchema, } from "./outputcodeinterpreterservertoolitem.js";
17
+ import { OutputComputerCallItem$outboundSchema, } from "./outputcomputercallitem.js";
12
18
  import { OutputDatetimeItem$outboundSchema, } from "./outputdatetimeitem.js";
13
19
  import { OutputFileSearchCallItem$outboundSchema, } from "./outputfilesearchcallitem.js";
20
+ import { OutputFileSearchServerToolItem$outboundSchema, } from "./outputfilesearchservertoolitem.js";
14
21
  import { OutputFunctionCallItem$outboundSchema, } from "./outputfunctioncallitem.js";
15
22
  import { OutputImageGenerationCallItem$outboundSchema, } from "./outputimagegenerationcallitem.js";
23
+ import { OutputImageGenerationServerToolItem$outboundSchema, } from "./outputimagegenerationservertoolitem.js";
24
+ import { OutputMcpServerToolItem$outboundSchema, } from "./outputmcpservertoolitem.js";
25
+ import { OutputMemoryServerToolItem$outboundSchema, } from "./outputmemoryservertoolitem.js";
26
+ import { OutputSearchModelsServerToolItem$outboundSchema, } from "./outputsearchmodelsservertoolitem.js";
27
+ import { OutputTextEditorServerToolItem$outboundSchema, } from "./outputtexteditorservertoolitem.js";
28
+ import { OutputToolSearchServerToolItem$outboundSchema, } from "./outputtoolsearchservertoolitem.js";
29
+ import { OutputWebFetchServerToolItem$outboundSchema, } from "./outputwebfetchservertoolitem.js";
16
30
  import { OutputWebSearchCallItem$outboundSchema, } from "./outputwebsearchcallitem.js";
17
31
  import { OutputWebSearchServerToolItem$outboundSchema, } from "./outputwebsearchservertoolitem.js";
18
32
  import { ReasoningFormat$outboundSchema, } from "./reasoningformat.js";
@@ -173,17 +187,31 @@ export function inputsMessageToJSON(inputsMessage) {
173
187
  }
174
188
  /** @internal */
175
189
  export const InputsUnion1$outboundSchema = z.union([
190
+ OutputCodeInterpreterCallItem$outboundSchema,
176
191
  FunctionCallItem$outboundSchema,
177
192
  z.lazy(() => InputsMessage$outboundSchema),
178
193
  OutputFunctionCallItem$outboundSchema,
179
194
  OutputWebSearchCallItem$outboundSchema,
180
195
  OutputFileSearchCallItem$outboundSchema,
196
+ OutputComputerCallItem$outboundSchema,
181
197
  OutputDatetimeItem$outboundSchema,
182
198
  ReasoningItem$outboundSchema,
183
199
  FunctionCallOutputItem$outboundSchema,
184
200
  z.lazy(() => InputsReasoning$outboundSchema),
185
201
  OutputImageGenerationCallItem$outboundSchema,
186
202
  OutputWebSearchServerToolItem$outboundSchema,
203
+ OutputCodeInterpreterServerToolItem$outboundSchema,
204
+ OutputFileSearchServerToolItem$outboundSchema,
205
+ OutputImageGenerationServerToolItem$outboundSchema,
206
+ OutputBrowserUseServerToolItem$outboundSchema,
207
+ OutputBashServerToolItem$outboundSchema,
208
+ OutputTextEditorServerToolItem$outboundSchema,
209
+ OutputApplyPatchServerToolItem$outboundSchema,
210
+ OutputWebFetchServerToolItem$outboundSchema,
211
+ OutputToolSearchServerToolItem$outboundSchema,
212
+ OutputMemoryServerToolItem$outboundSchema,
213
+ OutputMcpServerToolItem$outboundSchema,
214
+ OutputSearchModelsServerToolItem$outboundSchema,
187
215
  EasyInputMessage$outboundSchema,
188
216
  InputMessageItem$outboundSchema,
189
217
  ]);
@@ -194,17 +222,31 @@ export function inputsUnion1ToJSON(inputsUnion1) {
194
222
  export const InputsUnion$outboundSchema = z.union([
195
223
  z.string(),
196
224
  z.array(z.union([
225
+ OutputCodeInterpreterCallItem$outboundSchema,
197
226
  FunctionCallItem$outboundSchema,
198
227
  z.lazy(() => InputsMessage$outboundSchema),
199
228
  OutputFunctionCallItem$outboundSchema,
200
229
  OutputWebSearchCallItem$outboundSchema,
201
230
  OutputFileSearchCallItem$outboundSchema,
231
+ OutputComputerCallItem$outboundSchema,
202
232
  OutputDatetimeItem$outboundSchema,
203
233
  ReasoningItem$outboundSchema,
204
234
  FunctionCallOutputItem$outboundSchema,
205
235
  z.lazy(() => InputsReasoning$outboundSchema),
206
236
  OutputImageGenerationCallItem$outboundSchema,
207
237
  OutputWebSearchServerToolItem$outboundSchema,
238
+ OutputCodeInterpreterServerToolItem$outboundSchema,
239
+ OutputFileSearchServerToolItem$outboundSchema,
240
+ OutputImageGenerationServerToolItem$outboundSchema,
241
+ OutputBrowserUseServerToolItem$outboundSchema,
242
+ OutputBashServerToolItem$outboundSchema,
243
+ OutputTextEditorServerToolItem$outboundSchema,
244
+ OutputApplyPatchServerToolItem$outboundSchema,
245
+ OutputWebFetchServerToolItem$outboundSchema,
246
+ OutputToolSearchServerToolItem$outboundSchema,
247
+ OutputMemoryServerToolItem$outboundSchema,
248
+ OutputMcpServerToolItem$outboundSchema,
249
+ OutputSearchModelsServerToolItem$outboundSchema,
208
250
  EasyInputMessage$outboundSchema,
209
251
  InputMessageItem$outboundSchema,
210
252
  ])),
@@ -1,7 +1,12 @@
1
1
  import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
5
  import { ToolCallStatus } from "./toolcallstatus.js";
6
+ export declare const OutputApplyPatchServerToolItemType: {
7
+ readonly OpenrouterApplyPatch: "openrouter:apply_patch";
8
+ };
9
+ export type OutputApplyPatchServerToolItemType = ClosedEnum<typeof OutputApplyPatchServerToolItemType>;
5
10
  /**
6
11
  * An openrouter:apply_patch server tool output item
7
12
  */
@@ -10,9 +15,24 @@ export type OutputApplyPatchServerToolItem = {
10
15
  id?: string | undefined;
11
16
  patch?: string | undefined;
12
17
  status: ToolCallStatus;
13
- type: "openrouter:apply_patch";
18
+ type: OutputApplyPatchServerToolItemType;
14
19
  };
15
20
  /** @internal */
21
+ export declare const OutputApplyPatchServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputApplyPatchServerToolItemType>;
22
+ /** @internal */
23
+ export declare const OutputApplyPatchServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputApplyPatchServerToolItemType>;
24
+ /** @internal */
16
25
  export declare const OutputApplyPatchServerToolItem$inboundSchema: z.ZodType<OutputApplyPatchServerToolItem, unknown>;
26
+ /** @internal */
27
+ export type OutputApplyPatchServerToolItem$Outbound = {
28
+ filePath?: string | undefined;
29
+ id?: string | undefined;
30
+ patch?: string | undefined;
31
+ status: string;
32
+ type: string;
33
+ };
34
+ /** @internal */
35
+ export declare const OutputApplyPatchServerToolItem$outboundSchema: z.ZodType<OutputApplyPatchServerToolItem$Outbound, OutputApplyPatchServerToolItem>;
36
+ export declare function outputApplyPatchServerToolItemToJSON(outputApplyPatchServerToolItem: OutputApplyPatchServerToolItem): string;
17
37
  export declare function outputApplyPatchServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputApplyPatchServerToolItem, SDKValidationError>;
18
38
  //# sourceMappingURL=outputapplypatchservertoolitem.d.ts.map
@@ -4,15 +4,33 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
7
+ import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
8
+ export const OutputApplyPatchServerToolItemType = {
9
+ OpenrouterApplyPatch: "openrouter:apply_patch",
10
+ };
11
+ /** @internal */
12
+ export const OutputApplyPatchServerToolItemType$inboundSchema = z.enum(OutputApplyPatchServerToolItemType);
13
+ /** @internal */
14
+ export const OutputApplyPatchServerToolItemType$outboundSchema = OutputApplyPatchServerToolItemType$inboundSchema;
8
15
  /** @internal */
9
16
  export const OutputApplyPatchServerToolItem$inboundSchema = z.object({
10
17
  filePath: z.string().optional(),
11
18
  id: z.string().optional(),
12
19
  patch: z.string().optional(),
13
20
  status: ToolCallStatus$inboundSchema,
14
- type: z.literal("openrouter:apply_patch"),
21
+ type: OutputApplyPatchServerToolItemType$inboundSchema,
22
+ });
23
+ /** @internal */
24
+ export const OutputApplyPatchServerToolItem$outboundSchema = z.object({
25
+ filePath: z.string().optional(),
26
+ id: z.string().optional(),
27
+ patch: z.string().optional(),
28
+ status: ToolCallStatus$outboundSchema,
29
+ type: OutputApplyPatchServerToolItemType$outboundSchema,
15
30
  });
31
+ export function outputApplyPatchServerToolItemToJSON(outputApplyPatchServerToolItem) {
32
+ return JSON.stringify(OutputApplyPatchServerToolItem$outboundSchema.parse(outputApplyPatchServerToolItem));
33
+ }
16
34
  export function outputApplyPatchServerToolItemFromJSON(jsonString) {
17
35
  return safeParse(jsonString, (x) => OutputApplyPatchServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputApplyPatchServerToolItem' from JSON`);
18
36
  }
@@ -1,7 +1,12 @@
1
1
  import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
5
  import { ToolCallStatus } from "./toolcallstatus.js";
6
+ export declare const OutputBashServerToolItemType: {
7
+ readonly OpenrouterBash: "openrouter:bash";
8
+ };
9
+ export type OutputBashServerToolItemType = ClosedEnum<typeof OutputBashServerToolItemType>;
5
10
  /**
6
11
  * An openrouter:bash server tool output item
7
12
  */
@@ -12,9 +17,26 @@ export type OutputBashServerToolItem = {
12
17
  status: ToolCallStatus;
13
18
  stderr?: string | undefined;
14
19
  stdout?: string | undefined;
15
- type: "openrouter:bash";
20
+ type: OutputBashServerToolItemType;
16
21
  };
17
22
  /** @internal */
23
+ export declare const OutputBashServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputBashServerToolItemType>;
24
+ /** @internal */
25
+ export declare const OutputBashServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputBashServerToolItemType>;
26
+ /** @internal */
18
27
  export declare const OutputBashServerToolItem$inboundSchema: z.ZodType<OutputBashServerToolItem, unknown>;
28
+ /** @internal */
29
+ export type OutputBashServerToolItem$Outbound = {
30
+ command?: string | undefined;
31
+ exitCode?: number | undefined;
32
+ id?: string | undefined;
33
+ status: string;
34
+ stderr?: string | undefined;
35
+ stdout?: string | undefined;
36
+ type: string;
37
+ };
38
+ /** @internal */
39
+ export declare const OutputBashServerToolItem$outboundSchema: z.ZodType<OutputBashServerToolItem$Outbound, OutputBashServerToolItem>;
40
+ export declare function outputBashServerToolItemToJSON(outputBashServerToolItem: OutputBashServerToolItem): string;
19
41
  export declare function outputBashServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputBashServerToolItem, SDKValidationError>;
20
42
  //# sourceMappingURL=outputbashservertoolitem.d.ts.map
@@ -4,7 +4,14 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
7
+ import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
8
+ export const OutputBashServerToolItemType = {
9
+ OpenrouterBash: "openrouter:bash",
10
+ };
11
+ /** @internal */
12
+ export const OutputBashServerToolItemType$inboundSchema = z.enum(OutputBashServerToolItemType);
13
+ /** @internal */
14
+ export const OutputBashServerToolItemType$outboundSchema = OutputBashServerToolItemType$inboundSchema;
8
15
  /** @internal */
9
16
  export const OutputBashServerToolItem$inboundSchema = z.object({
10
17
  command: z.string().optional(),
@@ -13,8 +20,21 @@ export const OutputBashServerToolItem$inboundSchema = z.object({
13
20
  status: ToolCallStatus$inboundSchema,
14
21
  stderr: z.string().optional(),
15
22
  stdout: z.string().optional(),
16
- type: z.literal("openrouter:bash"),
23
+ type: OutputBashServerToolItemType$inboundSchema,
24
+ });
25
+ /** @internal */
26
+ export const OutputBashServerToolItem$outboundSchema = z.object({
27
+ command: z.string().optional(),
28
+ exitCode: z.int().optional(),
29
+ id: z.string().optional(),
30
+ status: ToolCallStatus$outboundSchema,
31
+ stderr: z.string().optional(),
32
+ stdout: z.string().optional(),
33
+ type: OutputBashServerToolItemType$outboundSchema,
17
34
  });
35
+ export function outputBashServerToolItemToJSON(outputBashServerToolItem) {
36
+ return JSON.stringify(OutputBashServerToolItem$outboundSchema.parse(outputBashServerToolItem));
37
+ }
18
38
  export function outputBashServerToolItemFromJSON(jsonString) {
19
39
  return safeParse(jsonString, (x) => OutputBashServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputBashServerToolItem' from JSON`);
20
40
  }
@@ -1,7 +1,12 @@
1
1
  import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
5
  import { ToolCallStatus } from "./toolcallstatus.js";
6
+ export declare const OutputBrowserUseServerToolItemType: {
7
+ readonly OpenrouterBrowserUse: "openrouter:browser_use";
8
+ };
9
+ export type OutputBrowserUseServerToolItemType = ClosedEnum<typeof OutputBrowserUseServerToolItemType>;
5
10
  /**
6
11
  * An openrouter:browser_use server tool output item
7
12
  */
@@ -10,9 +15,24 @@ export type OutputBrowserUseServerToolItem = {
10
15
  id?: string | undefined;
11
16
  screenshotB64?: string | undefined;
12
17
  status: ToolCallStatus;
13
- type: "openrouter:browser_use";
18
+ type: OutputBrowserUseServerToolItemType;
14
19
  };
15
20
  /** @internal */
21
+ export declare const OutputBrowserUseServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputBrowserUseServerToolItemType>;
22
+ /** @internal */
23
+ export declare const OutputBrowserUseServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputBrowserUseServerToolItemType>;
24
+ /** @internal */
16
25
  export declare const OutputBrowserUseServerToolItem$inboundSchema: z.ZodType<OutputBrowserUseServerToolItem, unknown>;
26
+ /** @internal */
27
+ export type OutputBrowserUseServerToolItem$Outbound = {
28
+ action?: string | undefined;
29
+ id?: string | undefined;
30
+ screenshotB64?: string | undefined;
31
+ status: string;
32
+ type: string;
33
+ };
34
+ /** @internal */
35
+ export declare const OutputBrowserUseServerToolItem$outboundSchema: z.ZodType<OutputBrowserUseServerToolItem$Outbound, OutputBrowserUseServerToolItem>;
36
+ export declare function outputBrowserUseServerToolItemToJSON(outputBrowserUseServerToolItem: OutputBrowserUseServerToolItem): string;
17
37
  export declare function outputBrowserUseServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputBrowserUseServerToolItem, SDKValidationError>;
18
38
  //# sourceMappingURL=outputbrowseruseservertoolitem.d.ts.map
@@ -4,15 +4,33 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
7
+ import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
8
+ export const OutputBrowserUseServerToolItemType = {
9
+ OpenrouterBrowserUse: "openrouter:browser_use",
10
+ };
11
+ /** @internal */
12
+ export const OutputBrowserUseServerToolItemType$inboundSchema = z.enum(OutputBrowserUseServerToolItemType);
13
+ /** @internal */
14
+ export const OutputBrowserUseServerToolItemType$outboundSchema = OutputBrowserUseServerToolItemType$inboundSchema;
8
15
  /** @internal */
9
16
  export const OutputBrowserUseServerToolItem$inboundSchema = z.object({
10
17
  action: z.string().optional(),
11
18
  id: z.string().optional(),
12
19
  screenshotB64: z.string().optional(),
13
20
  status: ToolCallStatus$inboundSchema,
14
- type: z.literal("openrouter:browser_use"),
21
+ type: OutputBrowserUseServerToolItemType$inboundSchema,
22
+ });
23
+ /** @internal */
24
+ export const OutputBrowserUseServerToolItem$outboundSchema = z.object({
25
+ action: z.string().optional(),
26
+ id: z.string().optional(),
27
+ screenshotB64: z.string().optional(),
28
+ status: ToolCallStatus$outboundSchema,
29
+ type: OutputBrowserUseServerToolItemType$outboundSchema,
15
30
  });
31
+ export function outputBrowserUseServerToolItemToJSON(outputBrowserUseServerToolItem) {
32
+ return JSON.stringify(OutputBrowserUseServerToolItem$outboundSchema.parse(outputBrowserUseServerToolItem));
33
+ }
16
34
  export function outputBrowserUseServerToolItemFromJSON(jsonString) {
17
35
  return safeParse(jsonString, (x) => OutputBrowserUseServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputBrowserUseServerToolItem' from JSON`);
18
36
  }
@@ -1,5 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
+ import { ClosedEnum } from "../types/enums.js";
3
4
  import { Result as SafeParseResult } from "../types/fp.js";
4
5
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
6
  import { ToolCallStatus } from "./toolcallstatus.js";
@@ -12,6 +13,10 @@ export type OutputImage = {
12
13
  url: string;
13
14
  };
14
15
  export type OutputCodeInterpreterCallItemOutputUnion = OutputImage | OutputLogs | discriminatedUnionTypes.Unknown<"type">;
16
+ export declare const TypeCodeInterpreterCall: {
17
+ readonly CodeInterpreterCall: "code_interpreter_call";
18
+ };
19
+ export type TypeCodeInterpreterCall = ClosedEnum<typeof TypeCodeInterpreterCall>;
15
20
  /**
16
21
  * A code interpreter execution call with outputs
17
22
  */
@@ -21,18 +26,55 @@ export type OutputCodeInterpreterCallItem = {
21
26
  id: string;
22
27
  outputs: Array<OutputImage | OutputLogs | discriminatedUnionTypes.Unknown<"type">> | null;
23
28
  status: ToolCallStatus;
24
- type: "code_interpreter_call";
29
+ type: TypeCodeInterpreterCall;
25
30
  };
26
31
  /** @internal */
27
32
  export declare const OutputLogs$inboundSchema: z.ZodType<OutputLogs, unknown>;
33
+ /** @internal */
34
+ export type OutputLogs$Outbound = {
35
+ logs: string;
36
+ type: "logs";
37
+ };
38
+ /** @internal */
39
+ export declare const OutputLogs$outboundSchema: z.ZodType<OutputLogs$Outbound, OutputLogs>;
40
+ export declare function outputLogsToJSON(outputLogs: OutputLogs): string;
28
41
  export declare function outputLogsFromJSON(jsonString: string): SafeParseResult<OutputLogs, SDKValidationError>;
29
42
  /** @internal */
30
43
  export declare const OutputImage$inboundSchema: z.ZodType<OutputImage, unknown>;
44
+ /** @internal */
45
+ export type OutputImage$Outbound = {
46
+ type: "image";
47
+ url: string;
48
+ };
49
+ /** @internal */
50
+ export declare const OutputImage$outboundSchema: z.ZodType<OutputImage$Outbound, OutputImage>;
51
+ export declare function outputImageToJSON(outputImage: OutputImage): string;
31
52
  export declare function outputImageFromJSON(jsonString: string): SafeParseResult<OutputImage, SDKValidationError>;
32
53
  /** @internal */
33
54
  export declare const OutputCodeInterpreterCallItemOutputUnion$inboundSchema: z.ZodType<OutputCodeInterpreterCallItemOutputUnion, unknown>;
55
+ /** @internal */
56
+ export type OutputCodeInterpreterCallItemOutputUnion$Outbound = OutputImage$Outbound | OutputLogs$Outbound;
57
+ /** @internal */
58
+ export declare const OutputCodeInterpreterCallItemOutputUnion$outboundSchema: z.ZodType<OutputCodeInterpreterCallItemOutputUnion$Outbound, OutputCodeInterpreterCallItemOutputUnion>;
59
+ export declare function outputCodeInterpreterCallItemOutputUnionToJSON(outputCodeInterpreterCallItemOutputUnion: OutputCodeInterpreterCallItemOutputUnion): string;
34
60
  export declare function outputCodeInterpreterCallItemOutputUnionFromJSON(jsonString: string): SafeParseResult<OutputCodeInterpreterCallItemOutputUnion, SDKValidationError>;
35
61
  /** @internal */
62
+ export declare const TypeCodeInterpreterCall$inboundSchema: z.ZodEnum<typeof TypeCodeInterpreterCall>;
63
+ /** @internal */
64
+ export declare const TypeCodeInterpreterCall$outboundSchema: z.ZodEnum<typeof TypeCodeInterpreterCall>;
65
+ /** @internal */
36
66
  export declare const OutputCodeInterpreterCallItem$inboundSchema: z.ZodType<OutputCodeInterpreterCallItem, unknown>;
67
+ /** @internal */
68
+ export type OutputCodeInterpreterCallItem$Outbound = {
69
+ code: string | null;
70
+ container_id: string;
71
+ id: string;
72
+ outputs: Array<OutputImage$Outbound | OutputLogs$Outbound> | null;
73
+ status: string;
74
+ type: string;
75
+ };
76
+ /** @internal */
77
+ export declare const OutputCodeInterpreterCallItem$outboundSchema: z.ZodType<OutputCodeInterpreterCallItem$Outbound, OutputCodeInterpreterCallItem>;
78
+ export declare function outputCodeInterpreterCallItemToJSON(outputCodeInterpreterCallItem: OutputCodeInterpreterCallItem): string;
37
79
  export declare function outputCodeInterpreterCallItemFromJSON(jsonString: string): SafeParseResult<OutputCodeInterpreterCallItem, SDKValidationError>;
38
80
  //# sourceMappingURL=outputcodeinterpretercallitem.d.ts.map