@openrouter/sdk 0.12.20 → 0.12.22

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 (66) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/chatusage.d.ts +13 -0
  4. package/esm/models/chatusage.js +6 -0
  5. package/esm/models/costdetails.d.ts +15 -0
  6. package/esm/models/costdetails.js +24 -0
  7. package/esm/models/createworkspacerequest.d.ts +10 -0
  8. package/esm/models/createworkspacerequest.js +4 -0
  9. package/esm/models/generationresponse.d.ts +5 -0
  10. package/esm/models/generationresponse.js +3 -0
  11. package/esm/models/index.d.ts +1 -0
  12. package/esm/models/index.js +1 -0
  13. package/esm/models/inputsunion.d.ts +18 -4
  14. package/esm/models/inputsunion.js +42 -0
  15. package/esm/models/outputapplypatchservertoolitem.d.ts +21 -1
  16. package/esm/models/outputapplypatchservertoolitem.js +20 -2
  17. package/esm/models/outputbashservertoolitem.d.ts +23 -1
  18. package/esm/models/outputbashservertoolitem.js +22 -2
  19. package/esm/models/outputbrowseruseservertoolitem.d.ts +21 -1
  20. package/esm/models/outputbrowseruseservertoolitem.js +20 -2
  21. package/esm/models/outputcodeinterpretercallitem.d.ts +43 -1
  22. package/esm/models/outputcodeinterpretercallitem.js +52 -2
  23. package/esm/models/outputcodeinterpreterservertoolitem.d.ts +24 -1
  24. package/esm/models/outputcodeinterpreterservertoolitem.js +23 -2
  25. package/esm/models/outputcomputercallitem.d.ts +33 -2
  26. package/esm/models/outputcomputercallitem.js +36 -1
  27. package/esm/models/outputfilesearchservertoolitem.d.ts +20 -1
  28. package/esm/models/outputfilesearchservertoolitem.js +19 -2
  29. package/esm/models/outputimagegenerationservertoolitem.d.ts +23 -1
  30. package/esm/models/outputimagegenerationservertoolitem.js +22 -2
  31. package/esm/models/outputitems.d.ts +31 -3
  32. package/esm/models/outputitems.js +19 -14
  33. package/esm/models/outputmcpservertoolitem.d.ts +21 -1
  34. package/esm/models/outputmcpservertoolitem.js +20 -2
  35. package/esm/models/outputmemoryservertoolitem.d.ts +24 -2
  36. package/esm/models/outputmemoryservertoolitem.js +23 -2
  37. package/esm/models/outputmodality.d.ts +1 -0
  38. package/esm/models/outputmodality.js +1 -0
  39. package/esm/models/outputsearchmodelsservertoolitem.d.ts +21 -1
  40. package/esm/models/outputsearchmodelsservertoolitem.js +20 -2
  41. package/esm/models/outputtexteditorservertoolitem.d.ts +23 -2
  42. package/esm/models/outputtexteditorservertoolitem.js +23 -2
  43. package/esm/models/outputtoolsearchservertoolitem.d.ts +20 -1
  44. package/esm/models/outputtoolsearchservertoolitem.js +19 -2
  45. package/esm/models/outputwebfetchservertoolitem.d.ts +22 -1
  46. package/esm/models/outputwebfetchservertoolitem.js +21 -2
  47. package/esm/models/providername.d.ts +1 -0
  48. package/esm/models/providername.js +1 -0
  49. package/esm/models/providerresponse.d.ts +1 -0
  50. package/esm/models/providerresponse.js +1 -0
  51. package/esm/models/speechrequest.d.ts +6 -0
  52. package/esm/models/speechrequest.js +1 -0
  53. package/esm/models/updateworkspacerequest.d.ts +10 -0
  54. package/esm/models/updateworkspacerequest.js +4 -0
  55. package/esm/models/usage.d.ts +4 -4
  56. package/esm/models/usage.js +4 -5
  57. package/esm/models/videogenerationrequest.d.ts +11 -0
  58. package/esm/models/videogenerationrequest.js +3 -0
  59. package/esm/models/websearchplugin.d.ts +35 -0
  60. package/esm/models/websearchplugin.js +21 -0
  61. package/esm/models/websearchuserlocationservertool.d.ts +8 -8
  62. package/esm/models/websearchuserlocationservertool.js +4 -4
  63. package/esm/models/workspace.d.ts +8 -0
  64. package/esm/models/workspace.js +4 -0
  65. package/jsr.json +1 -1
  66. package/package.json +5 -5
