@openrouter/sdk 0.13.23 → 0.13.24

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.
@@ -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.13.23";
52
+ readonly sdkVersion: "0.13.24";
53
53
  readonly genVersion: "2.884.4";
54
- readonly userAgent: "speakeasy-sdk/typescript 0.13.23 2.884.4 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 0.13.24 2.884.4 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.13.23",
29
+ sdkVersion: "0.13.24",
30
30
  genVersion: "2.884.4",
31
- userAgent: "speakeasy-sdk/typescript 0.13.23 2.884.4 1.0.0 @openrouter/sdk",
31
+ userAgent: "speakeasy-sdk/typescript 0.13.24 2.884.4 1.0.0 @openrouter/sdk",
32
32
  };
33
33
  //# sourceMappingURL=config.js.map
@@ -347,6 +347,7 @@ export * from "./outputcustomtoolcallitem.js";
347
347
  export * from "./outputdatetimeitem.js";
348
348
  export * from "./outputfilesearchcallitem.js";
349
349
  export * from "./outputfilesearchservertoolitem.js";
350
+ export * from "./outputfilesservertoolitem.js";
350
351
  export * from "./outputfunctioncallitem.js";
351
352
  export * from "./outputfusionservertoolitem.js";
352
353
  export * from "./outputimagegenerationcallitem.js";
@@ -351,6 +351,7 @@ export * from "./outputcustomtoolcallitem.js";
351
351
  export * from "./outputdatetimeitem.js";
352
352
  export * from "./outputfilesearchcallitem.js";
353
353
  export * from "./outputfilesearchservertoolitem.js";
354
+ export * from "./outputfilesservertoolitem.js";
354
355
  export * from "./outputfunctioncallitem.js";
355
356
  export * from "./outputfusionservertoolitem.js";
356
357
  export * from "./outputimagegenerationcallitem.js";
@@ -28,6 +28,7 @@ import { OutputCustomToolCallItem, OutputCustomToolCallItem$Outbound } from "./o
28
28
  import { OutputDatetimeItem, OutputDatetimeItem$Outbound } from "./outputdatetimeitem.js";
29
29
  import { OutputFileSearchCallItem, OutputFileSearchCallItem$Outbound } from "./outputfilesearchcallitem.js";
30
30
  import { OutputFileSearchServerToolItem, OutputFileSearchServerToolItem$Outbound } from "./outputfilesearchservertoolitem.js";
31
+ import { OutputFilesServerToolItem, OutputFilesServerToolItem$Outbound } from "./outputfilesservertoolitem.js";
31
32
  import { OutputFunctionCallItem, OutputFunctionCallItem$Outbound } from "./outputfunctioncallitem.js";
32
33
  import { OutputFusionServerToolItem, OutputFusionServerToolItem$Outbound } from "./outputfusionservertoolitem.js";
33
34
  import { OutputImageGenerationCallItem, OutputImageGenerationCallItem$Outbound } from "./outputimagegenerationcallitem.js";
@@ -130,11 +131,11 @@ export type InputsMessage = {
130
131
  status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
131
132
  type: InputsTypeMessage;
132
133
  };
133
- export type InputsUnion1 = OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem;
134
+ export type InputsUnion1 = OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem;
134
135
  /**
135
136
  * Input for a response request - can be a string or array of items
136
137
  */
137
- export type InputsUnion = string | Array<OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem>;
138
+ export type InputsUnion = string | Array<OutputCodeInterpreterCallItem | FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | InputsMessage | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem>;
138
139
  /** @internal */
139
140
  export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
140
141
  /** @internal */
