@openrouter/sdk 0.1.10 → 0.1.13

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 (98) hide show
  1. package/esm/lib/config.d.ts +3 -3
  2. package/esm/lib/config.js +3 -3
  3. package/esm/models/chatgenerationparams.d.ts +2 -1
  4. package/esm/models/chatgenerationparams.js +4 -4
  5. package/esm/models/chatmessagecontentitem.d.ts +4 -0
  6. package/esm/models/chatmessagecontentitem.js +2 -0
  7. package/esm/models/chatmessagecontentitemaudio.d.ts +1 -1
  8. package/esm/models/chatmessagecontentitemaudio.js +3 -10
  9. package/esm/models/chatmessagecontentitemimage.d.ts +1 -1
  10. package/esm/models/chatmessagecontentitemimage.js +3 -10
  11. package/esm/models/chatmessagecontentitemvideo.d.ts +48 -11
  12. package/esm/models/chatmessagecontentitemvideo.js +64 -11
  13. package/esm/models/chatresponsechoice.d.ts +21 -1
  14. package/esm/models/chatresponsechoice.js +25 -1
  15. package/esm/models/chatstreamingresponsechunk.d.ts +1 -1
  16. package/esm/models/chatstreamingresponsechunk.js +1 -1
  17. package/esm/models/completionchoice.js +2 -6
  18. package/esm/models/createchargerequest.d.ts +1 -1
  19. package/esm/models/createchargerequest.js +3 -4
  20. package/esm/models/datacollection.d.ts +26 -0
  21. package/esm/models/datacollection.js +19 -0
  22. package/esm/models/endpointstatus.js +2 -7
  23. package/esm/models/imagegenerationstatus.d.ts +1 -1
  24. package/esm/models/imagegenerationstatus.js +3 -11
  25. package/esm/models/index.d.ts +2 -2
  26. package/esm/models/index.js +2 -2
  27. package/esm/models/inputmodality.js +2 -7
  28. package/esm/models/instructtype.js +2 -7
  29. package/esm/models/listendpointsresponse.js +3 -6
  30. package/esm/models/modelarchitecture.js +2 -6
  31. package/esm/models/modelgroup.js +2 -7
  32. package/esm/models/openairesponsesincludable.d.ts +1 -1
  33. package/esm/models/openairesponsesincludable.js +2 -5
  34. package/esm/models/openairesponsesincompletedetails.js +3 -6
  35. package/esm/models/openairesponsesreasoningeffort.d.ts +2 -1
  36. package/esm/models/openairesponsesreasoningeffort.js +4 -11
  37. package/esm/models/openairesponsesresponsestatus.js +2 -7
  38. package/esm/models/openairesponsesservicetier.js +2 -7
  39. package/esm/models/openairesponsestruncation.js +2 -7
  40. package/esm/models/openresponsesreasoning.d.ts +2 -1
  41. package/esm/models/openresponsesreasoning.js +3 -4
  42. package/esm/models/openresponsesrequest.d.ts +8 -40
  43. package/esm/models/openresponsesrequest.js +10 -49
  44. package/esm/models/openresponsesresponsetext.d.ts +1 -1
  45. package/esm/models/openresponsesresponsetext.js +2 -4
  46. package/esm/models/operations/createauthkeyscode.d.ts +1 -1
  47. package/esm/models/operations/createauthkeyscode.js +2 -4
  48. package/esm/models/operations/createembeddings.d.ts +82 -61
  49. package/esm/models/operations/createembeddings.js +72 -52
  50. package/esm/models/operations/createkeys.d.ts +2 -2
  51. package/esm/models/operations/createkeys.js +3 -5
  52. package/esm/models/operations/exchangeauthcodeforapikey.d.ts +1 -1
  53. package/esm/models/operations/exchangeauthcodeforapikey.js +3 -4
  54. package/esm/models/operations/getcurrentkey.d.ts +4 -0
  55. package/esm/models/operations/getcurrentkey.js +2 -0
  56. package/esm/models/operations/getgeneration.js +3 -6
  57. package/esm/models/operations/getkey.js +1 -1
  58. package/esm/models/operations/getparameters.d.ts +3 -9
  59. package/esm/models/operations/getparameters.js +5 -18
  60. package/esm/models/operations/list.js +1 -1
  61. package/esm/models/operations/updatekeys.d.ts +1 -1
  62. package/esm/models/operations/updatekeys.js +3 -5
  63. package/esm/models/outputmodality.js +2 -7
  64. package/esm/models/parameter.js +3 -7
  65. package/esm/models/providername.d.ts +3 -27
  66. package/esm/models/providername.js +5 -37
  67. package/esm/models/providersort.d.ts +17 -0
  68. package/esm/models/providersort.js +15 -0
  69. package/esm/models/publicendpoint.d.ts +4 -0
  70. package/esm/models/publicendpoint.js +4 -6
  71. package/esm/models/publicpricing.d.ts +4 -0
  72. package/esm/models/publicpricing.js +2 -0
  73. package/esm/models/quantization.d.ts +1 -1
  74. package/esm/models/quantization.js +2 -5
  75. package/esm/models/reasoningsummaryverbosity.d.ts +1 -1
  76. package/esm/models/reasoningsummaryverbosity.js +3 -11
  77. package/esm/models/responseinputaudio.d.ts +1 -1
  78. package/esm/models/responseinputaudio.js +3 -10
  79. package/esm/models/responseinputimage.d.ts +1 -1
  80. package/esm/models/responseinputimage.js +3 -10
  81. package/esm/models/responseserrorfield.js +3 -6
  82. package/esm/models/responsessearchcontextsize.d.ts +1 -1
  83. package/esm/models/responsessearchcontextsize.js +3 -11
  84. package/esm/models/responsetextconfig.js +2 -6
  85. package/esm/models/toolcallstatus.d.ts +1 -1
  86. package/esm/models/toolcallstatus.js +3 -11
  87. package/esm/models/websearchstatus.d.ts +1 -1
  88. package/esm/models/websearchstatus.js +3 -11
  89. package/esm/types/enums.d.ts +10 -6
  90. package/esm/types/enums.js +38 -1
  91. package/esm/types/index.d.ts +0 -1
  92. package/esm/types/index.js +0 -1
  93. package/jsr.json +1 -1
  94. package/package.json +1 -1
  95. package/esm/models/chatcompletionfinishreason.d.ts +0 -13
  96. package/esm/models/chatcompletionfinishreason.js +0 -19
  97. package/esm/models/chatstreamingchoice.d.ts +0 -16
  98. package/esm/models/chatstreamingchoice.js +0 -24