@@ -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 OutputMcpServerToolItemType: {
7
+ readonly OpenrouterMcp: "openrouter:mcp";
8
+ };
9
+ export type OutputMcpServerToolItemType = ClosedEnum<typeof OutputMcpServerToolItemType>;
5
10
  /**
6
11
  * An openrouter:mcp server tool output item
7
12
  */
@@ -10,9 +15,24 @@ export type OutputMcpServerToolItem = {
10
15
  serverLabel?: string | undefined;
11
16
  status: ToolCallStatus;
12
17
  toolName?: string | undefined;
13
- type: "openrouter:mcp";
18
+ type: OutputMcpServerToolItemType;
14
19
  };
15
20
  /** @internal */
21
+ export declare const OutputMcpServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputMcpServerToolItemType>;
22
+ /** @internal */
23
+ export declare const OutputMcpServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputMcpServerToolItemType>;
24
+ /** @internal */
16
25
  export declare const OutputMcpServerToolItem$inboundSchema: z.ZodType<OutputMcpServerToolItem, unknown>;
26
+ /** @internal */
27
+ export type OutputMcpServerToolItem$Outbound = {
28
+ id?: string | undefined;
29
+ serverLabel?: string | undefined;
30
+ status: string;
31
+ toolName?: string | undefined;
32
+ type: string;
33
+ };
34
+ /** @internal */
35
+ export declare const OutputMcpServerToolItem$outboundSchema: z.ZodType<OutputMcpServerToolItem$Outbound, OutputMcpServerToolItem>;
36
+ export declare function outputMcpServerToolItemToJSON(outputMcpServerToolItem: OutputMcpServerToolItem): string;
17
37
  export declare function outputMcpServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputMcpServerToolItem, SDKValidationError>;
18
38
  //# sourceMappingURL=outputmcpservertoolitem.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 OutputMcpServerToolItemType = {
9
+ OpenrouterMcp: "openrouter:mcp",
10
+ };
11
+ /** @internal */
12
+ export const OutputMcpServerToolItemType$inboundSchema = z.enum(OutputMcpServerToolItemType);
13
+ /** @internal */
14
+ export const OutputMcpServerToolItemType$outboundSchema = OutputMcpServerToolItemType$inboundSchema;
8
15
  /** @internal */
9
16
  export const OutputMcpServerToolItem$inboundSchema = z.object({
10
17
  id: z.string().optional(),
11
18
  serverLabel: z.string().optional(),
12
19
  status: ToolCallStatus$inboundSchema,
13
20
  toolName: z.string().optional(),
14
- type: z.literal("openrouter:mcp"),
21
+ type: OutputMcpServerToolItemType$inboundSchema,
22
+ });
23
+ /** @internal */
24
+ export const OutputMcpServerToolItem$outboundSchema = z.object({
25
+ id: z.string().optional(),
26
+ serverLabel: z.string().optional(),
27
+ status: ToolCallStatus$outboundSchema,
28
+ toolName: z.string().optional(),
29
+ type: OutputMcpServerToolItemType$outboundSchema,
15
30
  });