@@ -209,12 +210,12 @@ export type InputsMessage$Outbound = {
209
210
  export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
210
211
  export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
211
212
  /** @internal */
212
- export type InputsUnion1$Outbound = OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$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 | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound;
213
+ export type InputsUnion1$Outbound = OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$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 | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound;
213
214
  /** @internal */
214
215
  export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
215
216
  export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
216
217
  /** @internal */
217
- export type InputsUnion$Outbound = string | Array<OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$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 | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound>;
218
+ export type InputsUnion$Outbound = string | Array<OutputCodeInterpreterCallItem$Outbound | FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | InputsMessage$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$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 | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound>;
218
219
  /** @internal */
219
220
  export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
220
221
  export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
@@ -32,6 +32,7 @@ import { OutputCustomToolCallItem$outboundSchema, } from "./outputcustomtoolcall
32
32
  import { OutputDatetimeItem$outboundSchema, } from "./outputdatetimeitem.js";
33
33
  import { OutputFileSearchCallItem$outboundSchema, } from "./outputfilesearchcallitem.js";
34
34
  import { OutputFileSearchServerToolItem$outboundSchema, } from "./outputfilesearchservertoolitem.js";
35
+ import { OutputFilesServerToolItem$outboundSchema, } from "./outputfilesservertoolitem.js";
35
36
  import { OutputFunctionCallItem$outboundSchema, } from "./outputfunctioncallitem.js";
36
37
  import { OutputFusionServerToolItem$outboundSchema, } from "./outputfusionservertoolitem.js";
37
38
  import { OutputImageGenerationCallItem$outboundSchema, } from "./outputimagegenerationcallitem.js";
@@ -246,6 +247,7 @@ export const InputsUnion1$outboundSchema = z.union([
246
247
  OutputFusionServerToolItem$outboundSchema,
247
248
  OutputAdvisorServerToolItem$outboundSchema,
248
249
  OutputSubagentServerToolItem$outboundSchema,
250
+ OutputFilesServerToolItem$outboundSchema,
249
251
  CompactionItem$outboundSchema,
250
252
  ItemReferenceItem$outboundSchema,
251
253
  EasyInputMessage$outboundSchema,
@@ -299,6 +301,7 @@ export const InputsUnion$outboundSchema = z.union([
299
301
  OutputFusionServerToolItem$outboundSchema,
300
302
  OutputAdvisorServerToolItem$outboundSchema,
301
303
  OutputSubagentServerToolItem$outboundSchema,
304
+ OutputFilesServerToolItem$outboundSchema,
302
305
  CompactionItem$outboundSchema,
303
306
  ItemReferenceItem$outboundSchema,
304
307
  EasyInputMessage$outboundSchema,
@@ -0,0 +1,59 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { ToolCallStatus } from "./toolcallstatus.js";
6
+ export declare const OutputFilesServerToolItemType: {
7
+ readonly OpenrouterFiles: "openrouter:files";
8
+ };
9
+ export type OutputFilesServerToolItemType = ClosedEnum<typeof OutputFilesServerToolItemType>;
10
+ /**
11
+ * An openrouter:files server tool output item
12
+ */
13
+ export type OutputFilesServerToolItem = {
14
+ /**
15
+ * Error message when the file operation failed.
16
+ */
17
+ error?: string | undefined;
18
+ /**
19
+ * The target file id supplied in the tool-call arguments.
20
+ */
21
+ fileId?: string | undefined;
22
+ /**
23
+ * The target filename supplied in the tool-call arguments.
24
+ */
25
+ filename?: string | undefined;
26
+ id?: string | undefined;
27
+ /**
28
+ * The file operation performed (list, read, write, or edit).
29
+ */
30
+ operation?: string | undefined;
31
+ /**
32
+ * JSON-serialized result of the file operation.
33
+ */
34
+ result?: string | undefined;
35
+ status: ToolCallStatus;
36
+ type: OutputFilesServerToolItemType;
37
+ };
38
+ /** @internal */
39
+ export declare const OutputFilesServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputFilesServerToolItemType>;
40
+ /** @internal */
41
+ export declare const OutputFilesServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputFilesServerToolItemType>;
42
+ /** @internal */
43
+ export declare const OutputFilesServerToolItem$inboundSchema: z.ZodType<OutputFilesServerToolItem, unknown>;
44
+ /** @internal */
45
+ export type OutputFilesServerToolItem$Outbound = {
46
+ error?: string | undefined;
47
+ file_id?: string | undefined;
48
+ filename?: string | undefined;
49
+ id?: string | undefined;
50
+ operation?: string | undefined;
51
+ result?: string | undefined;
52
+ status: string;
53
+ type: string;
54
+ };
55
+ /** @internal */
56
+ export declare const OutputFilesServerToolItem$outboundSchema: z.ZodType<OutputFilesServerToolItem$Outbound, OutputFilesServerToolItem>;
57
+ export declare function outputFilesServerToolItemToJSON(outputFilesServerToolItem: OutputFilesServerToolItem): string;
58
+ export declare function outputFilesServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputFilesServerToolItem, SDKValidationError>;
59
+ //# sourceMappingURL=outputfilesservertoolitem.d.ts.map
@@ -0,0 +1,52 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 66f4fffdcaca
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
9
+ export const OutputFilesServerToolItemType = {
10
+ OpenrouterFiles: "openrouter:files",
11
+ };
12
+ /** @internal */
13
+ export const OutputFilesServerToolItemType$inboundSchema = z.enum(OutputFilesServerToolItemType);
14
+ /** @internal */
15
+ export const OutputFilesServerToolItemType$outboundSchema = OutputFilesServerToolItemType$inboundSchema;
16
+ /** @internal */
17
+ export const OutputFilesServerToolItem$inboundSchema = z.object({
18
+ error: z.string().optional(),
19
+ file_id: z.string().optional(),
20
+ filename: z.string().optional(),
21
+ id: z.string().optional(),
22
+ operation: z.string().optional(),
23
+ result: z.string().optional(),
24
+ status: ToolCallStatus$inboundSchema,
25
+ type: OutputFilesServerToolItemType$inboundSchema,
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "file_id": "fileId",
29
+ });
30
+ });
31
+ /** @internal */
32
+ export const OutputFilesServerToolItem$outboundSchema = z.object({
33
+ error: z.string().optional(),
34
+ fileId: z.string().optional(),
35
+ filename: z.string().optional(),
36
+ id: z.string().optional(),
37
+ operation: z.string().optional(),
38
+ result: z.string().optional(),
39
+ status: ToolCallStatus$outboundSchema,
40
+ type: OutputFilesServerToolItemType$outboundSchema,
41
+ }).transform((v) => {
42
+ return remap$(v, {
43
+ fileId: "file_id",
44
+ });
45
+ });
46
+ export function outputFilesServerToolItemToJSON(outputFilesServerToolItem) {
47
+ return JSON.stringify(OutputFilesServerToolItem$outboundSchema.parse(outputFilesServerToolItem));
48
+ }
49
+ export function outputFilesServerToolItemFromJSON(jsonString) {
50
+ return safeParse(jsonString, (x) => OutputFilesServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputFilesServerToolItem' from JSON`);
51
+ }
52
+ //# sourceMappingURL=outputfilesservertoolitem.js.map
@@ -14,6 +14,7 @@ import { OutputCustomToolCallItem } from "./outputcustomtoolcallitem.js";
14
14
  import { OutputDatetimeItem } from "./outputdatetimeitem.js";
15
15
  import { OutputFileSearchCallItem } from "./outputfilesearchcallitem.js";
16
16
  import { OutputFileSearchServerToolItem } from "./outputfilesearchservertoolitem.js";
17
+ import { OutputFilesServerToolItem } from "./outputfilesservertoolitem.js";
17
18
  import { OutputFunctionCallItem } from "./outputfunctioncallitem.js";
18
19
  import { OutputFusionServerToolItem } from "./outputfusionservertoolitem.js";
19
20
  import { OutputImageGenerationCallItem } from "./outputimagegenerationcallitem.js";
@@ -62,6 +63,8 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
62
63
  type: "openrouter:experimental__search_models";
63
64
  }) | (OutputFileSearchServerToolItem & {
64
65
  type: "openrouter:file_search";
66
+ }) | (OutputFilesServerToolItem & {
67
+ type: "openrouter:files";
65
68
  }) | (OutputFusionServerToolItem & {
66
69
  type: "openrouter:fusion";
67
70
  }) | (OutputImageGenerationServerToolItem & {
@@ -17,6 +17,7 @@ import { OutputCustomToolCallItem$inboundSchema, } from "./outputcustomtoolcalli
17
17
  import { OutputDatetimeItem$inboundSchema, } from "./outputdatetimeitem.js";
18
18
  import { OutputFileSearchCallItem$inboundSchema, } from "./outputfilesearchcallitem.js";
19
19
  import { OutputFileSearchServerToolItem$inboundSchema, } from "./outputfilesearchservertoolitem.js";
20
+ import { OutputFilesServerToolItem$inboundSchema, } from "./outputfilesservertoolitem.js";
20
21
  import { OutputFunctionCallItem$inboundSchema, } from "./outputfunctioncallitem.js";
21
22
  import { OutputFusionServerToolItem$inboundSchema, } from "./outputfusionservertoolitem.js";
22
23
  import { OutputImageGenerationCallItem$inboundSchema, } from "./outputimagegenerationcallitem.js";
@@ -55,6 +56,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
55
56
  ["openrouter:experimental__search_models"]: OutputSearchModelsServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
56
57
  ["openrouter:file_search"]: OutputFileSearchServerToolItem$inboundSchema
57
58
  .and(z.object({ type: z.literal("openrouter:file_search") })),
59
+ ["openrouter:files"]: OutputFilesServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:files") })),
58
60
  ["openrouter:fusion"]: OutputFusionServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:fusion") })),
59
61
  ["openrouter:image_generation"]: OutputImageGenerationServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
60
62
  ["openrouter:mcp"]: OutputMcpServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:mcp") })),
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "0.13.23",
5
+ "version": "0.13.24",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "0.13.23",
3
+ "version": "0.13.24",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
6
6
  "keywords": [
@@ -21,8 +21,8 @@
21
21
  "license": "Apache-2.0",
22
22
  "packageManager": "pnpm@10.22.0",
23
23
  "publishConfig": {
24
- "provenance": true,
25
- "access": "public"
24
+ "access": "public",
25
+ "provenance": true
26
26
  },
27
27
  "type": "module",
28
28
  "main": "./esm/index.js",
@@ -73,15 +73,15 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
- "test": "vitest --run --project unit",
77
- "postinstall": "node scripts/check-types.js || true",
78
76
  "prepare": "npm run build",
79
- "test:e2e": "vitest --run --project e2e",
77
+ "test": "vitest --run --project unit",
80
78
  "test:transit": "exit 0",
81
79
  "test:watch": "vitest --watch --project unit",
82
80
  "typecheck": "tsc --noEmit",
83
81
  "typecheck:transit": "exit 0",
84
- "compile": "tsc"
82
+ "compile": "tsc",
83
+ "postinstall": "node scripts/check-types.js || true",
84
+ "test:e2e": "vitest --run --project e2e"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {