@openrouter/sdk 0.1.10 → 0.1.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 +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/chatcompletionfinishreason.js +2 -7
- package/esm/models/chatgenerationparams.d.ts +1 -1
- package/esm/models/chatgenerationparams.js +3 -4
- package/esm/models/chatmessagecontentitemaudio.d.ts +1 -1
- package/esm/models/chatmessagecontentitemaudio.js +3 -10
- package/esm/models/chatmessagecontentitemimage.d.ts +1 -1
- package/esm/models/chatmessagecontentitemimage.js +3 -10
- package/esm/models/completionchoice.js +2 -6
- package/esm/models/createchargerequest.d.ts +1 -1
- package/esm/models/createchargerequest.js +3 -4
- package/esm/models/endpointstatus.js +2 -7
- package/esm/models/imagegenerationstatus.d.ts +1 -1
- package/esm/models/imagegenerationstatus.js +3 -11
- package/esm/models/inputmodality.js +2 -7
- package/esm/models/instructtype.js +2 -7
- package/esm/models/listendpointsresponse.js +3 -6
- package/esm/models/modelarchitecture.js +2 -6
- package/esm/models/modelgroup.js +2 -7
- package/esm/models/openairesponsesincludable.d.ts +1 -1
- package/esm/models/openairesponsesincludable.js +2 -5
- package/esm/models/openairesponsesincompletedetails.js +3 -6
- package/esm/models/openairesponsesreasoningeffort.d.ts +1 -1
- package/esm/models/openairesponsesreasoningeffort.js +3 -11
- package/esm/models/openairesponsesresponsestatus.js +2 -7
- package/esm/models/openairesponsesservicetier.js +2 -7
- package/esm/models/openairesponsestruncation.js +2 -7
- package/esm/models/openresponsesreasoning.d.ts +1 -1
- package/esm/models/openresponsesreasoning.js +2 -4
- package/esm/models/openresponsesrequest.d.ts +6 -6
- package/esm/models/openresponsesrequest.js +10 -27
- package/esm/models/openresponsesresponsetext.d.ts +1 -1
- package/esm/models/openresponsesresponsetext.js +2 -4
- package/esm/models/operations/createauthkeyscode.d.ts +1 -1
- package/esm/models/operations/createauthkeyscode.js +2 -4
- package/esm/models/operations/createembeddings.d.ts +2 -2
- package/esm/models/operations/createembeddings.js +4 -8
- package/esm/models/operations/createkeys.d.ts +2 -2
- package/esm/models/operations/createkeys.js +2 -4
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +1 -1
- package/esm/models/operations/exchangeauthcodeforapikey.js +3 -4
- package/esm/models/operations/getcurrentkey.d.ts +4 -0
- package/esm/models/operations/getcurrentkey.js +2 -0
- package/esm/models/operations/getgeneration.js +3 -6
- package/esm/models/operations/getparameters.d.ts +1 -1
- package/esm/models/operations/getparameters.js +3 -10
- package/esm/models/operations/updatekeys.d.ts +1 -1
- package/esm/models/operations/updatekeys.js +2 -4
- package/esm/models/outputmodality.js +2 -7
- package/esm/models/parameter.js +3 -7
- package/esm/models/providername.d.ts +1 -1
- package/esm/models/providername.js +3 -11
- package/esm/models/publicendpoint.js +2 -6
- package/esm/models/quantization.d.ts +1 -1
- package/esm/models/quantization.js +2 -5
- package/esm/models/reasoningsummaryverbosity.d.ts +1 -1
- package/esm/models/reasoningsummaryverbosity.js +3 -11
- package/esm/models/responseinputaudio.d.ts +1 -1
- package/esm/models/responseinputaudio.js +3 -10
- package/esm/models/responseinputimage.d.ts +1 -1
- package/esm/models/responseinputimage.js +3 -10
- package/esm/models/responseserrorfield.js +3 -6
- package/esm/models/responsessearchcontextsize.d.ts +1 -1
- package/esm/models/responsessearchcontextsize.js +3 -11
- package/esm/models/responsetextconfig.js +2 -6
- package/esm/models/toolcallstatus.d.ts +1 -1
- package/esm/models/toolcallstatus.js +3 -11
- package/esm/models/websearchstatus.d.ts +1 -1
- package/esm/models/websearchstatus.js +3 -11
- package/esm/types/enums.d.ts +10 -6
- package/esm/types/enums.js +38 -1
- package/esm/types/index.d.ts +0 -1
- package/esm/types/index.js +0 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
6
7
|
import { OpenAIResponsesIncludable$outboundSchema, } from "./openairesponsesincludable.js";
|
|
7
8
|
import { OpenAIResponsesPrompt$outboundSchema, } from "./openairesponsesprompt.js";
|
|
8
9
|
import { OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js";
|
|
@@ -91,22 +92,11 @@ export function openResponsesRequestToolUnionToJSON(openResponsesRequestToolUnio
|
|
|
91
92
|
return JSON.stringify(OpenResponsesRequestToolUnion$outboundSchema.parse(openResponsesRequestToolUnion));
|
|
92
93
|
}
|
|
93
94
|
/** @internal */
|
|
94
|
-
export const ServiceTier$outboundSchema =
|
|
95
|
-
.union([
|
|
96
|
-
z.enum(ServiceTier),
|
|
97
|
-
z.string().and(z.custom()),
|
|
98
|
-
]);
|
|
95
|
+
export const ServiceTier$outboundSchema = openEnums.outboundSchema(ServiceTier);
|
|
99
96
|
/** @internal */
|
|
100
|
-
export const Truncation$outboundSchema =
|
|
101
|
-
.union([
|
|
102
|
-
z.enum(Truncation),
|
|
103
|
-
z.string().and(z.custom()),
|
|
104
|
-
]);
|
|
97
|
+
export const Truncation$outboundSchema = openEnums.outboundSchema(Truncation);
|
|
105
98
|
/** @internal */
|
|
106
|
-
export const DataCollection$outboundSchema =
|
|
107
|
-
z.enum(DataCollection),
|
|
108
|
-
z.string().and(z.custom()),
|
|
109
|
-
]);
|
|
99
|
+
export const DataCollection$outboundSchema = openEnums.outboundSchema(DataCollection);
|
|
110
100
|
/** @internal */
|
|
111
101
|
export const Order$outboundSchema = z.union([
|
|
112
102
|
ProviderName$outboundSchema,
|
|
@@ -130,10 +120,8 @@ export function ignoreToJSON(ignore) {
|
|
|
130
120
|
return JSON.stringify(Ignore$outboundSchema.parse(ignore));
|
|
131
121
|
}
|
|
132
122
|
/** @internal */
|
|
133
|
-
export const Sort$outboundSchema =
|
|
134
|
-
|
|
135
|
-
z.string().and(z.custom()),
|
|
136
|
-
]);
|
|
123
|
+
export const Sort$outboundSchema = openEnums
|
|
124
|
+
.outboundSchema(Sort);
|
|
137
125
|
/** @internal */
|
|
138
126
|
export const MaxPrice$outboundSchema = z
|
|
139
127
|
.object({
|
|
@@ -176,11 +164,8 @@ export function providerToJSON(provider) {
|
|
|
176
164
|
export const IdFileParser$outboundSchema = z
|
|
177
165
|
.enum(IdFileParser);
|
|
178
166
|
/** @internal */
|
|
179
|
-
export const PdfEngine$outboundSchema =
|
|
180
|
-
.
|
|
181
|
-
z.enum(PdfEngine),
|
|
182
|
-
z.string().and(z.custom()),
|
|
183
|
-
]);
|
|
167
|
+
export const PdfEngine$outboundSchema = openEnums
|
|
168
|
+
.outboundSchema(PdfEngine);
|
|
184
169
|
/** @internal */
|
|
185
170
|
export const Pdf$outboundSchema = z.object({
|
|
186
171
|
engine: PdfEngine$outboundSchema.optional(),
|
|
@@ -204,10 +189,8 @@ export function pluginFileParserToJSON(pluginFileParser) {
|
|
|
204
189
|
/** @internal */
|
|
205
190
|
export const IdWeb$outboundSchema = z.enum(IdWeb);
|
|
206
191
|
/** @internal */
|
|
207
|
-
export const Engine$outboundSchema =
|
|
208
|
-
|
|
209
|
-
z.string().and(z.custom()),
|
|
210
|
-
]);
|
|
192
|
+
export const Engine$outboundSchema = openEnums
|
|
193
|
+
.outboundSchema(Engine);
|
|
211
194
|
/** @internal */
|
|
212
195
|
export const PluginWeb$outboundSchema = z.object({
|
|
213
196
|
id: IdWeb$outboundSchema,
|
|
@@ -18,7 +18,7 @@ export type OpenResponsesResponseText = {
|
|
|
18
18
|
verbosity?: OpenResponsesResponseTextVerbosity | null | undefined;
|
|
19
19
|
};
|
|
20
20
|
/** @internal */
|
|
21
|
-
export declare const OpenResponsesResponseTextVerbosity$outboundSchema: z.ZodType<
|
|
21
|
+
export declare const OpenResponsesResponseTextVerbosity$outboundSchema: z.ZodType<string, OpenResponsesResponseTextVerbosity>;
|
|
22
22
|
/** @internal */
|
|
23
23
|
export type OpenResponsesResponseText$Outbound = {
|
|
24
24
|
format?: ResponseFormatTextConfig$Outbound | undefined;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
5
6
|
import { ResponseFormatTextConfig$outboundSchema, } from "./responseformattextconfig.js";
|
|
6
7
|
export const OpenResponsesResponseTextVerbosity = {
|
|
7
8
|
High: "high",
|
|
@@ -9,10 +10,7 @@ export const OpenResponsesResponseTextVerbosity = {
|
|
|
9
10
|
Medium: "medium",
|
|
10
11
|
};
|
|
11
12
|
/** @internal */
|
|
12
|
-
export const OpenResponsesResponseTextVerbosity$outboundSchema =
|
|
13
|
-
z.enum(OpenResponsesResponseTextVerbosity),
|
|
14
|
-
z.string().and(z.custom()),
|
|
15
|
-
]);
|
|
13
|
+
export const OpenResponsesResponseTextVerbosity$outboundSchema = openEnums.outboundSchema(OpenResponsesResponseTextVerbosity);
|
|
16
14
|
/** @internal */
|
|
17
15
|
export const OpenResponsesResponseText$outboundSchema = z.object({
|
|
18
16
|
format: ResponseFormatTextConfig$outboundSchema.optional(),
|
|
@@ -62,7 +62,7 @@ export type CreateAuthKeysCodeResponse = {
|
|
|
62
62
|
data: CreateAuthKeysCodeData;
|
|
63
63
|
};
|
|
64
64
|
/** @internal */
|
|
65
|
-
export declare const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType<
|
|
65
|
+
export declare const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType<string, CreateAuthKeysCodeCodeChallengeMethod>;
|
|
66
66
|
/** @internal */
|
|
67
67
|
export type CreateAuthKeysCodeRequest$Outbound = {
|
|
68
68
|
callback_url: string;
|
|
@@ -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
|
* The method used to generate the code challenge
|
|
9
10
|
*/
|
|
@@ -12,10 +13,7 @@ export const CreateAuthKeysCodeCodeChallengeMethod = {
|
|
|
12
13
|
Plain: "plain",
|
|
13
14
|
};
|
|
14
15
|
/** @internal */
|
|
15
|
-
export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema =
|
|
16
|
-
z.enum(CreateAuthKeysCodeCodeChallengeMethod),
|
|
17
|
-
z.string().and(z.custom()),
|
|
18
|
-
]);
|
|
16
|
+
export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema = openEnums.outboundSchema(CreateAuthKeysCodeCodeChallengeMethod);
|
|
19
17
|
/** @internal */
|
|
20
18
|
export const CreateAuthKeysCodeRequest$outboundSchema = z.object({
|
|
21
19
|
callbackUrl: z.string(),
|
|
@@ -169,7 +169,7 @@ export type Input$Outbound = string | Array<string> | Array<number> | Array<Arra
|
|
|
169
169
|
export declare const Input$outboundSchema: z.ZodType<Input$Outbound, Input>;
|
|
170
170
|
export declare function inputToJSON(input: Input): string;
|
|
171
171
|
/** @internal */
|
|
172
|
-
export declare const DataCollection$outboundSchema: z.ZodType<
|
|
172
|
+
export declare const DataCollection$outboundSchema: z.ZodType<string, DataCollection>;
|
|
173
173
|
/** @internal */
|
|
174
174
|
export type Order$Outbound = string | string;
|
|
175
175
|
/** @internal */
|
|
@@ -186,7 +186,7 @@ export type Ignore$Outbound = string | string;
|
|
|
186
186
|
export declare const Ignore$outboundSchema: z.ZodType<Ignore$Outbound, Ignore>;
|
|
187
187
|
export declare function ignoreToJSON(ignore: Ignore): string;
|
|
188
188
|
/** @internal */
|
|
189
|
-
export declare const Sort$outboundSchema: z.ZodType<
|
|
189
|
+
export declare const Sort$outboundSchema: z.ZodType<string, Sort>;
|
|
190
190
|
/** @internal */
|
|
191
191
|
export type MaxPrice$Outbound = {
|
|
192
192
|
prompt?: any | 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
|
import * as models from "../index.js";
|
|
8
9
|
/**
|
|
9
10
|
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
@@ -47,10 +48,7 @@ export function inputToJSON(input) {
|
|
|
47
48
|
return JSON.stringify(Input$outboundSchema.parse(input));
|
|
48
49
|
}
|
|
49
50
|
/** @internal */
|
|
50
|
-
export const DataCollection$outboundSchema =
|
|
51
|
-
z.enum(DataCollection),
|
|
52
|
-
z.string().and(z.custom()),
|
|
53
|
-
]);
|
|
51
|
+
export const DataCollection$outboundSchema = openEnums.outboundSchema(DataCollection);
|
|
54
52
|
/** @internal */
|
|
55
53
|
export const Order$outboundSchema = z.union([
|
|
56
54
|
models.ProviderName$outboundSchema,
|
|
@@ -74,10 +72,8 @@ export function ignoreToJSON(ignore) {
|
|
|
74
72
|
return JSON.stringify(Ignore$outboundSchema.parse(ignore));
|
|
75
73
|
}
|
|
76
74
|
/** @internal */
|
|
77
|
-
export const Sort$outboundSchema =
|
|
78
|
-
|
|
79
|
-
z.string().and(z.custom()),
|
|
80
|
-
]);
|
|
75
|
+
export const Sort$outboundSchema = openEnums
|
|
76
|
+
.outboundSchema(Sort);
|
|
81
77
|
/** @internal */
|
|
82
78
|
export const MaxPrice$outboundSchema = z
|
|
83
79
|
.object({
|
|
@@ -32,7 +32,7 @@ export type CreateKeysRequest = {
|
|
|
32
32
|
*/
|
|
33
33
|
includeByokInLimit?: boolean | undefined;
|
|
34
34
|
/**
|
|
35
|
-
* Optional ISO 8601 timestamp
|
|
35
|
+
* Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected
|
|
36
36
|
*/
|
|
37
37
|
expiresAt?: Date | null | undefined;
|
|
38
38
|
};
|
|
@@ -131,7 +131,7 @@ export type CreateKeysResponse = {
|
|
|
131
131
|
key: string;
|
|
132
132
|
};
|
|
133
133
|
/** @internal */
|
|
134
|
-
export declare const CreateKeysLimitReset$outboundSchema: z.ZodType<
|
|
134
|
+
export declare const CreateKeysLimitReset$outboundSchema: z.ZodType<string, CreateKeysLimitReset>;
|
|
135
135
|
/** @internal */
|
|
136
136
|
export type CreateKeysRequest$Outbound = {
|
|
137
137
|
name: string;
|
|
@@ -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
|
* Type of limit reset 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 CreateKeysLimitReset = {
|
|
|
13
14
|
Monthly: "monthly",
|
|
14
15
|
};
|
|
15
16
|
/** @internal */
|
|
16
|
-
export const CreateKeysLimitReset$outboundSchema =
|
|
17
|
-
z.enum(CreateKeysLimitReset),
|
|
18
|
-
z.string().and(z.custom()),
|
|
19
|
-
]);
|
|
17
|
+
export const CreateKeysLimitReset$outboundSchema = openEnums.outboundSchema(CreateKeysLimitReset);
|
|
20
18
|
/** @internal */
|
|
21
19
|
export const CreateKeysRequest$outboundSchema = z.object({
|
|
22
20
|
name: z.string(),
|
|
@@ -41,7 +41,7 @@ export type ExchangeAuthCodeForAPIKeyResponse = {
|
|
|
41
41
|
userId: string | null;
|
|
42
42
|
};
|
|
43
43
|
/** @internal */
|
|
44
|
-
export declare const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: z.ZodType<
|
|
44
|
+
export declare const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: z.ZodType<string, ExchangeAuthCodeForAPIKeyCodeChallengeMethod>;
|
|
45
45
|
/** @internal */
|
|
46
46
|
export type ExchangeAuthCodeForAPIKeyRequest$Outbound = {
|
|
47
47
|
code: string;
|
|
@@ -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
|
* The method used to generate the code challenge
|
|
9
10
|
*/
|
|
@@ -12,10 +13,8 @@ export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod = {
|
|
|
12
13
|
Plain: "plain",
|
|
13
14
|
};
|
|
14
15
|
/** @internal */
|
|
15
|
-
export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema =
|
|
16
|
-
|
|
17
|
-
z.string().and(z.custom()),
|
|
18
|
-
]);
|
|
16
|
+
export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema = openEnums
|
|
17
|
+
.outboundSchema(ExchangeAuthCodeForAPIKeyCodeChallengeMethod);
|
|
19
18
|
/** @internal */
|
|
20
19
|
export const ExchangeAuthCodeForAPIKeyRequest$outboundSchema = z.object({
|
|
21
20
|
code: z.string(),
|
|
@@ -84,6 +84,10 @@ export type GetCurrentKeyData = {
|
|
|
84
84
|
* Whether to include external BYOK usage in the credit limit
|
|
85
85
|
*/
|
|
86
86
|
includeByokInLimit: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* ISO 8601 UTC timestamp when the API key expires, or null if no expiration
|
|
89
|
+
*/
|
|
90
|
+
expiresAt?: Date | null | undefined;
|
|
87
91
|
/**
|
|
88
92
|
* Legacy rate limit information about a key. Will always return -1.
|
|
89
93
|
*
|
|
@@ -30,6 +30,7 @@ export const GetCurrentKeyData$inboundSchema = z.object({
|
|
|
30
30
|
limit_remaining: z.nullable(z.number()),
|
|
31
31
|
limit_reset: z.nullable(z.string()),
|
|
32
32
|
include_byok_in_limit: z.boolean(),
|
|
33
|
+
expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
33
34
|
rate_limit: z.lazy(() => RateLimit$inboundSchema),
|
|
34
35
|
}).transform((v) => {
|
|
35
36
|
return remap$(v, {
|
|
@@ -45,6 +46,7 @@ export const GetCurrentKeyData$inboundSchema = z.object({
|
|
|
45
46
|
"limit_remaining": "limitRemaining",
|
|
46
47
|
"limit_reset": "limitReset",
|
|
47
48
|
"include_byok_in_limit": "includeByokInLimit",
|
|
49
|
+
"expires_at": "expiresAt",
|
|
48
50
|
"rate_limit": "rateLimit",
|
|
49
51
|
});
|
|
50
52
|
});
|
|
@@ -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
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
8
|
/**
|
|
9
9
|
* Type of API used for the generation
|
|
10
10
|
*/
|
|
@@ -20,11 +20,8 @@ export function getGenerationRequestToJSON(getGenerationRequest) {
|
|
|
20
20
|
return JSON.stringify(GetGenerationRequest$outboundSchema.parse(getGenerationRequest));
|
|
21
21
|
}
|
|
22
22
|
/** @internal */
|
|
23
|
-
export const ApiType$inboundSchema =
|
|
24
|
-
.
|
|
25
|
-
z.enum(ApiType),
|
|
26
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
27
|
-
]);
|
|
23
|
+
export const ApiType$inboundSchema = openEnums
|
|
24
|
+
.inboundSchema(ApiType);
|
|
28
25
|
/** @internal */
|
|
29
26
|
export const GetGenerationData$inboundSchema = z.object({
|
|
30
27
|
id: z.string(),
|
|
@@ -137,7 +137,7 @@ export type GetParametersSecurity$Outbound = {
|
|
|
137
137
|
export declare const GetParametersSecurity$outboundSchema: z.ZodType<GetParametersSecurity$Outbound, GetParametersSecurity>;
|
|
138
138
|
export declare function getParametersSecurityToJSON(getParametersSecurity: GetParametersSecurity): string;
|
|
139
139
|
/** @internal */
|
|
140
|
-
export declare const GetParametersProvider$outboundSchema: z.ZodType<
|
|
140
|
+
export declare const GetParametersProvider$outboundSchema: z.ZodType<string, GetParametersProvider>;
|
|
141
141
|
/** @internal */
|
|
142
142
|
export type GetParametersRequest$Outbound = {
|
|
143
143
|
author: string;
|
|
@@ -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
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
8
|
export const GetParametersProvider = {
|
|
9
9
|
Ai21: "AI21",
|
|
10
10
|
AionLabs: "AionLabs",
|
|
@@ -108,10 +108,7 @@ export function getParametersSecurityToJSON(getParametersSecurity) {
|
|
|
108
108
|
return JSON.stringify(GetParametersSecurity$outboundSchema.parse(getParametersSecurity));
|
|
109
109
|
}
|
|
110
110
|
/** @internal */
|
|
111
|
-
export const GetParametersProvider$outboundSchema =
|
|
112
|
-
z.enum(GetParametersProvider),
|
|
113
|
-
z.string().and(z.custom()),
|
|
114
|
-
]);
|
|
111
|
+
export const GetParametersProvider$outboundSchema = openEnums.outboundSchema(GetParametersProvider);
|
|
115
112
|
/** @internal */
|
|
116
113
|
export const GetParametersRequest$outboundSchema = z.object({
|
|
117
114
|
author: z.string(),
|
|
@@ -122,11 +119,7 @@ export function getParametersRequestToJSON(getParametersRequest) {
|
|
|
122
119
|
return JSON.stringify(GetParametersRequest$outboundSchema.parse(getParametersRequest));
|
|
123
120
|
}
|
|
124
121
|
/** @internal */
|
|
125
|
-
export const SupportedParameter$inboundSchema =
|
|
126
|
-
.union([
|
|
127
|
-
z.enum(SupportedParameter),
|
|
128
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
129
|
-
]);
|
|
122
|
+
export const SupportedParameter$inboundSchema = openEnums.inboundSchema(SupportedParameter);
|
|
130
123
|
/** @internal */
|
|
131
124
|
export const GetParametersData$inboundSchema = z.object({
|
|
132
125
|
model: z.string(),
|
|
@@ -134,7 +134,7 @@ export type UpdateKeysResponse = {
|
|
|
134
134
|
data: UpdateKeysData;
|
|
135
135
|
};
|
|
136
136
|
/** @internal */
|
|
137
|
-
export declare const UpdateKeysLimitReset$outboundSchema: z.ZodType<
|
|
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 =
|
|
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(),
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
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 =
|
|
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
|
package/esm/models/parameter.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
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 =
|
|
33
|
-
.
|
|
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
|
|
@@ -92,5 +92,5 @@ export type ProviderName = OpenEnum<typeof ProviderName>;
|
|
|
92
92
|
/** @internal */
|
|
93
93
|
export declare const ProviderName$inboundSchema: z.ZodType<ProviderName, unknown>;
|
|
94
94
|
/** @internal */
|
|
95
|
-
export declare const ProviderName$outboundSchema: z.ZodType<
|
|
95
|
+
export declare const ProviderName$outboundSchema: z.ZodType<string, ProviderName>;
|
|
96
96
|
//# sourceMappingURL=providername.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
6
5
|
export const ProviderName = {
|
|
7
6
|
AnyScale: "AnyScale",
|
|
8
7
|
CentML: "Cent-ML",
|
|
@@ -92,14 +91,7 @@ export const ProviderName = {
|
|
|
92
91
|
FakeProvider: "FakeProvider",
|
|
93
92
|
};
|
|
94
93
|
/** @internal */
|
|
95
|
-
export const ProviderName$inboundSchema =
|
|
96
|
-
.union([
|
|
97
|
-
z.enum(ProviderName),
|
|
98
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
99
|
-
]);
|
|
94
|
+
export const ProviderName$inboundSchema = openEnums.inboundSchema(ProviderName);
|
|
100
95
|
/** @internal */
|
|
101
|
-
export const ProviderName$outboundSchema =
|
|
102
|
-
z.enum(ProviderName),
|
|
103
|
-
z.string().and(z.custom()),
|
|
104
|
-
]);
|
|
96
|
+
export const ProviderName$outboundSchema = openEnums.outboundSchema(ProviderName);
|
|
105
97
|
//# sourceMappingURL=providername.js.map
|
|
@@ -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
|
|
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";
|
|
@@ -47,11 +47,7 @@ export function pricingFromJSON(jsonString) {
|
|
|
47
47
|
return safeParse(jsonString, (x) => Pricing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pricing' from JSON`);
|
|
48
48
|
}
|
|
49
49
|
/** @internal */
|
|
50
|
-
export const PublicEndpointQuantization$inboundSchema =
|
|
51
|
-
.union([
|
|
52
|
-
z.enum(PublicEndpointQuantization),
|
|
53
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
54
|
-
]);
|
|
50
|
+
export const PublicEndpointQuantization$inboundSchema = openEnums.inboundSchema(PublicEndpointQuantization);
|
|
55
51
|
/** @internal */
|
|
56
52
|
export const PublicEndpoint$inboundSchema = z.object({
|
|
57
53
|
name: z.string(),
|
|
@@ -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<
|
|
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
|
|
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 =
|
|
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<
|
|
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
|
|
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 =
|
|
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 =
|
|
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<
|
|
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
|
|
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 =
|
|
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 =
|
|
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<
|
|
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
|
|
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 =
|
|
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 =
|
|
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,
|