@openrouter/sdk 0.2.9 → 0.3.1

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 (49) hide show
  1. package/esm/funcs/embeddingsGenerate.js +4 -2
  2. package/esm/lib/config.d.ts +2 -2
  3. package/esm/lib/config.js +2 -2
  4. package/esm/models/chatgenerationparams.d.ts +234 -6
  5. package/esm/models/chatgenerationparams.js +162 -5
  6. package/esm/models/chatresponsechoice.d.ts +2 -0
  7. package/esm/models/chatresponsechoice.js +3 -0
  8. package/esm/models/chatstreamingmessagechunk.d.ts +2 -0
  9. package/esm/models/chatstreamingmessagechunk.js +3 -0
  10. package/esm/models/index.d.ts +8 -0
  11. package/esm/models/index.js +8 -0
  12. package/esm/models/openairesponsesreasoningeffort.d.ts +1 -0
  13. package/esm/models/openairesponsesreasoningeffort.js +1 -0
  14. package/esm/models/openresponsesrequest.d.ts +128 -93
  15. package/esm/models/openresponsesrequest.js +82 -87
  16. package/esm/models/operations/createembeddings.d.ts +10 -129
  17. package/esm/models/operations/createembeddings.js +10 -62
  18. package/esm/models/operations/getparameters.d.ts +3 -72
  19. package/esm/models/operations/getparameters.js +3 -71
  20. package/esm/models/parameter.d.ts +1 -0
  21. package/esm/models/parameter.js +1 -0
  22. package/esm/models/pdfparserengine.d.ts +17 -0
  23. package/esm/models/pdfparserengine.js +15 -0
  24. package/esm/models/pdfparseroptions.d.ts +19 -0
  25. package/esm/models/pdfparseroptions.js +13 -0
  26. package/esm/models/providername.d.ts +3 -0
  27. package/esm/models/providername.js +3 -0
  28. package/esm/models/providerpreferences.d.ts +215 -0
  29. package/esm/models/providerpreferences.js +135 -0
  30. package/esm/models/providersort.d.ts +0 -6
  31. package/esm/models/providersort.js +0 -3
  32. package/esm/models/providersortconfig.d.ts +23 -0
  33. package/esm/models/providersortconfig.js +22 -0
  34. package/esm/models/providersortunion.d.ts +10 -0
  35. package/esm/models/providersortunion.js +12 -0
  36. package/esm/models/publicendpoint.d.ts +24 -24
  37. package/esm/models/publicendpoint.js +12 -12
  38. package/esm/models/publicpricing.d.ts +24 -24
  39. package/esm/models/publicpricing.js +12 -12
  40. package/esm/models/schema0.d.ts +83 -0
  41. package/esm/models/schema0.js +85 -0
  42. package/esm/models/schema3.d.ts +50 -0
  43. package/esm/models/schema3.js +60 -0
  44. package/esm/models/websearchengine.d.ts +16 -0
  45. package/esm/models/websearchengine.js +14 -0
  46. package/esm/types/discriminatedUnion.d.ts +25 -0
  47. package/esm/types/discriminatedUnion.js +57 -0
  48. package/jsr.json +1 -1
  49. package/package.json +1 -1
