@openrouter/sdk 0.2.6 → 0.2.11
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.
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/response-wrapper.d.ts +12 -0
- package/esm/lib/response-wrapper.js +45 -15
- package/esm/lib/tool-orchestrator.js +33 -11
- package/esm/models/chatgenerationparams.d.ts +256 -2
- package/esm/models/chatgenerationparams.js +175 -1
- package/esm/models/chatmessagecontentitemaudio.d.ts +1 -16
- package/esm/models/chatmessagecontentitemaudio.js +2 -16
- package/esm/models/index.d.ts +1 -0
- package/esm/models/index.js +1 -0
- package/esm/models/openairesponsesreasoningeffort.d.ts +1 -0
- package/esm/models/openairesponsesreasoningeffort.js +1 -0
- package/esm/models/openresponsesrequest.d.ts +111 -63
- package/esm/models/openresponsesrequest.js +70 -53
- package/esm/models/operations/createembeddings.d.ts +25 -15
- package/esm/models/operations/createembeddings.js +9 -5
- package/esm/models/operations/getparameters.d.ts +3 -0
- package/esm/models/operations/getparameters.js +3 -0
- package/esm/models/providername.d.ts +3 -0
- package/esm/models/providername.js +3 -0
- package/esm/models/publicendpoint.d.ts +24 -24
- package/esm/models/publicendpoint.js +12 -12
- package/esm/models/publicpricing.d.ts +24 -24
- package/esm/models/publicpricing.js +12 -12
- package/esm/models/schema0.d.ts +83 -0
- package/esm/models/schema0.js +85 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
|
@@ -25,15 +25,22 @@ export const Truncation = {
|
|
|
25
25
|
Auto: "auto",
|
|
26
26
|
Disabled: "disabled",
|
|
27
27
|
};
|
|
28
|
-
export const
|
|
28
|
+
export const OpenResponsesRequestPdfEngine = {
|
|
29
29
|
MistralOcr: "mistral-ocr",
|
|
30
30
|
PdfText: "pdf-text",
|
|
31
31
|
Native: "native",
|
|
32
32
|
};
|
|
33
|
-
export const
|
|
33
|
+
export const OpenResponsesRequestEngine = {
|
|
34
34
|
Native: "native",
|
|
35
35
|
Exa: "exa",
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
|
|
39
|
+
*/
|
|
40
|
+
export const OpenResponsesRequestRoute = {
|
|
41
|
+
Fallback: "fallback",
|
|
42
|
+
Sort: "sort",
|
|
43
|
+
};
|
|
37
44
|
/** @internal */
|
|
38
45
|
export const OpenResponsesRequestToolFunction$outboundSchema = z.object({
|
|
39
46
|
type: z.literal("function"),
|
|
@@ -83,31 +90,34 @@ export function ignoreToJSON(ignore) {
|
|
|
83
90
|
return JSON.stringify(Ignore$outboundSchema.parse(ignore));
|
|
84
91
|
}
|
|
85
92
|
/** @internal */
|
|
86
|
-
export const
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
request: z.any().optional(),
|
|
93
|
+
export const OpenResponsesRequestMaxPrice$outboundSchema = z.object({
|
|
94
|
+
prompt: z.string().optional(),
|
|
95
|
+
completion: z.string().optional(),
|
|
96
|
+
image: z.string().optional(),
|
|
97
|
+
audio: z.string().optional(),
|
|
98
|
+
request: z.string().optional(),
|
|
93
99
|
});
|
|
94
|
-
export function
|
|
95
|
-
return JSON.stringify(
|
|
100
|
+
export function openResponsesRequestMaxPriceToJSON(openResponsesRequestMaxPrice) {
|
|
101
|
+
return JSON.stringify(OpenResponsesRequestMaxPrice$outboundSchema.parse(openResponsesRequestMaxPrice));
|
|
96
102
|
}
|
|
97
103
|
/** @internal */
|
|
98
|
-
export const
|
|
99
|
-
.object({
|
|
104
|
+
export const OpenResponsesRequestProvider$outboundSchema = z.object({
|
|
100
105
|
allowFallbacks: z.nullable(z.boolean()).optional(),
|
|
101
106
|
requireParameters: z.nullable(z.boolean()).optional(),
|
|
102
107
|
dataCollection: z.nullable(DataCollection$outboundSchema).optional(),
|
|
103
108
|
zdr: z.nullable(z.boolean()).optional(),
|
|
104
109
|
enforceDistillableText: z.nullable(z.boolean()).optional(),
|
|
105
|
-
order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()])))
|
|
106
|
-
|
|
110
|
+
order: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()])))
|
|
111
|
+
.optional(),
|
|
112
|
+
only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()])))
|
|
113
|
+
.optional(),
|
|
107
114
|
ignore: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))).optional(),
|
|
108
115
|
quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(),
|
|
109
116
|
sort: z.nullable(ProviderSort$outboundSchema).optional(),
|
|
110
|
-
maxPrice: z.lazy(() =>
|
|
117
|
+
maxPrice: z.lazy(() => OpenResponsesRequestMaxPrice$outboundSchema)
|
|
118
|
+
.optional(),
|
|
119
|
+
minThroughput: z.nullable(z.number()).optional(),
|
|
120
|
+
maxLatency: z.nullable(z.number()).optional(),
|
|
111
121
|
}).transform((v) => {
|
|
112
122
|
return remap$(v, {
|
|
113
123
|
allowFallbacks: "allow_fallbacks",
|
|
@@ -115,78 +125,82 @@ export const Provider$outboundSchema = z
|
|
|
115
125
|
dataCollection: "data_collection",
|
|
116
126
|
enforceDistillableText: "enforce_distillable_text",
|
|
117
127
|
maxPrice: "max_price",
|
|
128
|
+
minThroughput: "min_throughput",
|
|
129
|
+
maxLatency: "max_latency",
|
|
118
130
|
});
|
|
119
131
|
});
|
|
120
|
-
export function
|
|
121
|
-
return JSON.stringify(
|
|
132
|
+
export function openResponsesRequestProviderToJSON(openResponsesRequestProvider) {
|
|
133
|
+
return JSON.stringify(OpenResponsesRequestProvider$outboundSchema.parse(openResponsesRequestProvider));
|
|
122
134
|
}
|
|
123
135
|
/** @internal */
|
|
124
|
-
export const
|
|
136
|
+
export const OpenResponsesRequestPluginResponseHealing$outboundSchema = z.object({
|
|
125
137
|
id: z.literal("response-healing"),
|
|
138
|
+
enabled: z.boolean().optional(),
|
|
126
139
|
});
|
|
127
|
-
export function
|
|
128
|
-
return JSON.stringify(
|
|
140
|
+
export function openResponsesRequestPluginResponseHealingToJSON(openResponsesRequestPluginResponseHealing) {
|
|
141
|
+
return JSON.stringify(OpenResponsesRequestPluginResponseHealing$outboundSchema.parse(openResponsesRequestPluginResponseHealing));
|
|
129
142
|
}
|
|
130
143
|
/** @internal */
|
|
131
|
-
export const
|
|
132
|
-
.outboundSchema(PdfEngine);
|
|
144
|
+
export const OpenResponsesRequestPdfEngine$outboundSchema = openEnums.outboundSchema(OpenResponsesRequestPdfEngine);
|
|
133
145
|
/** @internal */
|
|
134
|
-
export const
|
|
135
|
-
engine:
|
|
146
|
+
export const OpenResponsesRequestPdf$outboundSchema = z.object({
|
|
147
|
+
engine: OpenResponsesRequestPdfEngine$outboundSchema.optional(),
|
|
136
148
|
});
|
|
137
|
-
export function
|
|
138
|
-
return JSON.stringify(
|
|
149
|
+
export function openResponsesRequestPdfToJSON(openResponsesRequestPdf) {
|
|
150
|
+
return JSON.stringify(OpenResponsesRequestPdf$outboundSchema.parse(openResponsesRequestPdf));
|
|
139
151
|
}
|
|
140
152
|
/** @internal */
|
|
141
|
-
export const
|
|
153
|
+
export const OpenResponsesRequestPluginFileParser$outboundSchema = z.object({
|
|
142
154
|
id: z.literal("file-parser"),
|
|
155
|
+
enabled: z.boolean().optional(),
|
|
143
156
|
maxFiles: z.number().optional(),
|
|
144
|
-
pdf: z.lazy(() =>
|
|
157
|
+
pdf: z.lazy(() => OpenResponsesRequestPdf$outboundSchema).optional(),
|
|
145
158
|
}).transform((v) => {
|
|
146
159
|
return remap$(v, {
|
|
147
160
|
maxFiles: "max_files",
|
|
148
161
|
});
|
|
149
162
|
});
|
|
150
|
-
export function
|
|
151
|
-
return JSON.stringify(
|
|
163
|
+
export function openResponsesRequestPluginFileParserToJSON(openResponsesRequestPluginFileParser) {
|
|
164
|
+
return JSON.stringify(OpenResponsesRequestPluginFileParser$outboundSchema.parse(openResponsesRequestPluginFileParser));
|
|
152
165
|
}
|
|
153
166
|
/** @internal */
|
|
154
|
-
export const
|
|
155
|
-
.outboundSchema(Engine);
|
|
167
|
+
export const OpenResponsesRequestEngine$outboundSchema = openEnums.outboundSchema(OpenResponsesRequestEngine);
|
|
156
168
|
/** @internal */
|
|
157
|
-
export const
|
|
169
|
+
export const OpenResponsesRequestPluginWeb$outboundSchema = z.object({
|
|
158
170
|
id: z.literal("web"),
|
|
171
|
+
enabled: z.boolean().optional(),
|
|
159
172
|
maxResults: z.number().optional(),
|
|
160
173
|
searchPrompt: z.string().optional(),
|
|
161
|
-
engine:
|
|
174
|
+
engine: OpenResponsesRequestEngine$outboundSchema.optional(),
|
|
162
175
|
}).transform((v) => {
|
|
163
176
|
return remap$(v, {
|
|
164
177
|
maxResults: "max_results",
|
|
165
178
|
searchPrompt: "search_prompt",
|
|
166
179
|
});
|
|
167
180
|
});
|
|
168
|
-
export function
|
|
169
|
-
return JSON.stringify(
|
|
181
|
+
export function openResponsesRequestPluginWebToJSON(openResponsesRequestPluginWeb) {
|
|
182
|
+
return JSON.stringify(OpenResponsesRequestPluginWeb$outboundSchema.parse(openResponsesRequestPluginWeb));
|
|
170
183
|
}
|
|
171
184
|
/** @internal */
|
|
172
|
-
export const
|
|
185
|
+
export const OpenResponsesRequestPluginModeration$outboundSchema = z.object({
|
|
173
186
|
id: z.literal("moderation"),
|
|
174
187
|
});
|
|
175
|
-
export function
|
|
176
|
-
return JSON.stringify(
|
|
188
|
+
export function openResponsesRequestPluginModerationToJSON(openResponsesRequestPluginModeration) {
|
|
189
|
+
return JSON.stringify(OpenResponsesRequestPluginModeration$outboundSchema.parse(openResponsesRequestPluginModeration));
|
|
177
190
|
}
|
|
178
191
|
/** @internal */
|
|
179
|
-
export const
|
|
180
|
-
.
|
|
181
|
-
z.lazy(() =>
|
|
182
|
-
z.lazy(() =>
|
|
183
|
-
z.lazy(() =>
|
|
184
|
-
z.lazy(() => PluginResponseHealing$outboundSchema),
|
|
192
|
+
export const OpenResponsesRequestPluginUnion$outboundSchema = z.union([
|
|
193
|
+
z.lazy(() => OpenResponsesRequestPluginModeration$outboundSchema),
|
|
194
|
+
z.lazy(() => OpenResponsesRequestPluginWeb$outboundSchema),
|
|
195
|
+
z.lazy(() => OpenResponsesRequestPluginFileParser$outboundSchema),
|
|
196
|
+
z.lazy(() => OpenResponsesRequestPluginResponseHealing$outboundSchema),
|
|
185
197
|
]);
|
|
186
|
-
export function
|
|
187
|
-
return JSON.stringify(
|
|
198
|
+
export function openResponsesRequestPluginUnionToJSON(openResponsesRequestPluginUnion) {
|
|
199
|
+
return JSON.stringify(OpenResponsesRequestPluginUnion$outboundSchema.parse(openResponsesRequestPluginUnion));
|
|
188
200
|
}
|
|
189
201
|
/** @internal */
|
|
202
|
+
export const OpenResponsesRequestRoute$outboundSchema = openEnums.outboundSchema(OpenResponsesRequestRoute);
|
|
203
|
+
/** @internal */
|
|
190
204
|
export const OpenResponsesRequest$outboundSchema = z.object({
|
|
191
205
|
input: OpenResponsesInput$outboundSchema.optional(),
|
|
192
206
|
instructions: z.nullable(z.string()).optional(),
|
|
@@ -219,14 +233,16 @@ export const OpenResponsesRequest$outboundSchema = z.object({
|
|
|
219
233
|
serviceTier: ServiceTier$outboundSchema.default("auto"),
|
|
220
234
|
truncation: z.nullable(Truncation$outboundSchema).optional(),
|
|
221
235
|
stream: z.boolean().default(false),
|
|
222
|
-
provider: z.nullable(z.lazy(() =>
|
|
236
|
+
provider: z.nullable(z.lazy(() => OpenResponsesRequestProvider$outboundSchema)).optional(),
|
|
223
237
|
plugins: z.array(z.union([
|
|
224
|
-
z.lazy(() =>
|
|
225
|
-
z.lazy(() =>
|
|
226
|
-
z.lazy(() =>
|
|
227
|
-
z.lazy(() =>
|
|
238
|
+
z.lazy(() => OpenResponsesRequestPluginModeration$outboundSchema),
|
|
239
|
+
z.lazy(() => OpenResponsesRequestPluginWeb$outboundSchema),
|
|
240
|
+
z.lazy(() => OpenResponsesRequestPluginFileParser$outboundSchema),
|
|
241
|
+
z.lazy(() => OpenResponsesRequestPluginResponseHealing$outboundSchema),
|
|
228
242
|
])).optional(),
|
|
243
|
+
route: z.nullable(OpenResponsesRequestRoute$outboundSchema).optional(),
|
|
229
244
|
user: z.string().optional(),
|
|
245
|
+
sessionId: z.string().optional(),
|
|
230
246
|
}).transform((v) => {
|
|
231
247
|
return remap$(v, {
|
|
232
248
|
toolChoice: "tool_choice",
|
|
@@ -238,6 +254,7 @@ export const OpenResponsesRequest$outboundSchema = z.object({
|
|
|
238
254
|
previousResponseId: "previous_response_id",
|
|
239
255
|
safetyIdentifier: "safety_identifier",
|
|
240
256
|
serviceTier: "service_tier",
|
|
257
|
+
sessionId: "session_id",
|
|
241
258
|
});
|
|
242
259
|
});
|
|
243
260
|
export function openResponsesRequestToJSON(openResponsesRequest) {
|
|
@@ -32,25 +32,25 @@ export type Ignore = models.ProviderName | string;
|
|
|
32
32
|
*/
|
|
33
33
|
export type MaxPrice = {
|
|
34
34
|
/**
|
|
35
|
-
* A value in string
|
|
35
|
+
* A value in string format that is a large number
|
|
36
36
|
*/
|
|
37
|
-
prompt?:
|
|
37
|
+
prompt?: string | undefined;
|
|
38
38
|
/**
|
|
39
|
-
* A value in string
|
|
39
|
+
* A value in string format that is a large number
|
|
40
40
|
*/
|
|
41
|
-
completion?:
|
|
41
|
+
completion?: string | undefined;
|
|
42
42
|
/**
|
|
43
|
-
* A value in string
|
|
43
|
+
* A value in string format that is a large number
|
|
44
44
|
*/
|
|
45
|
-
image?:
|
|
45
|
+
image?: string | undefined;
|
|
46
46
|
/**
|
|
47
|
-
* A value in string
|
|
47
|
+
* A value in string format that is a large number
|
|
48
48
|
*/
|
|
49
|
-
audio?:
|
|
49
|
+
audio?: string | undefined;
|
|
50
50
|
/**
|
|
51
|
-
* A value in string
|
|
51
|
+
* A value in string format that is a large number
|
|
52
52
|
*/
|
|
53
|
-
request?:
|
|
53
|
+
request?: string | undefined;
|
|
54
54
|
};
|
|
55
55
|
export type CreateEmbeddingsProvider = {
|
|
56
56
|
/**
|
|
@@ -106,6 +106,14 @@ export type CreateEmbeddingsProvider = {
|
|
|
106
106
|
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
107
107
|
*/
|
|
108
108
|
maxPrice?: MaxPrice | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
|
|
111
|
+
*/
|
|
112
|
+
minThroughput?: number | null | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
|
|
115
|
+
*/
|
|
116
|
+
maxLatency?: number | null | undefined;
|
|
109
117
|
};
|
|
110
118
|
export type CreateEmbeddingsRequest = {
|
|
111
119
|
input: string | Array<string> | Array<number> | Array<Array<number>> | Array<Input>;
|
|
@@ -205,11 +213,11 @@ export declare const Ignore$outboundSchema: z.ZodType<Ignore$Outbound, Ignore>;
|
|
|
205
213
|
export declare function ignoreToJSON(ignore: Ignore): string;
|
|
206
214
|
/** @internal */
|
|
207
215
|
export type MaxPrice$Outbound = {
|
|
208
|
-
prompt?:
|
|
209
|
-
completion?:
|
|
210
|
-
image?:
|
|
211
|
-
audio?:
|
|
212
|
-
request?:
|
|
216
|
+
prompt?: string | undefined;
|
|
217
|
+
completion?: string | undefined;
|
|
218
|
+
image?: string | undefined;
|
|
219
|
+
audio?: string | undefined;
|
|
220
|
+
request?: string | undefined;
|
|
213
221
|
};
|
|
214
222
|
/** @internal */
|
|
215
223
|
export declare const MaxPrice$outboundSchema: z.ZodType<MaxPrice$Outbound, MaxPrice>;
|
|
@@ -227,6 +235,8 @@ export type CreateEmbeddingsProvider$Outbound = {
|
|
|
227
235
|
quantizations?: Array<string> | null | undefined;
|
|
228
236
|
sort?: string | null | undefined;
|
|
229
237
|
max_price?: MaxPrice$Outbound | undefined;
|
|
238
|
+
min_throughput?: number | null | undefined;
|
|
239
|
+
max_latency?: number | null | undefined;
|
|
230
240
|
};
|
|
231
241
|
/** @internal */
|
|
232
242
|
export declare const CreateEmbeddingsProvider$outboundSchema: z.ZodType<CreateEmbeddingsProvider$Outbound, CreateEmbeddingsProvider>;
|
|
@@ -101,11 +101,11 @@ export function ignoreToJSON(ignore) {
|
|
|
101
101
|
/** @internal */
|
|
102
102
|
export const MaxPrice$outboundSchema = z
|
|
103
103
|
.object({
|
|
104
|
-
prompt: z.
|
|
105
|
-
completion: z.
|
|
106
|
-
image: z.
|
|
107
|
-
audio: z.
|
|
108
|
-
request: z.
|
|
104
|
+
prompt: z.string().optional(),
|
|
105
|
+
completion: z.string().optional(),
|
|
106
|
+
image: z.string().optional(),
|
|
107
|
+
audio: z.string().optional(),
|
|
108
|
+
request: z.string().optional(),
|
|
109
109
|
});
|
|
110
110
|
export function maxPriceToJSON(maxPrice) {
|
|
111
111
|
return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice));
|
|
@@ -124,6 +124,8 @@ export const CreateEmbeddingsProvider$outboundSchema = z.object({
|
|
|
124
124
|
.optional(),
|
|
125
125
|
sort: z.nullable(models.ProviderSort$outboundSchema).optional(),
|
|
126
126
|
maxPrice: z.lazy(() => MaxPrice$outboundSchema).optional(),
|
|
127
|
+
minThroughput: z.nullable(z.number()).optional(),
|
|
128
|
+
maxLatency: z.nullable(z.number()).optional(),
|
|
127
129
|
}).transform((v) => {
|
|
128
130
|
return remap$(v, {
|
|
129
131
|
allowFallbacks: "allow_fallbacks",
|
|
@@ -131,6 +133,8 @@ export const CreateEmbeddingsProvider$outboundSchema = z.object({
|
|
|
131
133
|
dataCollection: "data_collection",
|
|
132
134
|
enforceDistillableText: "enforce_distillable_text",
|
|
133
135
|
maxPrice: "max_price",
|
|
136
|
+
minThroughput: "min_throughput",
|
|
137
|
+
maxLatency: "max_latency",
|
|
134
138
|
});
|
|
135
139
|
});
|
|
136
140
|
export function createEmbeddingsProviderToJSON(createEmbeddingsProvider) {
|
|
@@ -42,6 +42,7 @@ export declare const GetParametersProvider: {
|
|
|
42
42
|
readonly Infermatic: "Infermatic";
|
|
43
43
|
readonly Inflection: "Inflection";
|
|
44
44
|
readonly Liquid: "Liquid";
|
|
45
|
+
readonly Mara: "Mara";
|
|
45
46
|
readonly Mancer2: "Mancer 2";
|
|
46
47
|
readonly Minimax: "Minimax";
|
|
47
48
|
readonly ModelRun: "ModelRun";
|
|
@@ -62,6 +63,7 @@ export declare const GetParametersProvider: {
|
|
|
62
63
|
readonly Relace: "Relace";
|
|
63
64
|
readonly SambaNova: "SambaNova";
|
|
64
65
|
readonly SiliconFlow: "SiliconFlow";
|
|
66
|
+
readonly Sourceful: "Sourceful";
|
|
65
67
|
readonly Stealth: "Stealth";
|
|
66
68
|
readonly StreamLake: "StreamLake";
|
|
67
69
|
readonly Switchpoint: "Switchpoint";
|
|
@@ -69,6 +71,7 @@ export declare const GetParametersProvider: {
|
|
|
69
71
|
readonly Together: "Together";
|
|
70
72
|
readonly Venice: "Venice";
|
|
71
73
|
readonly WandB: "WandB";
|
|
74
|
+
readonly Xiaomi: "Xiaomi";
|
|
72
75
|
readonly XAI: "xAI";
|
|
73
76
|
readonly ZAi: "Z.AI";
|
|
74
77
|
readonly FakeProvider: "FakeProvider";
|
|
@@ -42,6 +42,7 @@ export const GetParametersProvider = {
|
|
|
42
42
|
Infermatic: "Infermatic",
|
|
43
43
|
Inflection: "Inflection",
|
|
44
44
|
Liquid: "Liquid",
|
|
45
|
+
Mara: "Mara",
|
|
45
46
|
Mancer2: "Mancer 2",
|
|
46
47
|
Minimax: "Minimax",
|
|
47
48
|
ModelRun: "ModelRun",
|
|
@@ -62,6 +63,7 @@ export const GetParametersProvider = {
|
|
|
62
63
|
Relace: "Relace",
|
|
63
64
|
SambaNova: "SambaNova",
|
|
64
65
|
SiliconFlow: "SiliconFlow",
|
|
66
|
+
Sourceful: "Sourceful",
|
|
65
67
|
Stealth: "Stealth",
|
|
66
68
|
StreamLake: "StreamLake",
|
|
67
69
|
Switchpoint: "Switchpoint",
|
|
@@ -69,6 +71,7 @@ export const GetParametersProvider = {
|
|
|
69
71
|
Together: "Together",
|
|
70
72
|
Venice: "Venice",
|
|
71
73
|
WandB: "WandB",
|
|
74
|
+
Xiaomi: "Xiaomi",
|
|
72
75
|
XAI: "xAI",
|
|
73
76
|
ZAi: "Z.AI",
|
|
74
77
|
FakeProvider: "FakeProvider",
|
|
@@ -37,6 +37,7 @@ export declare const ProviderName: {
|
|
|
37
37
|
readonly Infermatic: "Infermatic";
|
|
38
38
|
readonly Inflection: "Inflection";
|
|
39
39
|
readonly Liquid: "Liquid";
|
|
40
|
+
readonly Mara: "Mara";
|
|
40
41
|
readonly Mancer2: "Mancer 2";
|
|
41
42
|
readonly Minimax: "Minimax";
|
|
42
43
|
readonly ModelRun: "ModelRun";
|
|
@@ -57,6 +58,7 @@ export declare const ProviderName: {
|
|
|
57
58
|
readonly Relace: "Relace";
|
|
58
59
|
readonly SambaNova: "SambaNova";
|
|
59
60
|
readonly SiliconFlow: "SiliconFlow";
|
|
61
|
+
readonly Sourceful: "Sourceful";
|
|
60
62
|
readonly Stealth: "Stealth";
|
|
61
63
|
readonly StreamLake: "StreamLake";
|
|
62
64
|
readonly Switchpoint: "Switchpoint";
|
|
@@ -64,6 +66,7 @@ export declare const ProviderName: {
|
|
|
64
66
|
readonly Together: "Together";
|
|
65
67
|
readonly Venice: "Venice";
|
|
66
68
|
readonly WandB: "WandB";
|
|
69
|
+
readonly Xiaomi: "Xiaomi";
|
|
67
70
|
readonly XAI: "xAI";
|
|
68
71
|
readonly ZAi: "Z.AI";
|
|
69
72
|
readonly FakeProvider: "FakeProvider";
|
|
@@ -39,6 +39,7 @@ export const ProviderName = {
|
|
|
39
39
|
Infermatic: "Infermatic",
|
|
40
40
|
Inflection: "Inflection",
|
|
41
41
|
Liquid: "Liquid",
|
|
42
|
+
Mara: "Mara",
|
|
42
43
|
Mancer2: "Mancer 2",
|
|
43
44
|
Minimax: "Minimax",
|
|
44
45
|
ModelRun: "ModelRun",
|
|
@@ -59,6 +60,7 @@ export const ProviderName = {
|
|
|
59
60
|
Relace: "Relace",
|
|
60
61
|
SambaNova: "SambaNova",
|
|
61
62
|
SiliconFlow: "SiliconFlow",
|
|
63
|
+
Sourceful: "Sourceful",
|
|
62
64
|
Stealth: "Stealth",
|
|
63
65
|
StreamLake: "StreamLake",
|
|
64
66
|
Switchpoint: "Switchpoint",
|
|
@@ -66,6 +68,7 @@ export const ProviderName = {
|
|
|
66
68
|
Together: "Together",
|
|
67
69
|
Venice: "Venice",
|
|
68
70
|
WandB: "WandB",
|
|
71
|
+
Xiaomi: "Xiaomi",
|
|
69
72
|
XAI: "xAI",
|
|
70
73
|
ZAi: "Z.AI",
|
|
71
74
|
FakeProvider: "FakeProvider",
|
|
@@ -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
|
|
10
|
+
* A value in string format that is a large number
|
|
11
11
|
*/
|
|
12
|
-
prompt
|
|
12
|
+
prompt: string;
|
|
13
13
|
/**
|
|
14
|
-
* A value in string
|
|
14
|
+
* A value in string format that is a large number
|
|
15
15
|
*/
|
|
16
|
-
completion
|
|
16
|
+
completion: string;
|
|
17
17
|
/**
|
|
18
|
-
* A value in string
|
|
18
|
+
* A value in string format that is a large number
|
|
19
19
|
*/
|
|
20
|
-
request?:
|
|
20
|
+
request?: string | undefined;
|
|
21
21
|
/**
|
|
22
|
-
* A value in string
|
|
22
|
+
* A value in string format that is a large number
|
|
23
23
|
*/
|
|
24
|
-
image?:
|
|
24
|
+
image?: string | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* A value in string
|
|
26
|
+
* A value in string format that is a large number
|
|
27
27
|
*/
|
|
28
|
-
imageToken?:
|
|
28
|
+
imageToken?: string | undefined;
|
|
29
29
|
/**
|
|
30
|
-
* A value in string
|
|
30
|
+
* A value in string format that is a large number
|
|
31
31
|
*/
|
|
32
|
-
imageOutput?:
|
|
32
|
+
imageOutput?: string | undefined;
|
|
33
33
|
/**
|
|
34
|
-
* A value in string
|
|
34
|
+
* A value in string format that is a large number
|
|
35
35
|
*/
|
|
36
|
-
audio?:
|
|
36
|
+
audio?: string | undefined;
|
|
37
37
|
/**
|
|
38
|
-
* A value in string
|
|
38
|
+
* A value in string format that is a large number
|
|
39
39
|
*/
|
|
40
|
-
inputAudioCache?:
|
|
40
|
+
inputAudioCache?: string | undefined;
|
|
41
41
|
/**
|
|
42
|
-
* A value in string
|
|
42
|
+
* A value in string format that is a large number
|
|
43
43
|
*/
|
|
44
|
-
webSearch?:
|
|
44
|
+
webSearch?: string | undefined;
|
|
45
45
|
/**
|
|
46
|
-
* A value in string
|
|
46
|
+
* A value in string format that is a large number
|
|
47
47
|
*/
|
|
48
|
-
internalReasoning?:
|
|
48
|
+
internalReasoning?: string | undefined;
|
|
49
49
|
/**
|
|
50
|
-
* A value in string
|
|
50
|
+
* A value in string format that is a large number
|
|
51
51
|
*/
|
|
52
|
-
inputCacheRead?:
|
|
52
|
+
inputCacheRead?: string | undefined;
|
|
53
53
|
/**
|
|
54
|
-
* A value in string
|
|
54
|
+
* A value in string format that is a large number
|
|
55
55
|
*/
|
|
56
|
-
inputCacheWrite?:
|
|
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.
|
|
25
|
-
completion: z.
|
|
26
|
-
request: z.
|
|
27
|
-
image: z.
|
|
28
|
-
image_token: z.
|
|
29
|
-
image_output: z.
|
|
30
|
-
audio: z.
|
|
31
|
-
input_audio_cache: z.
|
|
32
|
-
web_search: z.
|
|
33
|
-
internal_reasoning: z.
|
|
34
|
-
input_cache_read: z.
|
|
35
|
-
input_cache_write: z.
|
|
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
|
|
9
|
+
* A value in string format that is a large number
|
|
10
10
|
*/
|
|
11
|
-
prompt
|
|
11
|
+
prompt: string;
|
|
12
12
|
/**
|
|
13
|
-
* A value in string
|
|
13
|
+
* A value in string format that is a large number
|
|
14
14
|
*/
|
|
15
|
-
completion
|
|
15
|
+
completion: string;
|
|
16
16
|
/**
|
|
17
|
-
* A value in string
|
|
17
|
+
* A value in string format that is a large number
|
|
18
18
|
*/
|
|
19
|
-
request?:
|
|
19
|
+
request?: string | undefined;
|
|
20
20
|
/**
|
|
21
|
-
* A value in string
|
|
21
|
+
* A value in string format that is a large number
|
|
22
22
|
*/
|
|
23
|
-
image?:
|
|
23
|
+
image?: string | undefined;
|
|
24
24
|
/**
|
|
25
|
-
* A value in string
|
|
25
|
+
* A value in string format that is a large number
|
|
26
26
|
*/
|
|
27
|
-
imageToken?:
|
|
27
|
+
imageToken?: string | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* A value in string
|
|
29
|
+
* A value in string format that is a large number
|
|
30
30
|
*/
|
|
31
|
-
imageOutput?:
|
|
31
|
+
imageOutput?: string | undefined;
|
|
32
32
|
/**
|
|
33
|
-
* A value in string
|
|
33
|
+
* A value in string format that is a large number
|
|
34
34
|
*/
|
|
35
|
-
audio?:
|
|
35
|
+
audio?: string | undefined;
|
|
36
36
|
/**
|
|
37
|
-
* A value in string
|
|
37
|
+
* A value in string format that is a large number
|
|
38
38
|
*/
|
|
39
|
-
inputAudioCache?:
|
|
39
|
+
inputAudioCache?: string | undefined;
|
|
40
40
|
/**
|
|
41
|
-
* A value in string
|
|
41
|
+
* A value in string format that is a large number
|
|
42
42
|
*/
|
|
43
|
-
webSearch?:
|
|
43
|
+
webSearch?: string | undefined;
|
|
44
44
|
/**
|
|
45
|
-
* A value in string
|
|
45
|
+
* A value in string format that is a large number
|
|
46
46
|
*/
|
|
47
|
-
internalReasoning?:
|
|
47
|
+
internalReasoning?: string | undefined;
|
|
48
48
|
/**
|
|
49
|
-
* A value in string
|
|
49
|
+
* A value in string format that is a large number
|
|
50
50
|
*/
|
|
51
|
-
inputCacheRead?:
|
|
51
|
+
inputCacheRead?: string | undefined;
|
|
52
52
|
/**
|
|
53
|
-
* A value in string
|
|
53
|
+
* A value in string format that is a large number
|
|
54
54
|
*/
|
|
55
|
-
inputCacheWrite?:
|
|
55
|
+
inputCacheWrite?: string | undefined;
|
|
56
56
|
discount?: number | undefined;
|
|
57
57
|
};
|
|
58
58
|
/** @internal */
|
|
@@ -7,18 +7,18 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const PublicPricing$inboundSchema = z
|
|
9
9
|
.object({
|
|
10
|
-
prompt: z.
|
|
11
|
-
completion: z.
|
|
12
|
-
request: z.
|
|
13
|
-
image: z.
|
|
14
|
-
image_token: z.
|
|
15
|
-
image_output: z.
|
|
16
|
-
audio: z.
|
|
17
|
-
input_audio_cache: z.
|
|
18
|
-
web_search: z.
|
|
19
|
-
internal_reasoning: z.
|
|
20
|
-
input_cache_read: z.
|
|
21
|
-
input_cache_write: z.
|
|
10
|
+
prompt: z.string(),
|
|
11
|
+
completion: z.string(),
|
|
12
|
+
request: z.string().optional(),
|
|
13
|
+
image: z.string().optional(),
|
|
14
|
+
image_token: z.string().optional(),
|
|
15
|
+
image_output: z.string().optional(),
|
|
16
|
+
audio: z.string().optional(),
|
|
17
|
+
input_audio_cache: z.string().optional(),
|
|
18
|
+
web_search: z.string().optional(),
|
|
19
|
+
internal_reasoning: z.string().optional(),
|
|
20
|
+
input_cache_read: z.string().optional(),
|
|
21
|
+
input_cache_write: z.string().optional(),
|
|
22
22
|
discount: z.number().optional(),
|
|
23
23
|
}).transform((v) => {
|
|
24
24
|
return remap$(v, {
|