@@ -4,29 +4,28 @@
4
4
  import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../../lib/primitives.js";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
- import { catchUnrecognizedEnum, } from "../../types/enums.js";
7
+ import * as openEnums from "../../types/enums.js";
8
8
  export const GetParametersProvider = {
9
9
  Ai21: "AI21",
10
10
  AionLabs: "AionLabs",
11
11
  Alibaba: "Alibaba",
12
12
  AmazonBedrock: "Amazon Bedrock",
13
13
  Anthropic: "Anthropic",
14
+ Arcee: "Arcee",
14
15
  AtlasCloud: "AtlasCloud",
15
- Atoma: "Atoma",
16
16
  Avian: "Avian",
17
17
  Azure: "Azure",
18
18
  BaseTen: "BaseTen",
19
+ BlackForestLabs: "Black Forest Labs",
19
20
  Cerebras: "Cerebras",
20
21
  Chutes: "Chutes",
21
22
  Cirrascale: "Cirrascale",
22
23
  Clarifai: "Clarifai",
23
24
  Cloudflare: "Cloudflare",
24
25
  Cohere: "Cohere",
25
- CrofAI: "CrofAI",
26
26
  Crusoe: "Crusoe",
27
27
  DeepInfra: "DeepInfra",
28
28
  DeepSeek: "DeepSeek",
29
- Enfer: "Enfer",
30
29
  Featherless: "Featherless",
31
30
  Fireworks: "Fireworks",
32
31
  Friendli: "Friendli",
@@ -39,11 +38,8 @@ export const GetParametersProvider = {
39
38
  InferenceNet: "InferenceNet",
40
39
  Infermatic: "Infermatic",
41
40
  Inflection: "Inflection",
42
- Kluster: "Kluster",
43
- Lambda: "Lambda",
44
41
  Liquid: "Liquid",
45
42
  Mancer2: "Mancer 2",
46
- Meta: "Meta",
47
43
  Minimax: "Minimax",
48
44
  ModelRun: "ModelRun",
49
45
  Mistral: "Mistral",
@@ -53,7 +49,6 @@ export const GetParametersProvider = {
53
49
  NCompass: "NCompass",
54
50
  Nebius: "Nebius",
55
51
  NextBit: "NextBit",
56
- Nineteen: "Nineteen",
57
52
  Novita: "Novita",
58
53
  Nvidia: "Nvidia",
59
54
  OpenAI: "OpenAI",
@@ -68,7 +63,6 @@ export const GetParametersProvider = {
68
63
  Switchpoint: "Switchpoint",
69
64
  Targon: "Targon",
70
65
  Together: "Together",
71
- Ubicloud: "Ubicloud",
72
66
  Venice: "Venice",
73
67
  WandB: "WandB",
74
68
  XAI: "xAI",
@@ -108,10 +102,7 @@ export function getParametersSecurityToJSON(getParametersSecurity) {
108
102
  return JSON.stringify(GetParametersSecurity$outboundSchema.parse(getParametersSecurity));
109
103
  }
110
104
  /** @internal */
111
- export const GetParametersProvider$outboundSchema = z.union([
112
- z.enum(GetParametersProvider),
113
- z.string().and(z.custom()),
114
- ]);
105
+ export const GetParametersProvider$outboundSchema = openEnums.outboundSchema(GetParametersProvider);
115
106
  /** @internal */
116
107
  export const GetParametersRequest$outboundSchema = z.object({
117
108
  author: z.string(),
@@ -122,11 +113,7 @@ export function getParametersRequestToJSON(getParametersRequest) {
122
113
  return JSON.stringify(GetParametersRequest$outboundSchema.parse(getParametersRequest));
123
114
  }
124
115
  /** @internal */
125
- export const SupportedParameter$inboundSchema = z
126
- .union([
127
- z.enum(SupportedParameter),
128
- z.string().transform(catchUnrecognizedEnum),
129
- ]);
116
+ export const SupportedParameter$inboundSchema = openEnums.inboundSchema(SupportedParameter);
130
117
  /** @internal */
131
118
  export const GetParametersData$inboundSchema = z.object({
132
119
  model: z.string(),
@@ -36,7 +36,7 @@ export const ListData$inboundSchema = z.object({
36
36
  byok_usage_monthly: z.number(),
37
37
  created_at: z.string(),
38
38
  updated_at: z.nullable(z.string()),
39
- expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
39
+ expires_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))).optional(),
40
40
  }).transform((v) => {
41
41
  return remap$(v, {
42
42
  "limit_remaining": "limitRemaining",
@@ -134,7 +134,7 @@ export type UpdateKeysResponse = {
134
134
  data: UpdateKeysData;
135
135
  };
136
136
  /** @internal */
137
- export declare const UpdateKeysLimitReset$outboundSchema: z.ZodType<UpdateKeysLimitReset, UpdateKeysLimitReset>;
137
+ export declare const UpdateKeysLimitReset$outboundSchema: z.ZodType<string, UpdateKeysLimitReset>;
138
138
  /** @internal */
139
139
  export type UpdateKeysRequestBody$Outbound = {
140
140
  name?: string | undefined;
@@ -4,6 +4,7 @@
4
4
  import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../../lib/primitives.js";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import * as openEnums from "../../types/enums.js";
7
8
  /**
8
9
  * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
9
10
  */
@@ -13,10 +14,7 @@ export const UpdateKeysLimitReset = {
13
14
  Monthly: "monthly",
14
15
  };
15
16
  /** @internal */
16
- export const UpdateKeysLimitReset$outboundSchema = z.union([
17
- z.enum(UpdateKeysLimitReset),
18
- z.string().and(z.custom()),
19
- ]);
17
+ export const UpdateKeysLimitReset$outboundSchema = openEnums.outboundSchema(UpdateKeysLimitReset);
20
18
  /** @internal */
21
19
  export const UpdateKeysRequestBody$outboundSchema = z.object({
22
20
  name: z.string().optional(),
@@ -65,7 +63,7 @@ export const UpdateKeysData$inboundSchema = z.object({
65
63
  byok_usage_monthly: z.number(),
66
64
  created_at: z.string(),
67
65
  updated_at: z.nullable(z.string()),
68
- expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
66
+ expires_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))).optional(),
69
67
  }).transform((v) => {
70
68
  return remap$(v, {
71
69
  "limit_remaining": "limitRemaining",
@@ -1,17 +1,12 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v4";
5
- import { catchUnrecognizedEnum } from "../types/enums.js";
4
+ import * as openEnums from "../types/enums.js";
6
5
  export const OutputModality = {
7
6
  Text: "text",
8
7
  Image: "image",
9
8
  Embeddings: "embeddings",
10
9
  };
11
10
  /** @internal */
12
- export const OutputModality$inboundSchema = z
13
- .union([
14
- z.enum(OutputModality),
15
- z.string().transform(catchUnrecognizedEnum),
16
- ]);
11
+ export const OutputModality$inboundSchema = openEnums.inboundSchema(OutputModality);
17
12
  //# sourceMappingURL=outputmodality.js.map
@@ -1,8 +1,7 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v4";
5
- import { catchUnrecognizedEnum } from "../types/enums.js";
4
+ import * as openEnums from "../types/enums.js";
6
5
  export const Parameter = {
7
6
  Temperature: "temperature",
8
7
  TopP: "top_p",
@@ -29,9 +28,6 @@ export const Parameter = {
29
28
  Verbosity: "verbosity",
30
29
  };
31
30
  /** @internal */
32
- export const Parameter$inboundSchema = z
33
- .union([
34
- z.enum(Parameter),
35
- z.string().transform(catchUnrecognizedEnum),
36
- ]);
31
+ export const Parameter$inboundSchema = openEnums
32
+ .inboundSchema(Parameter);
37
33
  //# sourceMappingURL=parameter.js.map
@@ -1,44 +1,26 @@
1
1
  import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
3
  export declare const ProviderName: {
4
- readonly AnyScale: "AnyScale";
5
- readonly CentML: "Cent-ML";
6
- readonly HuggingFace: "HuggingFace";
7
- readonly Hyperbolic2: "Hyperbolic 2";
8
- readonly Lepton: "Lepton";
9
- readonly Lynn2: "Lynn 2";
10
- readonly Lynn: "Lynn";
11
- readonly Mancer: "Mancer";
12
- readonly Modal: "Modal";
13
- readonly OctoAI: "OctoAI";
14
- readonly Recursal: "Recursal";
15
- readonly Reflection: "Reflection";
16
- readonly Replicate: "Replicate";
17
- readonly SambaNova2: "SambaNova 2";
18
- readonly SFCompute: "SF Compute";
19
- readonly Together2: "Together 2";
20
- readonly OneDotAI: "01.AI";
21
4
  readonly Ai21: "AI21";
22
5
  readonly AionLabs: "AionLabs";
23
6
  readonly Alibaba: "Alibaba";
24
7
  readonly AmazonBedrock: "Amazon Bedrock";
25
8
  readonly Anthropic: "Anthropic";
9
+ readonly Arcee: "Arcee";
26
10
  readonly AtlasCloud: "AtlasCloud";
27
- readonly Atoma: "Atoma";
28
11
  readonly Avian: "Avian";
29
12
  readonly Azure: "Azure";
30
13
  readonly BaseTen: "BaseTen";
14
+ readonly BlackForestLabs: "Black Forest Labs";
31
15
  readonly Cerebras: "Cerebras";
32
16
  readonly Chutes: "Chutes";
33
17
  readonly Cirrascale: "Cirrascale";
34
18
  readonly Clarifai: "Clarifai";
35
19
  readonly Cloudflare: "Cloudflare";
36
20
  readonly Cohere: "Cohere";
37
- readonly CrofAI: "CrofAI";
38
21
  readonly Crusoe: "Crusoe";
39
22
  readonly DeepInfra: "DeepInfra";
40
23
  readonly DeepSeek: "DeepSeek";
41
- readonly Enfer: "Enfer";
42
24
  readonly Featherless: "Featherless";
43
25
  readonly Fireworks: "Fireworks";
44
26
  readonly Friendli: "Friendli";
@@ -51,12 +33,8 @@ export declare const ProviderName: {
51
33
  readonly InferenceNet: "InferenceNet";
52
34
  readonly Infermatic: "Infermatic";
53
35
  readonly Inflection: "Inflection";
54
- readonly InoCloud: "InoCloud";
55
- readonly Kluster: "Kluster";
56
- readonly Lambda: "Lambda";
57
36
  readonly Liquid: "Liquid";
58
37
  readonly Mancer2: "Mancer 2";
59
- readonly Meta: "Meta";
60
38
  readonly Minimax: "Minimax";
61
39
  readonly ModelRun: "ModelRun";
62
40
  readonly Mistral: "Mistral";
@@ -66,7 +44,6 @@ export declare const ProviderName: {
66
44
  readonly NCompass: "NCompass";
67
45
  readonly Nebius: "Nebius";
68
46
  readonly NextBit: "NextBit";
69
- readonly Nineteen: "Nineteen";
70
47
  readonly Novita: "Novita";
71
48
  readonly Nvidia: "Nvidia";
72
49
  readonly OpenAI: "OpenAI";
@@ -81,7 +58,6 @@ export declare const ProviderName: {
81
58
  readonly Switchpoint: "Switchpoint";
82
59
  readonly Targon: "Targon";
83
60
  readonly Together: "Together";
84
- readonly Ubicloud: "Ubicloud";
85
61
  readonly Venice: "Venice";
86
62
  readonly WandB: "WandB";
87
63
  readonly XAI: "xAI";
@@ -92,5 +68,5 @@ export type ProviderName = OpenEnum<typeof ProviderName>;
92
68
  /** @internal */
93
69
  export declare const ProviderName$inboundSchema: z.ZodType<ProviderName, unknown>;
94
70
  /** @internal */
95
- export declare const ProviderName$outboundSchema: z.ZodType<ProviderName, ProviderName>;
71
+ export declare const ProviderName$outboundSchema: z.ZodType<string, ProviderName>;
96
72
  //# sourceMappingURL=providername.d.ts.map
@@ -1,47 +1,28 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v4";
5
- import { catchUnrecognizedEnum, } from "../types/enums.js";
4
+ import * as openEnums from "../types/enums.js";
6
5
  export const ProviderName = {
7
- AnyScale: "AnyScale",
8
- CentML: "Cent-ML",
9
- HuggingFace: "HuggingFace",
10
- Hyperbolic2: "Hyperbolic 2",
11
- Lepton: "Lepton",
12
- Lynn2: "Lynn 2",
13
- Lynn: "Lynn",
14
- Mancer: "Mancer",
15
- Modal: "Modal",
16
- OctoAI: "OctoAI",
17
- Recursal: "Recursal",
18
- Reflection: "Reflection",
19
- Replicate: "Replicate",
20
- SambaNova2: "SambaNova 2",
21
- SFCompute: "SF Compute",
22
- Together2: "Together 2",
23
- OneDotAI: "01.AI",
24
6
  Ai21: "AI21",
25
7
  AionLabs: "AionLabs",
26
8
  Alibaba: "Alibaba",
27
9
  AmazonBedrock: "Amazon Bedrock",
28
10
  Anthropic: "Anthropic",
11
+ Arcee: "Arcee",
29
12
  AtlasCloud: "AtlasCloud",
30
- Atoma: "Atoma",
31
13
  Avian: "Avian",
32
14
  Azure: "Azure",
33
15
  BaseTen: "BaseTen",
16
+ BlackForestLabs: "Black Forest Labs",
34
17
  Cerebras: "Cerebras",
35
18
  Chutes: "Chutes",
36
19
  Cirrascale: "Cirrascale",
37
20
  Clarifai: "Clarifai",
38
21
  Cloudflare: "Cloudflare",
39
22
  Cohere: "Cohere",
40
- CrofAI: "CrofAI",
41
23
  Crusoe: "Crusoe",
42
24
  DeepInfra: "DeepInfra",
43
25
  DeepSeek: "DeepSeek",
44
- Enfer: "Enfer",
45
26
  Featherless: "Featherless",
46
27
  Fireworks: "Fireworks",
47
28
  Friendli: "Friendli",
@@ -54,12 +35,8 @@ export const ProviderName = {
54
35
  InferenceNet: "InferenceNet",
55
36
  Infermatic: "Infermatic",
56
37
  Inflection: "Inflection",
57
- InoCloud: "InoCloud",
58
- Kluster: "Kluster",
59
- Lambda: "Lambda",
60
38
  Liquid: "Liquid",
61
39
  Mancer2: "Mancer 2",
62
- Meta: "Meta",
63
40
  Minimax: "Minimax",
64
41
  ModelRun: "ModelRun",
65
42
  Mistral: "Mistral",
@@ -69,7 +46,6 @@ export const ProviderName = {
69
46
  NCompass: "NCompass",
70
47
  Nebius: "Nebius",
71
48
  NextBit: "NextBit",
72
- Nineteen: "Nineteen",
73
49
  Novita: "Novita",
74
50
  Nvidia: "Nvidia",
75
51
  OpenAI: "OpenAI",
@@ -84,7 +60,6 @@ export const ProviderName = {
84
60
  Switchpoint: "Switchpoint",
85
61
  Targon: "Targon",
86
62
  Together: "Together",
87
- Ubicloud: "Ubicloud",
88
63
  Venice: "Venice",
89
64
  WandB: "WandB",
90
65
  XAI: "xAI",
@@ -92,14 +67,7 @@ export const ProviderName = {
92
67
  FakeProvider: "FakeProvider",
93
68
  };
94
69
  /** @internal */
95
- export const ProviderName$inboundSchema = z
96
- .union([
97
- z.enum(ProviderName),
98
- z.string().transform(catchUnrecognizedEnum),
99
- ]);
70
+ export const ProviderName$inboundSchema = openEnums.inboundSchema(ProviderName);
100
71
  /** @internal */
101
- export const ProviderName$outboundSchema = z.union([
102
- z.enum(ProviderName),
103
- z.string().and(z.custom()),
104
- ]);
72
+ export const ProviderName$outboundSchema = openEnums.outboundSchema(ProviderName);
105
73
  //# sourceMappingURL=providername.js.map
@@ -0,0 +1,17 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ /**
4
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
5
+ */
6
+ export declare const ProviderSort: {
7
+ readonly Price: "price";
8
+ readonly Throughput: "throughput";
9
+ readonly Latency: "latency";
10
+ };
11
+ /**
12
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
13
+ */
14
+ export type ProviderSort = OpenEnum<typeof ProviderSort>;
15
+ /** @internal */
16
+ export declare const ProviderSort$outboundSchema: z.ZodType<string, ProviderSort>;
17
+ //# sourceMappingURL=providersort.d.ts.map
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as openEnums from "../types/enums.js";
5
+ /**
6
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
7
+ */
8
+ export const ProviderSort = {
9
+ Price: "price",
10
+ Throughput: "throughput",
11
+ Latency: "latency",
12
+ };
13
+ /** @internal */
14
+ export const ProviderSort$outboundSchema = openEnums.outboundSchema(ProviderSort);
15
+ //# sourceMappingURL=providersort.js.map
@@ -22,6 +22,10 @@ export type Pricing = {
22
22
  * A value in string or number format that is a large number
23
23
  */
24
24
  image?: any | undefined;
25
+ /**
26
+ * A value in string or number format that is a large number
27
+ */
28
+ imageToken?: any | undefined;
25
29
  /**
26
30
  * A value in string or number format that is a large number
27
31
  */
@@ -4,7 +4,7 @@
4
4
  import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
8
  import { EndpointStatus$inboundSchema, } from "./endpointstatus.js";
9
9
  import { Parameter$inboundSchema } from "./parameter.js";
10
10
  import { ProviderName$inboundSchema } from "./providername.js";
@@ -25,6 +25,7 @@ export const Pricing$inboundSchema = z.object({
25
25
  completion: z.any().optional(),
26
26
  request: z.any().optional(),
27
27
  image: z.any().optional(),
28
+ image_token: z.any().optional(),
28
29
  image_output: z.any().optional(),
29
30
  audio: z.any().optional(),
30
31
  input_audio_cache: z.any().optional(),
@@ -35,6 +36,7 @@ export const Pricing$inboundSchema = z.object({
35
36
  discount: z.number().optional(),
36
37
  }).transform((v) => {
37
38
  return remap$(v, {
39
+ "image_token": "imageToken",
38
40
  "image_output": "imageOutput",
39
41
  "input_audio_cache": "inputAudioCache",
40
42
  "web_search": "webSearch",
@@ -47,11 +49,7 @@ export function pricingFromJSON(jsonString) {
47
49
  return safeParse(jsonString, (x) => Pricing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pricing' from JSON`);
48
50
  }
49
51
  /** @internal */
50
- export const PublicEndpointQuantization$inboundSchema = z
51
- .union([
52
- z.enum(PublicEndpointQuantization),
53
- z.string().transform(catchUnrecognizedEnum),
54
- ]);
52
+ export const PublicEndpointQuantization$inboundSchema = openEnums.inboundSchema(PublicEndpointQuantization);
55
53
  /** @internal */
56
54
  export const PublicEndpoint$inboundSchema = z.object({
57
55
  name: z.string(),
@@ -21,6 +21,10 @@ export type PublicPricing = {
21
21
  * A value in string or number format that is a large number
22
22
  */
23
23
  image?: any | undefined;
24
+ /**
25
+ * A value in string or number format that is a large number
26
+ */
27
+ imageToken?: any | undefined;
24
28
  /**
25
29
  * A value in string or number format that is a large number
26
30
  */
@@ -11,6 +11,7 @@ export const PublicPricing$inboundSchema = z
11
11
  completion: z.any().optional(),
12
12
  request: z.any().optional(),
13
13
  image: z.any().optional(),
14
+ image_token: z.any().optional(),
14
15
  image_output: z.any().optional(),
15
16
  audio: z.any().optional(),
16
17
  input_audio_cache: z.any().optional(),
@@ -21,6 +22,7 @@ export const PublicPricing$inboundSchema = z
21
22
  discount: z.number().optional(),
22
23
  }).transform((v) => {
23
24
  return remap$(v, {
25
+ "image_token": "imageToken",
24
26
  "image_output": "imageOutput",
25
27
  "input_audio_cache": "inputAudioCache",
26
28
  "web_search": "webSearch",
@@ -13,5 +13,5 @@ export declare const Quantization: {
13
13
  };
14
14
  export type Quantization = OpenEnum<typeof Quantization>;
15
15
  /** @internal */
16
- export declare const Quantization$outboundSchema: z.ZodType<Quantization, Quantization>;
16
+ export declare const Quantization$outboundSchema: z.ZodType<string, Quantization>;
17
17
  //# sourceMappingURL=quantization.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v4";
4
+ import * as openEnums from "../types/enums.js";
5
5
  export const Quantization = {
6
6
  Int4: "int4",
7
7
  Int8: "int8",
@@ -14,8 +14,5 @@ export const Quantization = {
14
14
  Unknown: "unknown",
15
15
  };
16
16
  /** @internal */
17
- export const Quantization$outboundSchema = z.union([
18
- z.enum(Quantization),
19
- z.string().and(z.custom()),
20
- ]);
17
+ export const Quantization$outboundSchema = openEnums.outboundSchema(Quantization);
21
18
  //# sourceMappingURL=quantization.js.map
@@ -9,5 +9,5 @@ export type ReasoningSummaryVerbosity = OpenEnum<typeof ReasoningSummaryVerbosit
9
9
  /** @internal */
10
10
  export declare const ReasoningSummaryVerbosity$inboundSchema: z.ZodType<ReasoningSummaryVerbosity, unknown>;
11
11
  /** @internal */
12
- export declare const ReasoningSummaryVerbosity$outboundSchema: z.ZodType<ReasoningSummaryVerbosity, ReasoningSummaryVerbosity>;
12
+ export declare const ReasoningSummaryVerbosity$outboundSchema: z.ZodType<string, ReasoningSummaryVerbosity>;
13
13
  //# sourceMappingURL=reasoningsummaryverbosity.d.ts.map
@@ -1,22 +1,14 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
- import * as z from "zod/v4";
5
- import { catchUnrecognizedEnum, } from "../types/enums.js";
4
+ import * as openEnums from "../types/enums.js";
6
5
  export const ReasoningSummaryVerbosity = {
7
6
  Auto: "auto",
8
7
  Concise: "concise",
9
8
  Detailed: "detailed",
10
9
  };
11
10
  /** @internal */
12
- export const ReasoningSummaryVerbosity$inboundSchema = z
13
- .union([
14
- z.enum(ReasoningSummaryVerbosity),
15
- z.string().transform(catchUnrecognizedEnum),
16
- ]);
11
+ export const ReasoningSummaryVerbosity$inboundSchema = openEnums.inboundSchema(ReasoningSummaryVerbosity);
17
12
  /** @internal */
18
- export const ReasoningSummaryVerbosity$outboundSchema = z.union([
19
- z.enum(ReasoningSummaryVerbosity),
20
- z.string().and(z.custom()),
21
- ]);
13
+ export const ReasoningSummaryVerbosity$outboundSchema = openEnums.outboundSchema(ReasoningSummaryVerbosity);
22
14
  //# sourceMappingURL=reasoningsummaryverbosity.js.map
@@ -29,7 +29,7 @@ export declare const ResponseInputAudioType$outboundSchema: z.ZodEnum<typeof Res
29
29
  /** @internal */
30
30
  export declare const ResponseInputAudioFormat$inboundSchema: z.ZodType<ResponseInputAudioFormat, unknown>;
31
31
  /** @internal */
32
- export declare const ResponseInputAudioFormat$outboundSchema: z.ZodType<ResponseInputAudioFormat, ResponseInputAudioFormat>;
32
+ export declare const ResponseInputAudioFormat$outboundSchema: z.ZodType<string, ResponseInputAudioFormat>;
33
33
  /** @internal */
34
34
  export declare const ResponseInputAudioInputAudio$inboundSchema: z.ZodType<ResponseInputAudioInputAudio, unknown>;
35
35
  /** @internal */
@@ -4,7 +4,7 @@
4
4
  import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
8
  export const ResponseInputAudioType = {
9
9
  InputAudio: "input_audio",
10
10
  };
@@ -17,16 +17,9 @@ export const ResponseInputAudioType$inboundSchema = z.enum(ResponseInputAudioTyp
17
17
  /** @internal */
18
18
  export const ResponseInputAudioType$outboundSchema = ResponseInputAudioType$inboundSchema;
19
19
  /** @internal */
20
- export const ResponseInputAudioFormat$inboundSchema = z
21
- .union([
22
- z.enum(ResponseInputAudioFormat),
23
- z.string().transform(catchUnrecognizedEnum),
24
- ]);
20
+ export const ResponseInputAudioFormat$inboundSchema = openEnums.inboundSchema(ResponseInputAudioFormat);
25
21
  /** @internal */
26
- export const ResponseInputAudioFormat$outboundSchema = z.union([
27
- z.enum(ResponseInputAudioFormat),
28
- z.string().and(z.custom()),
29
- ]);
22
+ export const ResponseInputAudioFormat$outboundSchema = openEnums.outboundSchema(ResponseInputAudioFormat);
30
23
  /** @internal */
31
24
  export const ResponseInputAudioInputAudio$inboundSchema = z.object({
32
25
  data: z.string(),
@@ -27,7 +27,7 @@ export declare const ResponseInputImageType$outboundSchema: z.ZodEnum<typeof Res
27
27
  /** @internal */
28
28
  export declare const ResponseInputImageDetail$inboundSchema: z.ZodType<ResponseInputImageDetail, unknown>;
29
29
  /** @internal */
30
- export declare const ResponseInputImageDetail$outboundSchema: z.ZodType<ResponseInputImageDetail, ResponseInputImageDetail>;
30
+ export declare const ResponseInputImageDetail$outboundSchema: z.ZodType<string, ResponseInputImageDetail>;
31
31
  /** @internal */
32
32
  export declare const ResponseInputImage$inboundSchema: z.ZodType<ResponseInputImage, unknown>;
33
33
  /** @internal */
@@ -4,7 +4,7 @@
4
4
  import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, } from "../types/enums.js";
7
+ import * as openEnums from "../types/enums.js";
8
8
  export const ResponseInputImageType = {
9
9
  InputImage: "input_image",
10
10
  };
@@ -18,16 +18,9 @@ export const ResponseInputImageType$inboundSchema = z.enum(ResponseInputImageTyp
18
18
  /** @internal */
19
19
  export const ResponseInputImageType$outboundSchema = ResponseInputImageType$inboundSchema;
20
20
  /** @internal */
21
- export const ResponseInputImageDetail$inboundSchema = z
22
- .union([
23
- z.enum(ResponseInputImageDetail),
24
- z.string().transform(catchUnrecognizedEnum),
25
- ]);
21
+ export const ResponseInputImageDetail$inboundSchema = openEnums.inboundSchema(ResponseInputImageDetail);
26
22
  /** @internal */
27
- export const ResponseInputImageDetail$outboundSchema = z.union([
28
- z.enum(ResponseInputImageDetail),
29
- z.string().and(z.custom()),
30
- ]);
23
+ export const ResponseInputImageDetail$outboundSchema = openEnums.outboundSchema(ResponseInputImageDetail);
31
24
  /** @internal */
32
25
  export const ResponseInputImage$inboundSchema = z.object({
33
26
  type: ResponseInputImageType$inboundSchema,
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as z from "zod/v4";
5
5
  import { safeParse } from "../lib/schemas.js";
6
- import { catchUnrecognizedEnum } from "../types/enums.js";
6
+ import * as openEnums from "../types/enums.js";
7
7
  export const CodeEnum = {
8
8
  ServerError: "server_error",
9
9
  RateLimitExceeded: "rate_limit_exceeded",
@@ -25,11 +25,8 @@ export const CodeEnum = {
25
25
  ImageFileNotFound: "image_file_not_found",
26
26
  };
27
27
  /** @internal */
28
- export const CodeEnum$inboundSchema = z
29
- .union([
30
- z.enum(CodeEnum),
31
- z.string().transform(catchUnrecognizedEnum),
32
- ]);
28
+ export const CodeEnum$inboundSchema = openEnums
29
+ .inboundSchema(CodeEnum);
33
30
  /** @internal */
34
31
  export const ResponsesErrorField$inboundSchema = z.object({
35
32
  code: CodeEnum$inboundSchema,
@@ -15,5 +15,5 @@ export type ResponsesSearchContextSize = OpenEnum<typeof ResponsesSearchContextS
15
15
  /** @internal */
16
16
  export declare const ResponsesSearchContextSize$inboundSchema: z.ZodType<ResponsesSearchContextSize, unknown>;
17
17
  /** @internal */
18
- export declare const ResponsesSearchContextSize$outboundSchema: z.ZodType<ResponsesSearchContextSize, ResponsesSearchContextSize>;
18
+ export declare const ResponsesSearchContextSize$outboundSchema: z.ZodType<string, ResponsesSearchContextSize>;
19
19
  //# sourceMappingURL=responsessearchcontextsize.d.ts.map