@@ -0,0 +1,215 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
+ import { DataCollection } from "./datacollection.js";
4
+ import { ProviderName } from "./providername.js";
5
+ import { ProviderSort } from "./providersort.js";
6
+ import { Quantization } from "./quantization.js";
7
+ export type ProviderPreferencesOrder = ProviderName | string;
8
+ export type ProviderPreferencesOnly = ProviderName | string;
9
+ export type ProviderPreferencesIgnore = ProviderName | string;
10
+ export declare const SortEnum: {
11
+ readonly Price: "price";
12
+ readonly Throughput: "throughput";
13
+ readonly Latency: "latency";
14
+ };
15
+ export type SortEnum = OpenEnum<typeof SortEnum>;
16
+ export declare const ProviderSortConfigEnum: {
17
+ readonly Price: "price";
18
+ readonly Throughput: "throughput";
19
+ readonly Latency: "latency";
20
+ };
21
+ export type ProviderSortConfigEnum = ClosedEnum<typeof ProviderSortConfigEnum>;
22
+ export declare const ProviderPreferencesPartition: {
23
+ readonly Model: "model";
24
+ readonly None: "none";
25
+ };
26
+ export type ProviderPreferencesPartition = OpenEnum<typeof ProviderPreferencesPartition>;
27
+ export type ProviderPreferencesProviderSortConfig = {
28
+ by?: ProviderSort | null | undefined;
29
+ partition?: ProviderPreferencesPartition | null | undefined;
30
+ };
31
+ export type ProviderSortConfigUnion = ProviderPreferencesProviderSortConfig | ProviderSortConfigEnum;
32
+ export declare const ProviderPreferencesProviderSort: {
33
+ readonly Price: "price";
34
+ readonly Throughput: "throughput";
35
+ readonly Latency: "latency";
36
+ };
37
+ export type ProviderPreferencesProviderSort = OpenEnum<typeof ProviderPreferencesProviderSort>;
38
+ /**
39
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
40
+ */
41
+ export type ProviderPreferencesSortUnion = ProviderPreferencesProviderSort | ProviderPreferencesProviderSortConfig | ProviderSortConfigEnum | SortEnum;
42
+ /**
43
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
44
+ */
45
+ export type ProviderPreferencesMaxPrice = {
46
+ /**
47
+ * A value in string format that is a large number
48
+ */
49
+ prompt?: string | undefined;
50
+ /**
51
+ * A value in string format that is a large number
52
+ */
53
+ completion?: string | undefined;
54
+ /**
55
+ * A value in string format that is a large number
56
+ */
57
+ image?: string | undefined;
58
+ /**
59
+ * A value in string format that is a large number
60
+ */
61
+ audio?: string | undefined;
62
+ /**
63
+ * A value in string format that is a large number
64
+ */
65
+ request?: string | undefined;
66
+ };
67
+ /**
68
+ * Provider routing preferences for the request.
69
+ */
70
+ export type ProviderPreferences = {
71
+ /**
72
+ * Whether to allow backup providers to serve requests
73
+ *
74
+ * @remarks
75
+ * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
76
+ * - false: use only the primary/custom provider, and return the upstream error if it's unavailable.
77
+ */
78
+ allowFallbacks?: boolean | null | undefined;
79
+ /**
80
+ * Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
81
+ */
82
+ requireParameters?: boolean | null | undefined;
83
+ /**
84
+ * Data collection setting. If no available model provider meets the requirement, your request will return an error.
85
+ *
86
+ * @remarks
87
+ * - allow: (default) allow providers which store user data non-transiently and may train on it
88
+ *
89
+ * - deny: use only providers which do not collect user data.
90
+ */
91
+ dataCollection?: DataCollection | null | undefined;
92
+ /**
93
+ * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
94
+ */
95
+ zdr?: boolean | null | undefined;
96
+ /**
97
+ * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
98
+ */
99
+ enforceDistillableText?: boolean | null | undefined;
100
+ /**
101
+ * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
102
+ */
103
+ order?: Array<ProviderName | string> | null | undefined;
104
+ /**
105
+ * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
106
+ */
107
+ only?: Array<ProviderName | string> | null | undefined;
108
+ /**
109
+ * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
110
+ */
111
+ ignore?: Array<ProviderName | string> | null | undefined;
112
+ /**
113
+ * A list of quantization levels to filter the provider by.
114
+ */
115
+ quantizations?: Array<Quantization> | null | undefined;
116
+ sort?: ProviderPreferencesProviderSort | ProviderPreferencesProviderSortConfig | ProviderSortConfigEnum | SortEnum | null | undefined;
117
+ /**
118
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
119
+ */
120
+ maxPrice?: ProviderPreferencesMaxPrice | undefined;
121
+ /**
122
+ * Preferred minimum throughput (in tokens per second). Endpoints below this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
123
+ */
124
+ preferredMinThroughput?: number | null | undefined;
125
+ /**
126
+ * Preferred maximum latency (in seconds). Endpoints above this threshold may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
127
+ */
128
+ preferredMaxLatency?: number | null | undefined;
129
+ /**
130
+ * **DEPRECATED** Use preferred_min_throughput instead. Backwards-compatible alias for preferred_min_throughput.
131
+ *
132
+ * @deprecated field: Use preferred_min_throughput instead..
133
+ */
134
+ minThroughput?: number | null | undefined;
135
+ /**
136
+ * **DEPRECATED** Use preferred_max_latency instead. Backwards-compatible alias for preferred_max_latency.
137
+ *
138
+ * @deprecated field: Use preferred_max_latency instead..
139
+ */
140
+ maxLatency?: number | null | undefined;
141
+ };
142
+ /** @internal */
143
+ export type ProviderPreferencesOrder$Outbound = string | string;
144
+ /** @internal */
145
+ export declare const ProviderPreferencesOrder$outboundSchema: z.ZodType<ProviderPreferencesOrder$Outbound, ProviderPreferencesOrder>;
146
+ export declare function providerPreferencesOrderToJSON(providerPreferencesOrder: ProviderPreferencesOrder): string;
147
+ /** @internal */
148
+ export type ProviderPreferencesOnly$Outbound = string | string;
149
+ /** @internal */
150
+ export declare const ProviderPreferencesOnly$outboundSchema: z.ZodType<ProviderPreferencesOnly$Outbound, ProviderPreferencesOnly>;
151
+ export declare function providerPreferencesOnlyToJSON(providerPreferencesOnly: ProviderPreferencesOnly): string;
152
+ /** @internal */
153
+ export type ProviderPreferencesIgnore$Outbound = string | string;
154
+ /** @internal */
155
+ export declare const ProviderPreferencesIgnore$outboundSchema: z.ZodType<ProviderPreferencesIgnore$Outbound, ProviderPreferencesIgnore>;
156
+ export declare function providerPreferencesIgnoreToJSON(providerPreferencesIgnore: ProviderPreferencesIgnore): string;
157
+ /** @internal */
158
+ export declare const SortEnum$outboundSchema: z.ZodType<string, SortEnum>;
159
+ /** @internal */
160
+ export declare const ProviderSortConfigEnum$outboundSchema: z.ZodEnum<typeof ProviderSortConfigEnum>;
161
+ /** @internal */
162
+ export declare const ProviderPreferencesPartition$outboundSchema: z.ZodType<string, ProviderPreferencesPartition>;
163
+ /** @internal */
164
+ export type ProviderPreferencesProviderSortConfig$Outbound = {
165
+ by?: string | null | undefined;
166
+ partition?: string | null | undefined;
167
+ };
168
+ /** @internal */
169
+ export declare const ProviderPreferencesProviderSortConfig$outboundSchema: z.ZodType<ProviderPreferencesProviderSortConfig$Outbound, ProviderPreferencesProviderSortConfig>;
170
+ export declare function providerPreferencesProviderSortConfigToJSON(providerPreferencesProviderSortConfig: ProviderPreferencesProviderSortConfig): string;
171
+ /** @internal */
172
+ export type ProviderSortConfigUnion$Outbound = ProviderPreferencesProviderSortConfig$Outbound | string;
173
+ /** @internal */
174
+ export declare const ProviderSortConfigUnion$outboundSchema: z.ZodType<ProviderSortConfigUnion$Outbound, ProviderSortConfigUnion>;
175
+ export declare function providerSortConfigUnionToJSON(providerSortConfigUnion: ProviderSortConfigUnion): string;
176
+ /** @internal */
177
+ export declare const ProviderPreferencesProviderSort$outboundSchema: z.ZodType<string, ProviderPreferencesProviderSort>;
178
+ /** @internal */
179
+ export type ProviderPreferencesSortUnion$Outbound = string | ProviderPreferencesProviderSortConfig$Outbound | string | string;
180
+ /** @internal */
181
+ export declare const ProviderPreferencesSortUnion$outboundSchema: z.ZodType<ProviderPreferencesSortUnion$Outbound, ProviderPreferencesSortUnion>;
182
+ export declare function providerPreferencesSortUnionToJSON(providerPreferencesSortUnion: ProviderPreferencesSortUnion): string;
183
+ /** @internal */
184
+ export type ProviderPreferencesMaxPrice$Outbound = {
185
+ prompt?: string | undefined;
186
+ completion?: string | undefined;
187
+ image?: string | undefined;
188
+ audio?: string | undefined;
189
+ request?: string | undefined;
190
+ };
191
+ /** @internal */
192
+ export declare const ProviderPreferencesMaxPrice$outboundSchema: z.ZodType<ProviderPreferencesMaxPrice$Outbound, ProviderPreferencesMaxPrice>;
193
+ export declare function providerPreferencesMaxPriceToJSON(providerPreferencesMaxPrice: ProviderPreferencesMaxPrice): string;
194
+ /** @internal */
195
+ export type ProviderPreferences$Outbound = {
196
+ allow_fallbacks?: boolean | null | undefined;
197
+ require_parameters?: boolean | null | undefined;
198
+ data_collection?: string | null | undefined;
199
+ zdr?: boolean | null | undefined;
200
+ enforce_distillable_text?: boolean | null | undefined;
201
+ order?: Array<string | string> | null | undefined;
202
+ only?: Array<string | string> | null | undefined;
203
+ ignore?: Array<string | string> | null | undefined;
204
+ quantizations?: Array<string> | null | undefined;
205
+ sort?: string | ProviderPreferencesProviderSortConfig$Outbound | string | string | null | undefined;
206
+ max_price?: ProviderPreferencesMaxPrice$Outbound | undefined;
207
+ preferred_min_throughput?: number | null | undefined;
208
+ preferred_max_latency?: number | null | undefined;
209
+ min_throughput?: number | null | undefined;
210
+ max_latency?: number | null | undefined;
211
+ };
212
+ /** @internal */
213
+ export declare const ProviderPreferences$outboundSchema: z.ZodType<ProviderPreferences$Outbound, ProviderPreferences>;
214
+ export declare function providerPreferencesToJSON(providerPreferences: ProviderPreferences): string;
215
+ //# sourceMappingURL=providerpreferences.d.ts.map
@@ -0,0 +1,135 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { remap as remap$ } from "../lib/primitives.js";
6
+ import * as openEnums from "../types/enums.js";
7
+ import { DataCollection$outboundSchema, } from "./datacollection.js";
8
+ import { ProviderName$outboundSchema } from "./providername.js";
9
+ import { ProviderSort$outboundSchema } from "./providersort.js";
10
+ import { Quantization$outboundSchema } from "./quantization.js";
11
+ export const SortEnum = {
12
+ Price: "price",
13
+ Throughput: "throughput",
14
+ Latency: "latency",
15
+ };
16
+ export const ProviderSortConfigEnum = {
17
+ Price: "price",
18
+ Throughput: "throughput",
19
+ Latency: "latency",
20
+ };
21
+ export const ProviderPreferencesPartition = {
22
+ Model: "model",
23
+ None: "none",
24
+ };
25
+ export const ProviderPreferencesProviderSort = {
26
+ Price: "price",
27
+ Throughput: "throughput",
28
+ Latency: "latency",
29
+ };
30
+ /** @internal */
31
+ export const ProviderPreferencesOrder$outboundSchema = z.union([ProviderName$outboundSchema, z.string()]);
32
+ export function providerPreferencesOrderToJSON(providerPreferencesOrder) {
33
+ return JSON.stringify(ProviderPreferencesOrder$outboundSchema.parse(providerPreferencesOrder));
34
+ }
35
+ /** @internal */
36
+ export const ProviderPreferencesOnly$outboundSchema = z.union([ProviderName$outboundSchema, z.string()]);
37
+ export function providerPreferencesOnlyToJSON(providerPreferencesOnly) {
38
+ return JSON.stringify(ProviderPreferencesOnly$outboundSchema.parse(providerPreferencesOnly));
39
+ }
40
+ /** @internal */
41
+ export const ProviderPreferencesIgnore$outboundSchema = z.union([ProviderName$outboundSchema, z.string()]);
42
+ export function providerPreferencesIgnoreToJSON(providerPreferencesIgnore) {
43
+ return JSON.stringify(ProviderPreferencesIgnore$outboundSchema.parse(providerPreferencesIgnore));
44
+ }
45
+ /** @internal */
46
+ export const SortEnum$outboundSchema = openEnums
47
+ .outboundSchema(SortEnum);
48
+ /** @internal */
49
+ export const ProviderSortConfigEnum$outboundSchema = z.enum(ProviderSortConfigEnum);
50
+ /** @internal */
51
+ export const ProviderPreferencesPartition$outboundSchema = openEnums.outboundSchema(ProviderPreferencesPartition);
52
+ /** @internal */
53
+ export const ProviderPreferencesProviderSortConfig$outboundSchema = z.object({
54
+ by: z.nullable(ProviderSort$outboundSchema).optional(),
55
+ partition: z.nullable(ProviderPreferencesPartition$outboundSchema).optional(),
56
+ });
57
+ export function providerPreferencesProviderSortConfigToJSON(providerPreferencesProviderSortConfig) {
58
+ return JSON.stringify(ProviderPreferencesProviderSortConfig$outboundSchema.parse(providerPreferencesProviderSortConfig));
59
+ }
60
+ /** @internal */
61
+ export const ProviderSortConfigUnion$outboundSchema = z.union([
62
+ z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema),
63
+ ProviderSortConfigEnum$outboundSchema,
64
+ ]);
65
+ export function providerSortConfigUnionToJSON(providerSortConfigUnion) {
66
+ return JSON.stringify(ProviderSortConfigUnion$outboundSchema.parse(providerSortConfigUnion));
67
+ }
68
+ /** @internal */
69
+ export const ProviderPreferencesProviderSort$outboundSchema = openEnums.outboundSchema(ProviderPreferencesProviderSort);
70
+ /** @internal */
71
+ export const ProviderPreferencesSortUnion$outboundSchema = z.union([
72
+ ProviderPreferencesProviderSort$outboundSchema,
73
+ z.union([
74
+ z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema),
75
+ ProviderSortConfigEnum$outboundSchema,
76
+ ]),
77
+ SortEnum$outboundSchema,
78
+ ]);
79
+ export function providerPreferencesSortUnionToJSON(providerPreferencesSortUnion) {
80
+ return JSON.stringify(ProviderPreferencesSortUnion$outboundSchema.parse(providerPreferencesSortUnion));
81
+ }
82
+ /** @internal */
83
+ export const ProviderPreferencesMaxPrice$outboundSchema = z.object({
84
+ prompt: z.string().optional(),
85
+ completion: z.string().optional(),
86
+ image: z.string().optional(),
87
+ audio: z.string().optional(),
88
+ request: z.string().optional(),
89
+ });
90
+ export function providerPreferencesMaxPriceToJSON(providerPreferencesMaxPrice) {
91
+ return JSON.stringify(ProviderPreferencesMaxPrice$outboundSchema.parse(providerPreferencesMaxPrice));
92
+ }
93
+ /** @internal */
94
+ export const ProviderPreferences$outboundSchema = z.object({
95
+ allowFallbacks: z.nullable(z.boolean()).optional(),
96
+ requireParameters: z.nullable(z.boolean()).optional(),
97
+ dataCollection: z.nullable(DataCollection$outboundSchema).optional(),
98
+ zdr: z.nullable(z.boolean()).optional(),
99
+ enforceDistillableText: z.nullable(z.boolean()).optional(),
100
+ order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()])))
101
+ .optional(),
102
+ only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()])))
103
+ .optional(),
104
+ ignore: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))).optional(),
105
+ quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(),
106
+ sort: z.nullable(z.union([
107
+ ProviderPreferencesProviderSort$outboundSchema,
108
+ z.union([
109
+ z.lazy(() => ProviderPreferencesProviderSortConfig$outboundSchema),
110
+ ProviderSortConfigEnum$outboundSchema,
111
+ ]),
112
+ SortEnum$outboundSchema,
113
+ ])).optional(),
114
+ maxPrice: z.lazy(() => ProviderPreferencesMaxPrice$outboundSchema).optional(),
115
+ preferredMinThroughput: z.nullable(z.number()).optional(),
116
+ preferredMaxLatency: z.nullable(z.number()).optional(),
117
+ minThroughput: z.nullable(z.number()).optional(),
118
+ maxLatency: z.nullable(z.number()).optional(),
119
+ }).transform((v) => {
120
+ return remap$(v, {
121
+ allowFallbacks: "allow_fallbacks",
122
+ requireParameters: "require_parameters",
123
+ dataCollection: "data_collection",
124
+ enforceDistillableText: "enforce_distillable_text",
125
+ maxPrice: "max_price",
126
+ preferredMinThroughput: "preferred_min_throughput",
127
+ preferredMaxLatency: "preferred_max_latency",
128
+ minThroughput: "min_throughput",
129
+ maxLatency: "max_latency",
130
+ });
131
+ });
132
+ export function providerPreferencesToJSON(providerPreferences) {
133
+ return JSON.stringify(ProviderPreferences$outboundSchema.parse(providerPreferences));
134
+ }
135
+ //# sourceMappingURL=providerpreferences.js.map
@@ -1,16 +1,10 @@
1
1
  import * as z from "zod/v4";