31
+ export function outputMcpServerToolItemToJSON(outputMcpServerToolItem) {
32
+ return JSON.stringify(OutputMcpServerToolItem$outboundSchema.parse(outputMcpServerToolItem));
33
+ }
16
34
  export function outputMcpServerToolItemFromJSON(jsonString) {
17
35
  return safeParse(jsonString, (x) => OutputMcpServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputMcpServerToolItem' from JSON`);
18
36
  }
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
5
  import { ToolCallStatus } from "./toolcallstatus.js";
@@ -9,6 +9,10 @@ export declare const ActionEnum: {
9
9
  readonly Delete: "delete";
10
10
  };
11
11
  export type ActionEnum = OpenEnum<typeof ActionEnum>;
12
+ export declare const OutputMemoryServerToolItemType: {
13
+ readonly OpenrouterMemory: "openrouter:memory";
14
+ };
15
+ export type OutputMemoryServerToolItemType = ClosedEnum<typeof OutputMemoryServerToolItemType>;
12
16
  /**
13
17
  * An openrouter:memory server tool output item
14
18
  */
@@ -17,12 +21,30 @@ export type OutputMemoryServerToolItem = {
17
21
  id?: string | undefined;
18
22
  key?: string | undefined;
19
23
  status: ToolCallStatus;
20
- type: "openrouter:memory";
24
+ type: OutputMemoryServerToolItemType;
21
25
  value?: any | null | undefined;
22
26
  };
23
27
  /** @internal */
24
28
  export declare const ActionEnum$inboundSchema: z.ZodType<ActionEnum, unknown>;
25
29
  /** @internal */
30
+ export declare const ActionEnum$outboundSchema: z.ZodType<string, ActionEnum>;
31
+ /** @internal */
32
+ export declare const OutputMemoryServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputMemoryServerToolItemType>;
33
+ /** @internal */
34
+ export declare const OutputMemoryServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputMemoryServerToolItemType>;
35
+ /** @internal */
26
36
  export declare const OutputMemoryServerToolItem$inboundSchema: z.ZodType<OutputMemoryServerToolItem, unknown>;
37
+ /** @internal */
38
+ export type OutputMemoryServerToolItem$Outbound = {
39
+ action?: string | undefined;
40
+ id?: string | undefined;
41
+ key?: string | undefined;
42
+ status: string;
43
+ type: string;
44
+ value?: any | null | undefined;
45
+ };
46
+ /** @internal */
47
+ export declare const OutputMemoryServerToolItem$outboundSchema: z.ZodType<OutputMemoryServerToolItem$Outbound, OutputMemoryServerToolItem>;
48
+ export declare function outputMemoryServerToolItemToJSON(outputMemoryServerToolItem: OutputMemoryServerToolItem): string;
27
49
  export declare function outputMemoryServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputMemoryServerToolItem, SDKValidationError>;
28
50
  //# sourceMappingURL=outputmemoryservertoolitem.d.ts.map
@@ -5,23 +5,44 @@
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import * as openEnums from "../types/enums.js";
8
- import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
8
+ import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
9
9
  export const ActionEnum = {
10
10
  Read: "read",
11
11
  Write: "write",
12
12
  Delete: "delete",
13
13
  };
14
+ export const OutputMemoryServerToolItemType = {
15
+ OpenrouterMemory: "openrouter:memory",
16
+ };
14
17
  /** @internal */
15
18
  export const ActionEnum$inboundSchema = openEnums.inboundSchema(ActionEnum);
16
19
  /** @internal */
20
+ export const ActionEnum$outboundSchema = openEnums.outboundSchema(ActionEnum);
21
+ /** @internal */
22
+ export const OutputMemoryServerToolItemType$inboundSchema = z.enum(OutputMemoryServerToolItemType);
23
+ /** @internal */
24
+ export const OutputMemoryServerToolItemType$outboundSchema = OutputMemoryServerToolItemType$inboundSchema;
25
+ /** @internal */
17
26
  export const OutputMemoryServerToolItem$inboundSchema = z.object({
18
27
  action: ActionEnum$inboundSchema.optional(),
19
28
  id: z.string().optional(),
20
29
  key: z.string().optional(),
21
30
  status: ToolCallStatus$inboundSchema,
22
- type: z.literal("openrouter:memory"),
31
+ type: OutputMemoryServerToolItemType$inboundSchema,
32
+ value: z.nullable(z.any()).optional(),
33
+ });
34
+ /** @internal */
35
+ export const OutputMemoryServerToolItem$outboundSchema = z.object({
36
+ action: ActionEnum$outboundSchema.optional(),
37
+ id: z.string().optional(),
38
+ key: z.string().optional(),
39
+ status: ToolCallStatus$outboundSchema,
40
+ type: OutputMemoryServerToolItemType$outboundSchema,
23
41
  value: z.nullable(z.any()).optional(),
24
42
  });
43
+ export function outputMemoryServerToolItemToJSON(outputMemoryServerToolItem) {
44
+ return JSON.stringify(OutputMemoryServerToolItem$outboundSchema.parse(outputMemoryServerToolItem));
45
+ }
25
46
  export function outputMemoryServerToolItemFromJSON(jsonString) {
26
47
  return safeParse(jsonString, (x) => OutputMemoryServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputMemoryServerToolItem' from JSON`);
27
48
  }
@@ -8,6 +8,7 @@ export declare const OutputModality: {
8
8
  readonly Video: "video";
9
9
  readonly Rerank: "rerank";
10
10
  readonly Speech: "speech";
11
+ readonly Transcription: "transcription";
11
12
  };
12
13
  export type OutputModality = OpenEnum<typeof OutputModality>;
13
14
  /** @internal */
@@ -11,6 +11,7 @@ export const OutputModality = {
11
11
  Video: "video",
12
12
  Rerank: "rerank",
13
13
  Speech: "speech",
14
+ Transcription: "transcription",
14
15
  };
15
16
  /** @internal */
16
17
  export const OutputModality$inboundSchema = openEnums.inboundSchema(OutputModality);
@@ -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 OutputSearchModelsServerToolItemType: {
7
+ readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
8
+ };
9
+ export type OutputSearchModelsServerToolItemType = ClosedEnum<typeof OutputSearchModelsServerToolItemType>;
5
10
  /**
6
11
  * An openrouter:experimental__search_models server tool output item
7
12
  */
@@ -13,9 +18,24 @@ export type OutputSearchModelsServerToolItem = {
13
18
  id?: string | undefined;
14
19
  query?: string | undefined;
15
20
  status: ToolCallStatus;
16
- type: "openrouter:experimental__search_models";
21
+ type: OutputSearchModelsServerToolItemType;
17
22
  };
18
23
  /** @internal */
24
+ export declare const OutputSearchModelsServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputSearchModelsServerToolItemType>;
25
+ /** @internal */
26
+ export declare const OutputSearchModelsServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputSearchModelsServerToolItemType>;
27
+ /** @internal */
19
28
  export declare const OutputSearchModelsServerToolItem$inboundSchema: z.ZodType<OutputSearchModelsServerToolItem, unknown>;
29
+ /** @internal */
30
+ export type OutputSearchModelsServerToolItem$Outbound = {
31
+ arguments?: string | undefined;
32
+ id?: string | undefined;
33
+ query?: string | undefined;
34
+ status: string;
35
+ type: string;
36
+ };
37
+ /** @internal */
38
+ export declare const OutputSearchModelsServerToolItem$outboundSchema: z.ZodType<OutputSearchModelsServerToolItem$Outbound, OutputSearchModelsServerToolItem>;
39
+ export declare function outputSearchModelsServerToolItemToJSON(outputSearchModelsServerToolItem: OutputSearchModelsServerToolItem): string;
20
40
  export declare function outputSearchModelsServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputSearchModelsServerToolItem, SDKValidationError>;
21
41
  //# sourceMappingURL=outputsearchmodelsservertoolitem.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 OutputSearchModelsServerToolItemType = {
9
+ OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
10
+ };
11
+ /** @internal */
12
+ export const OutputSearchModelsServerToolItemType$inboundSchema = z.enum(OutputSearchModelsServerToolItemType);
13
+ /** @internal */
14
+ export const OutputSearchModelsServerToolItemType$outboundSchema = OutputSearchModelsServerToolItemType$inboundSchema;
8
15
  /** @internal */
9
16
  export const OutputSearchModelsServerToolItem$inboundSchema = z.object({
10
17
  arguments: z.string().optional(),
11
18
  id: z.string().optional(),
12
19
  query: z.string().optional(),
13
20
  status: ToolCallStatus$inboundSchema,
14
- type: z.literal("openrouter:experimental__search_models"),
21
+ type: OutputSearchModelsServerToolItemType$inboundSchema,
22
+ });
23
+ /** @internal */
24
+ export const OutputSearchModelsServerToolItem$outboundSchema = z.object({
25
+ arguments: z.string().optional(),
26
+ id: z.string().optional(),
27
+ query: z.string().optional(),
28
+ status: ToolCallStatus$outboundSchema,
29
+ type: OutputSearchModelsServerToolItemType$outboundSchema,
15
30
  });
31
+ export function outputSearchModelsServerToolItemToJSON(outputSearchModelsServerToolItem) {
32
+ return JSON.stringify(OutputSearchModelsServerToolItem$outboundSchema.parse(outputSearchModelsServerToolItem));
33
+ }
16
34
  export function outputSearchModelsServerToolItemFromJSON(jsonString) {
17
35
  return safeParse(jsonString, (x) => OutputSearchModelsServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputSearchModelsServerToolItem' from JSON`);
18
36
  }
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
5
  import { ToolCallStatus } from "./toolcallstatus.js";
@@ -10,6 +10,10 @@ export declare const Command: {
10
10
  readonly Insert: "insert";
11
11
  };
12
12
  export type Command = OpenEnum<typeof Command>;
13
+ export declare const OutputTextEditorServerToolItemType: {
14
+ readonly OpenrouterTextEditor: "openrouter:text_editor";
15
+ };
16
+ export type OutputTextEditorServerToolItemType = ClosedEnum<typeof OutputTextEditorServerToolItemType>;
13
17
  /**
14
18
  * An openrouter:text_editor server tool output item
15
19
  */
@@ -18,11 +22,28 @@ export type OutputTextEditorServerToolItem = {
18
22
  filePath?: string | undefined;
19
23
  id?: string | undefined;
20
24
  status: ToolCallStatus;
21
- type: "openrouter:text_editor";
25
+ type: OutputTextEditorServerToolItemType;
22
26
  };
23
27
  /** @internal */
24
28
  export declare const Command$inboundSchema: z.ZodType<Command, unknown>;
25
29
  /** @internal */
30
+ export declare const Command$outboundSchema: z.ZodType<string, Command>;
31
+ /** @internal */
32
+ export declare const OutputTextEditorServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputTextEditorServerToolItemType>;
33
+ /** @internal */
34
+ export declare const OutputTextEditorServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputTextEditorServerToolItemType>;
35
+ /** @internal */
26
36
  export declare const OutputTextEditorServerToolItem$inboundSchema: z.ZodType<OutputTextEditorServerToolItem, unknown>;
37
+ /** @internal */
38
+ export type OutputTextEditorServerToolItem$Outbound = {
39
+ command?: string | undefined;
40
+ filePath?: string | undefined;
41
+ id?: string | undefined;
42
+ status: string;
43
+ type: string;
44
+ };
45
+ /** @internal */
46
+ export declare const OutputTextEditorServerToolItem$outboundSchema: z.ZodType<OutputTextEditorServerToolItem$Outbound, OutputTextEditorServerToolItem>;
47
+ export declare function outputTextEditorServerToolItemToJSON(outputTextEditorServerToolItem: OutputTextEditorServerToolItem): string;
27
48
  export declare function outputTextEditorServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputTextEditorServerToolItem, SDKValidationError>;
28
49
  //# sourceMappingURL=outputtexteditorservertoolitem.d.ts.map
@@ -5,24 +5,45 @@
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import * as openEnums from "../types/enums.js";
8
- import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
8
+ import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
9
9
  export const Command = {
10
10
  View: "view",
11
11
  Create: "create",
12
12
  StrReplace: "str_replace",
13
13
  Insert: "insert",
14
14
  };
15
+ export const OutputTextEditorServerToolItemType = {
16
+ OpenrouterTextEditor: "openrouter:text_editor",
17
+ };
15
18
  /** @internal */
16
19
  export const Command$inboundSchema = openEnums
17
20
  .inboundSchema(Command);
18
21
  /** @internal */
22
+ export const Command$outboundSchema = openEnums
23
+ .outboundSchema(Command);
24
+ /** @internal */
25
+ export const OutputTextEditorServerToolItemType$inboundSchema = z.enum(OutputTextEditorServerToolItemType);
26
+ /** @internal */
27
+ export const OutputTextEditorServerToolItemType$outboundSchema = OutputTextEditorServerToolItemType$inboundSchema;
28
+ /** @internal */
19
29
  export const OutputTextEditorServerToolItem$inboundSchema = z.object({
20
30
  command: Command$inboundSchema.optional(),
21
31
  filePath: z.string().optional(),
22
32
  id: z.string().optional(),
23
33
  status: ToolCallStatus$inboundSchema,
24
- type: z.literal("openrouter:text_editor"),
34
+ type: OutputTextEditorServerToolItemType$inboundSchema,
25
35
  });
36
+ /** @internal */
37
+ export const OutputTextEditorServerToolItem$outboundSchema = z.object({
38
+ command: Command$outboundSchema.optional(),
39
+ filePath: z.string().optional(),
40
+ id: z.string().optional(),
41
+ status: ToolCallStatus$outboundSchema,
42
+ type: OutputTextEditorServerToolItemType$outboundSchema,
43
+ });
44
+ export function outputTextEditorServerToolItemToJSON(outputTextEditorServerToolItem) {
45
+ return JSON.stringify(OutputTextEditorServerToolItem$outboundSchema.parse(outputTextEditorServerToolItem));
46
+ }
26
47
  export function outputTextEditorServerToolItemFromJSON(jsonString) {
27
48
  return safeParse(jsonString, (x) => OutputTextEditorServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputTextEditorServerToolItem' from JSON`);
28
49
  }
@@ -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 OutputToolSearchServerToolItemType: {
7
+ readonly OpenrouterToolSearch: "openrouter:tool_search";
8
+ };
9
+ export type OutputToolSearchServerToolItemType = ClosedEnum<typeof OutputToolSearchServerToolItemType>;
5
10
  /**
6
11
  * An openrouter:tool_search server tool output item
7
12
  */
@@ -9,9 +14,23 @@ export type OutputToolSearchServerToolItem = {
9
14
  id?: string | undefined;
10
15
  query?: string | undefined;
11
16
  status: ToolCallStatus;
12
- type: "openrouter:tool_search";
17
+ type: OutputToolSearchServerToolItemType;
13
18
  };
14
19
  /** @internal */
20
+ export declare const OutputToolSearchServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputToolSearchServerToolItemType>;
21
+ /** @internal */
22
+ export declare const OutputToolSearchServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputToolSearchServerToolItemType>;
23
+ /** @internal */
15
24
  export declare const OutputToolSearchServerToolItem$inboundSchema: z.ZodType<OutputToolSearchServerToolItem, unknown>;
25
+ /** @internal */
26
+ export type OutputToolSearchServerToolItem$Outbound = {
27
+ id?: string | undefined;
28
+ query?: string | undefined;
29
+ status: string;
30
+ type: string;
31
+ };
32
+ /** @internal */
33
+ export declare const OutputToolSearchServerToolItem$outboundSchema: z.ZodType<OutputToolSearchServerToolItem$Outbound, OutputToolSearchServerToolItem>;
34
+ export declare function outputToolSearchServerToolItemToJSON(outputToolSearchServerToolItem: OutputToolSearchServerToolItem): string;
16
35
  export declare function outputToolSearchServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputToolSearchServerToolItem, SDKValidationError>;
17
36
  //# sourceMappingURL=outputtoolsearchservertoolitem.d.ts.map
@@ -4,14 +4,31 @@
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 OutputToolSearchServerToolItemType = {
9
+ OpenrouterToolSearch: "openrouter:tool_search",
10
+ };
11
+ /** @internal */
12
+ export const OutputToolSearchServerToolItemType$inboundSchema = z.enum(OutputToolSearchServerToolItemType);
13
+ /** @internal */
14
+ export const OutputToolSearchServerToolItemType$outboundSchema = OutputToolSearchServerToolItemType$inboundSchema;
8
15
  /** @internal */
9
16
  export const OutputToolSearchServerToolItem$inboundSchema = z.object({
10
17
  id: z.string().optional(),
11
18
  query: z.string().optional(),
12
19
  status: ToolCallStatus$inboundSchema,
13
- type: z.literal("openrouter:tool_search"),
20
+ type: OutputToolSearchServerToolItemType$inboundSchema,
14
21
  });
22
+ /** @internal */
23
+ export const OutputToolSearchServerToolItem$outboundSchema = z.object({
24
+ id: z.string().optional(),
25
+ query: z.string().optional(),
26
+ status: ToolCallStatus$outboundSchema,
27
+ type: OutputToolSearchServerToolItemType$outboundSchema,
28
+ });
29
+ export function outputToolSearchServerToolItemToJSON(outputToolSearchServerToolItem) {
30
+ return JSON.stringify(OutputToolSearchServerToolItem$outboundSchema.parse(outputToolSearchServerToolItem));
31
+ }
15
32
  export function outputToolSearchServerToolItemFromJSON(jsonString) {
16
33
  return safeParse(jsonString, (x) => OutputToolSearchServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputToolSearchServerToolItem' from JSON`);
17
34
  }
@@ -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 OutputWebFetchServerToolItemType: {
7
+ readonly OpenrouterWebFetch: "openrouter:web_fetch";
8
+ };
9
+ export type OutputWebFetchServerToolItemType = ClosedEnum<typeof OutputWebFetchServerToolItemType>;
5
10
  /**
6
11
  * An openrouter:web_fetch server tool output item
7
12
  */
@@ -10,10 +15,26 @@ export type OutputWebFetchServerToolItem = {
10
15
  id?: string | undefined;
11
16
  status: ToolCallStatus;
12
17
  title?: string | undefined;
13
- type: "openrouter:web_fetch";
18
+ type: OutputWebFetchServerToolItemType;
14
19
  url?: string | undefined;
15
20
  };
16
21
  /** @internal */
22
+ export declare const OutputWebFetchServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputWebFetchServerToolItemType>;
23
+ /** @internal */
24
+ export declare const OutputWebFetchServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputWebFetchServerToolItemType>;
25
+ /** @internal */
17
26
  export declare const OutputWebFetchServerToolItem$inboundSchema: z.ZodType<OutputWebFetchServerToolItem, unknown>;
27
+ /** @internal */
28
+ export type OutputWebFetchServerToolItem$Outbound = {
29
+ content?: string | undefined;
30
+ id?: string | undefined;
31
+ status: string;
32
+ title?: string | undefined;
33
+ type: string;
34
+ url?: string | undefined;
35
+ };
36
+ /** @internal */
37
+ export declare const OutputWebFetchServerToolItem$outboundSchema: z.ZodType<OutputWebFetchServerToolItem$Outbound, OutputWebFetchServerToolItem>;
38
+ export declare function outputWebFetchServerToolItemToJSON(outputWebFetchServerToolItem: OutputWebFetchServerToolItem): string;
18
39
  export declare function outputWebFetchServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputWebFetchServerToolItem, SDKValidationError>;
19
40
  //# sourceMappingURL=outputwebfetchservertoolitem.d.ts.map
@@ -4,16 +4,35 @@
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 OutputWebFetchServerToolItemType = {
9
+ OpenrouterWebFetch: "openrouter:web_fetch",
10
+ };
11
+ /** @internal */
12
+ export const OutputWebFetchServerToolItemType$inboundSchema = z.enum(OutputWebFetchServerToolItemType);
13
+ /** @internal */
14
+ export const OutputWebFetchServerToolItemType$outboundSchema = OutputWebFetchServerToolItemType$inboundSchema;
8
15
  /** @internal */
9
16
  export const OutputWebFetchServerToolItem$inboundSchema = z.object({
10
17
  content: z.string().optional(),
11
18
  id: z.string().optional(),
12
19
  status: ToolCallStatus$inboundSchema,
13
20
  title: z.string().optional(),
14
- type: z.literal("openrouter:web_fetch"),
21
+ type: OutputWebFetchServerToolItemType$inboundSchema,
15
22
  url: z.string().optional(),
16
23
  });
24
+ /** @internal */
25
+ export const OutputWebFetchServerToolItem$outboundSchema = z.object({
26
+ content: z.string().optional(),
27
+ id: z.string().optional(),
28
+ status: ToolCallStatus$outboundSchema,
29
+ title: z.string().optional(),
30
+ type: OutputWebFetchServerToolItemType$outboundSchema,
31
+ url: z.string().optional(),
32
+ });
33
+ export function outputWebFetchServerToolItemToJSON(outputWebFetchServerToolItem) {
34
+ return JSON.stringify(OutputWebFetchServerToolItem$outboundSchema.parse(outputWebFetchServerToolItem));
35
+ }
17
36
  export function outputWebFetchServerToolItemFromJSON(jsonString) {
18
37
  return safeParse(jsonString, (x) => OutputWebFetchServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputWebFetchServerToolItem' from JSON`);
19
38
  }
@@ -60,6 +60,7 @@ export declare const ProviderName: {
60
60
  readonly OpenAI: "OpenAI";
61
61
  readonly OpenInference: "OpenInference";
62
62
  readonly Parasail: "Parasail";
63
+ readonly Poolside: "Poolside";
63
64
  readonly Perplexity: "Perplexity";
64
65
  readonly Phala: "Phala";
65
66
  readonly Recraft: "Recraft";
@@ -63,6 +63,7 @@ export const ProviderName = {
63
63
  OpenAI: "OpenAI",
64
64
  OpenInference: "OpenInference",
65
65
  Parasail: "Parasail",
66
+ Poolside: "Poolside",
66
67
  Perplexity: "Perplexity",
67
68
  Phala: "Phala",
68
69
  Recraft: "Recraft",
@@ -93,6 +93,7 @@ export declare const ProviderResponseProviderName: {
93
93
  readonly OpenAI: "OpenAI";
94
94
  readonly OpenInference: "OpenInference";
95
95
  readonly Parasail: "Parasail";
96
+ readonly Poolside: "Poolside";
96
97
  readonly Perplexity: "Perplexity";
97
98
  readonly Phala: "Phala";
98
99
  readonly Recraft: "Recraft";
@@ -97,6 +97,7 @@ export const ProviderResponseProviderName = {
97
97
  OpenAI: "OpenAI",
98
98
  OpenInference: "OpenInference",
99
99
  Parasail: "Parasail",
100
+ Poolside: "Poolside",
100
101
  Perplexity: "Perplexity",
101
102
  Phala: "Phala",
102
103
  Recraft: "Recraft",
@@ -250,6 +250,9 @@ export type SpeechRequestOptions = {
250
250
  phala?: {
251
251
  [k: string]: any | null;
252
252
  } | undefined;
253
+ poolside?: {
254
+ [k: string]: any | null;
255
+ } | undefined;
253
256
  recraft?: {
254
257
  [k: string]: any | null;
255
258
  } | undefined;
@@ -626,6 +629,9 @@ export type SpeechRequestOptions$Outbound = {
626
629
  phala?: {
627
630
  [k: string]: any | null;
628
631
  } | undefined;
632
+ poolside?: {
633
+ [k: string]: any | null;
634
+ } | undefined;
629
635
  recraft?: {
630
636
  [k: string]: any | null;
631
637
  } | undefined;
@@ -96,6 +96,7 @@ export const SpeechRequestOptions$outboundSchema = z.object({
96
96
  parasail: z.record(z.string(), z.nullable(z.any())).optional(),
97
97
  perplexity: z.record(z.string(), z.nullable(z.any())).optional(),
98
98
  phala: z.record(z.string(), z.nullable(z.any())).optional(),
99
+ poolside: z.record(z.string(), z.nullable(z.any())).optional(),
99
100
  recraft: z.record(z.string(), z.nullable(z.any())).optional(),
100
101
  recursal: z.record(z.string(), z.nullable(z.any())).optional(),
101
102
  reflection: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -16,6 +16,14 @@ export type UpdateWorkspaceRequest = {
16
16
  * New description for 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 UpdateWorkspaceRequest$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 UpdateWorkspaceRequest$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 UpdateWorkspaceRequest$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",