2
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
3
  export declare const ProviderSort: {
7
4
  readonly Price: "price";
8
5
  readonly Throughput: "throughput";
9
6
  readonly Latency: "latency";
10
7
  };
11
- /**
12
- * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
13
- */
14
8
  export type ProviderSort = OpenEnum<typeof ProviderSort>;
15
9
  /** @internal */
16
10
  export declare const ProviderSort$outboundSchema: z.ZodType<string, ProviderSort>;
@@ -2,9 +2,6 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
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
5
  export const ProviderSort = {
9
6
  Price: "price",
10
7
  Throughput: "throughput",
@@ -0,0 +1,23 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ import { ProviderSort } from "./providersort.js";
4
+ export declare const Partition: {
5
+ readonly Model: "model";
6
+ readonly None: "none";
7
+ };
8
+ export type Partition = OpenEnum<typeof Partition>;
9
+ export type ProviderSortConfig = {
10
+ by?: ProviderSort | null | undefined;
11
+ partition?: Partition | null | undefined;
12
+ };
13
+ /** @internal */
14
+ export declare const Partition$outboundSchema: z.ZodType<string, Partition>;
15
+ /** @internal */
16
+ export type ProviderSortConfig$Outbound = {
17
+ by?: string | null | undefined;
18
+ partition?: string | null | undefined;
19
+ };
20
+ /** @internal */
21
+ export declare const ProviderSortConfig$outboundSchema: z.ZodType<ProviderSortConfig$Outbound, ProviderSortConfig>;
22
+ export declare function providerSortConfigToJSON(providerSortConfig: ProviderSortConfig): string;
23
+ //# sourceMappingURL=providersortconfig.d.ts.map
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import * as openEnums from "../types/enums.js";
6
+ import { ProviderSort$outboundSchema } from "./providersort.js";
7
+ export const Partition = {
8
+ Model: "model",
9
+ None: "none",
10
+ };
11
+ /** @internal */
12
+ export const Partition$outboundSchema = openEnums
13
+ .outboundSchema(Partition);
14
+ /** @internal */
15
+ export const ProviderSortConfig$outboundSchema = z.object({
16
+ by: z.nullable(ProviderSort$outboundSchema).optional(),
17
+ partition: z.nullable(Partition$outboundSchema).optional(),
18
+ });
19
+ export function providerSortConfigToJSON(providerSortConfig) {
20
+ return JSON.stringify(ProviderSortConfig$outboundSchema.parse(providerSortConfig));
21
+ }
22
+ //# sourceMappingURL=providersortconfig.js.map
@@ -0,0 +1,10 @@
1
+ import * as z from "zod/v4";
2
+ import { ProviderSort } from "./providersort.js";
3
+ import { ProviderSortConfig, ProviderSortConfig$Outbound } from "./providersortconfig.js";
4
+ export type ProviderSortUnion = ProviderSort | ProviderSortConfig;
5
+ /** @internal */
6
+ export type ProviderSortUnion$Outbound = string | ProviderSortConfig$Outbound;
7
+ /** @internal */
8
+ export declare const ProviderSortUnion$outboundSchema: z.ZodType<ProviderSortUnion$Outbound, ProviderSortUnion>;
9
+ export declare function providerSortUnionToJSON(providerSortUnion: ProviderSortUnion): string;
10
+ //# sourceMappingURL=providersortunion.d.ts.map
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { ProviderSort$outboundSchema } from "./providersort.js";
6
+ import { ProviderSortConfig$outboundSchema, } from "./providersortconfig.js";
7
+ /** @internal */
8
+ export const ProviderSortUnion$outboundSchema = z.union([ProviderSort$outboundSchema, ProviderSortConfig$outboundSchema]);
9
+ export function providerSortUnionToJSON(providerSortUnion) {
10
+ return JSON.stringify(ProviderSortUnion$outboundSchema.parse(providerSortUnion));
11
+ }
12
+ //# sourceMappingURL=providersortunion.js.map
@@ -7,53 +7,53 @@ import { Parameter } from "./parameter.js";
7
7
  import { ProviderName } from "./providername.js";
8
8
  export type Pricing = {
9
9
  /**
10
- * A value in string or number format that is a large number
10
+ * A value in string format that is a large number
11
11
  */
12
- prompt?: any | undefined;
12
+ prompt: string;
13
13
  /**
14
- * A value in string or number format that is a large number
14
+ * A value in string format that is a large number
15
15
  */
16
- completion?: any | undefined;
16
+ completion: string;
17
17
  /**
18
- * A value in string or number format that is a large number
18
+ * A value in string format that is a large number
19
19
  */
20
- request?: any | undefined;
20
+ request?: string | undefined;
21
21
  /**
22
- * A value in string or number format that is a large number
22
+ * A value in string format that is a large number
23
23
  */
24
- image?: any | undefined;
24
+ image?: string | undefined;
25
25
  /**
26
- * A value in string or number format that is a large number
26
+ * A value in string format that is a large number
27
27
  */
28
- imageToken?: any | undefined;
28
+ imageToken?: string | undefined;
29
29
  /**
30
- * A value in string or number format that is a large number
30
+ * A value in string format that is a large number
31
31
  */
32
- imageOutput?: any | undefined;
32
+ imageOutput?: string | undefined;
33
33
  /**
34
- * A value in string or number format that is a large number
34
+ * A value in string format that is a large number
35
35
  */
36
- audio?: any | undefined;
36
+ audio?: string | undefined;
37
37
  /**
38
- * A value in string or number format that is a large number
38
+ * A value in string format that is a large number
39
39
  */
40
- inputAudioCache?: any | undefined;
40
+ inputAudioCache?: string | undefined;
41
41
  /**
42
- * A value in string or number format that is a large number
42
+ * A value in string format that is a large number
43
43
  */
44
- webSearch?: any | undefined;
44
+ webSearch?: string | undefined;
45
45
  /**
46
- * A value in string or number format that is a large number
46
+ * A value in string format that is a large number
47
47
  */
48
- internalReasoning?: any | undefined;
48
+ internalReasoning?: string | undefined;
49
49
  /**
50
- * A value in string or number format that is a large number
50
+ * A value in string format that is a large number
51
51
  */
52
- inputCacheRead?: any | undefined;
52
+ inputCacheRead?: string | undefined;
53
53
  /**
54
- * A value in string or number format that is a large number
54
+ * A value in string format that is a large number
55
55
  */
56
- inputCacheWrite?: any | undefined;
56
+ inputCacheWrite?: string | undefined;
57
57
  discount?: number | undefined;
58
58
  };
59
59
  export declare const PublicEndpointQuantization: {
@@ -21,18 +21,18 @@ export const PublicEndpointQuantization = {
21
21
  };
22
22
  /** @internal */
23
23
  export const Pricing$inboundSchema = z.object({
24
- prompt: z.any().optional(),
25
- completion: z.any().optional(),
26
- request: z.any().optional(),
27
- image: z.any().optional(),
28
- image_token: z.any().optional(),
29
- image_output: z.any().optional(),
30
- audio: z.any().optional(),
31
- input_audio_cache: z.any().optional(),
32
- web_search: z.any().optional(),
33
- internal_reasoning: z.any().optional(),
34
- input_cache_read: z.any().optional(),
35
- input_cache_write: z.any().optional(),
24
+ prompt: z.string(),
25
+ completion: z.string(),
26
+ request: z.string().optional(),
27
+ image: z.string().optional(),
28
+ image_token: z.string().optional(),
29
+ image_output: z.string().optional(),
30
+ audio: z.string().optional(),
31
+ input_audio_cache: z.string().optional(),
32
+ web_search: z.string().optional(),
33
+ internal_reasoning: z.string().optional(),
34
+ input_cache_read: z.string().optional(),
35
+ input_cache_write: z.string().optional(),
36
36
  discount: z.number().optional(),
37
37
  }).transform((v) => {
38
38
  return remap$(v, {
@@ -6,53 +6,53 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
6
  */
7
7
  export type PublicPricing = {
8
8
  /**
9
- * A value in string or number format that is a large number
9
+ * A value in string format that is a large number
10
10
  */
11
- prompt?: any | undefined;
11
+ prompt: string;
12
12
  /**
13
- * A value in string or number format that is a large number
13
+ * A value in string format that is a large number
14
14
  */
15
- completion?: any | undefined;
15
+ completion: string;
16
16
  /**
17
- * A value in string or number format that is a large number
17
+ * A value in string format that is a large number
18
18
  */
19
- request?: any | undefined;
19
+ request?: string | undefined;
20
20
  /**
21
- * A value in string or number format that is a large number
21
+ * A value in string format that is a large number
22
22
  */
23
- image?: any | undefined;
23
+ image?: string | undefined;
24
24
  /**
25
- * A value in string or number format that is a large number
25
+ * A value in string format that is a large number
26
26
  */
27
- imageToken?: any | undefined;
27
+ imageToken?: string | undefined;
28
28
  /**
29
- * A value in string or number format that is a large number
29
+ * A value in string format that is a large number
30
30
  */
31
- imageOutput?: any | undefined;
31
+ imageOutput?: string | undefined;
32
32
  /**
33
- * A value in string or number format that is a large number
33
+ * A value in string format that is a large number
34
34
  */
35
- audio?: any | undefined;
35
+ audio?: string | undefined;
36
36
  /**
37
- * A value in string or number format that is a large number
37
+ * A value in string format that is a large number
38
38
  */
39
- inputAudioCache?: any | undefined;
39
+ inputAudioCache?: string | undefined;
40
40
  /**
41
- * A value in string or number format that is a large number
41
+ * A value in string format that is a large number
42
42
  */
43
- webSearch?: any | undefined;
43
+ webSearch?: string | undefined;
44
44
  /**
45
- * A value in string or number format that is a large number
45
+ * A value in string format that is a large number
46
46
  */
47
- internalReasoning?: any | undefined;
47
+ internalReasoning?: string | undefined;
48
48
  /**
49
- * A value in string or number format that is a large number
49
+ * A value in string format that is a large number
50
50
  */
51
- inputCacheRead?: any | undefined;
51
+ inputCacheRead?: string | undefined;
52
52
  /**
53
- * A value in string or number format that is a large number
53
+ * A value in string format that is a large number
54
54
  */
55
- inputCacheWrite?: any | undefined;
55
+ inputCacheWrite?: string | undefined;
56
56
  discount?: number | undefined;
57
57
  };
58
58
  /** @internal */