@openrouter/sdk 0.1.10 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/chatgenerationparams.d.ts +2 -1
- package/esm/models/chatgenerationparams.js +4 -4
- package/esm/models/chatmessagecontentitem.d.ts +4 -0
- package/esm/models/chatmessagecontentitem.js +2 -0
- 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/chatmessagecontentitemvideo.d.ts +48 -11
- package/esm/models/chatmessagecontentitemvideo.js +64 -11
- package/esm/models/chatresponsechoice.d.ts +21 -1
- package/esm/models/chatresponsechoice.js +25 -1
- package/esm/models/chatstreamingresponsechunk.d.ts +1 -1
- package/esm/models/chatstreamingresponsechunk.js +1 -1
- 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/datacollection.d.ts +26 -0
- package/esm/models/datacollection.js +19 -0
- 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/index.d.ts +2 -2
- package/esm/models/index.js +2 -2
- 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 +2 -1
- package/esm/models/openairesponsesreasoningeffort.js +4 -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 +2 -1
- package/esm/models/openresponsesreasoning.js +3 -4
- package/esm/models/openresponsesrequest.d.ts +8 -40
- package/esm/models/openresponsesrequest.js +10 -49
- 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 +82 -61
- package/esm/models/operations/createembeddings.js +72 -52
- package/esm/models/operations/createkeys.d.ts +2 -2
- package/esm/models/operations/createkeys.js +3 -5
- 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/getkey.js +1 -1
- package/esm/models/operations/getparameters.d.ts +3 -9
- package/esm/models/operations/getparameters.js +5 -18
- package/esm/models/operations/list.js +1 -1
- package/esm/models/operations/updatekeys.d.ts +1 -1
- package/esm/models/operations/updatekeys.js +3 -5
- package/esm/models/outputmodality.js +2 -7
- package/esm/models/parameter.js +3 -7
- package/esm/models/providername.d.ts +3 -27
- package/esm/models/providername.js +5 -37
- package/esm/models/providersort.d.ts +17 -0
- package/esm/models/providersort.js +15 -0
- package/esm/models/publicendpoint.d.ts +4 -0
- package/esm/models/publicendpoint.js +4 -6
- package/esm/models/publicpricing.d.ts +4 -0
- package/esm/models/publicpricing.js +2 -0
- 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
- package/esm/models/chatcompletionfinishreason.d.ts +0 -13
- package/esm/models/chatcompletionfinishreason.js +0 -19
- package/esm/models/chatstreamingchoice.d.ts +0 -16
- package/esm/models/chatstreamingchoice.js +0 -24
package/esm/models/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from "./activityitem.js";
|
|
|
2
2
|
export * from "./assistantmessage.js";
|
|
3
3
|
export * from "./badgatewayresponseerrordata.js";
|
|
4
4
|
export * from "./badrequestresponseerrordata.js";
|
|
5
|
-
export * from "./chatcompletionfinishreason.js";
|
|
6
5
|
export * from "./chaterror.js";
|
|
7
6
|
export * from "./chatgenerationparams.js";
|
|
8
7
|
export * from "./chatgenerationtokenusage.js";
|
|
@@ -16,7 +15,6 @@ export * from "./chatmessagetokenlogprobs.js";
|
|
|
16
15
|
export * from "./chatmessagetoolcall.js";
|
|
17
16
|
export * from "./chatresponse.js";
|
|
18
17
|
export * from "./chatresponsechoice.js";
|
|
19
|
-
export * from "./chatstreamingchoice.js";
|
|
20
18
|
export * from "./chatstreamingmessagechunk.js";
|
|
21
19
|
export * from "./chatstreamingmessagetoolcall.js";
|
|
22
20
|
export * from "./chatstreamingresponsechunk.js";
|
|
@@ -27,6 +25,7 @@ export * from "./completionlogprobs.js";
|
|
|
27
25
|
export * from "./completionresponse.js";
|
|
28
26
|
export * from "./completionusage.js";
|
|
29
27
|
export * from "./createchargerequest.js";
|
|
28
|
+
export * from "./datacollection.js";
|
|
30
29
|
export * from "./defaultparameters.js";
|
|
31
30
|
export * from "./edgenetworktimeoutresponseerrordata.js";
|
|
32
31
|
export * from "./endpointstatus.js";
|
|
@@ -96,6 +95,7 @@ export * from "./paymentrequiredresponseerrordata.js";
|
|
|
96
95
|
export * from "./perrequestlimits.js";
|
|
97
96
|
export * from "./providername.js";
|
|
98
97
|
export * from "./provideroverloadedresponseerrordata.js";
|
|
98
|
+
export * from "./providersort.js";
|
|
99
99
|
export * from "./publicendpoint.js";
|
|
100
100
|
export * from "./publicpricing.js";
|
|
101
101
|
export * from "./quantization.js";
|
package/esm/models/index.js
CHANGED
|
@@ -5,7 +5,6 @@ export * from "./activityitem.js";
|
|
|
5
5
|
export * from "./assistantmessage.js";
|
|
6
6
|
export * from "./badgatewayresponseerrordata.js";
|
|
7
7
|
export * from "./badrequestresponseerrordata.js";
|
|
8
|
-
export * from "./chatcompletionfinishreason.js";
|
|
9
8
|
export * from "./chaterror.js";
|
|
10
9
|
export * from "./chatgenerationparams.js";
|
|
11
10
|
export * from "./chatgenerationtokenusage.js";
|
|
@@ -19,7 +18,6 @@ export * from "./chatmessagetokenlogprobs.js";
|
|
|
19
18
|
export * from "./chatmessagetoolcall.js";
|
|
20
19
|
export * from "./chatresponse.js";
|
|
21
20
|
export * from "./chatresponsechoice.js";
|
|
22
|
-
export * from "./chatstreamingchoice.js";
|
|
23
21
|
export * from "./chatstreamingmessagechunk.js";
|
|
24
22
|
export * from "./chatstreamingmessagetoolcall.js";
|
|
25
23
|
export * from "./chatstreamingresponsechunk.js";
|
|
@@ -30,6 +28,7 @@ export * from "./completionlogprobs.js";
|
|
|
30
28
|
export * from "./completionresponse.js";
|
|
31
29
|
export * from "./completionusage.js";
|
|
32
30
|
export * from "./createchargerequest.js";
|
|
31
|
+
export * from "./datacollection.js";
|
|
33
32
|
export * from "./defaultparameters.js";
|
|
34
33
|
export * from "./edgenetworktimeoutresponseerrordata.js";
|
|
35
34
|
export * from "./endpointstatus.js";
|
|
@@ -99,6 +98,7 @@ export * from "./paymentrequiredresponseerrordata.js";
|
|
|
99
98
|
export * from "./perrequestlimits.js";
|
|
100
99
|
export * from "./providername.js";
|
|
101
100
|
export * from "./provideroverloadedresponseerrordata.js";
|
|
101
|
+
export * from "./providersort.js";
|
|
102
102
|
export * from "./publicendpoint.js";
|
|
103
103
|
export * from "./publicpricing.js";
|
|
104
104
|
export * from "./quantization.js";
|
|
@@ -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 InputModality = {
|
|
7
6
|
Text: "text",
|
|
8
7
|
Image: "image",
|
|
@@ -11,9 +10,5 @@ export const InputModality = {
|
|
|
11
10
|
Video: "video",
|
|
12
11
|
};
|
|
13
12
|
/** @internal */
|
|
14
|
-
export const InputModality$inboundSchema =
|
|
15
|
-
.union([
|
|
16
|
-
z.enum(InputModality),
|
|
17
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
18
|
-
]);
|
|
13
|
+
export const InputModality$inboundSchema = openEnums.inboundSchema(InputModality);
|
|
19
14
|
//# sourceMappingURL=inputmodality.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
import { catchUnrecognizedEnum } from "../types/enums.js";
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
6
5
|
/**
|
|
7
6
|
* Instruction format type
|
|
8
7
|
*/
|
|
@@ -31,9 +30,5 @@ export const InstructType = {
|
|
|
31
30
|
Qwen3: "qwen3",
|
|
32
31
|
};
|
|
33
32
|
/** @internal */
|
|
34
|
-
export const InstructType$inboundSchema =
|
|
35
|
-
.union([
|
|
36
|
-
z.enum(InstructType),
|
|
37
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
38
|
-
]);
|
|
33
|
+
export const InstructType$inboundSchema = openEnums.inboundSchema(InstructType);
|
|
39
34
|
//# sourceMappingURL=instructtype.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 { InputModality$inboundSchema } from "./inputmodality.js";
|
|
9
9
|
import { InstructType$inboundSchema } from "./instructtype.js";
|
|
10
10
|
import { OutputModality$inboundSchema, } from "./outputmodality.js";
|
|
@@ -34,11 +34,8 @@ export const Tokenizer = {
|
|
|
34
34
|
Qwen3: "Qwen3",
|
|
35
35
|
};
|
|
36
36
|
/** @internal */
|
|
37
|
-
export const Tokenizer$inboundSchema =
|
|
38
|
-
.
|
|
39
|
-
z.enum(Tokenizer),
|
|
40
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
41
|
-
]);
|
|
37
|
+
export const Tokenizer$inboundSchema = openEnums
|
|
38
|
+
.inboundSchema(Tokenizer);
|
|
42
39
|
/** @internal */
|
|
43
40
|
export const Architecture$inboundSchema = z
|
|
44
41
|
.object({
|
|
@@ -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 { InputModality$inboundSchema } from "./inputmodality.js";
|
|
9
9
|
import { ModelGroup$inboundSchema } from "./modelgroup.js";
|
|
10
10
|
import { OutputModality$inboundSchema, } from "./outputmodality.js";
|
|
@@ -36,11 +36,7 @@ export const ModelArchitectureInstructType = {
|
|
|
36
36
|
Qwen3: "qwen3",
|
|
37
37
|
};
|
|
38
38
|
/** @internal */
|
|
39
|
-
export const ModelArchitectureInstructType$inboundSchema =
|
|
40
|
-
.union([
|
|
41
|
-
z.enum(ModelArchitectureInstructType),
|
|
42
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
43
|
-
]);
|
|
39
|
+
export const ModelArchitectureInstructType$inboundSchema = openEnums.inboundSchema(ModelArchitectureInstructType);
|
|
44
40
|
/** @internal */
|
|
45
41
|
export const ModelArchitecture$inboundSchema = z.object({
|
|
46
42
|
tokenizer: ModelGroup$inboundSchema.optional(),
|
package/esm/models/modelgroup.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
|
/**
|
|
7
6
|
* Tokenizer type used by the model
|
|
8
7
|
*/
|
|
@@ -28,9 +27,5 @@ export const ModelGroup = {
|
|
|
28
27
|
Qwen3: "Qwen3",
|
|
29
28
|
};
|
|
30
29
|
/** @internal */
|
|
31
|
-
export const ModelGroup$inboundSchema =
|
|
32
|
-
.union([
|
|
33
|
-
z.enum(ModelGroup),
|
|
34
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
35
|
-
]);
|
|
30
|
+
export const ModelGroup$inboundSchema = openEnums.inboundSchema(ModelGroup);
|
|
36
31
|
//# sourceMappingURL=modelgroup.js.map
|
|
@@ -9,5 +9,5 @@ export declare const OpenAIResponsesIncludable: {
|
|
|
9
9
|
};
|
|
10
10
|
export type OpenAIResponsesIncludable = OpenEnum<typeof OpenAIResponsesIncludable>;
|
|
11
11
|
/** @internal */
|
|
12
|
-
export declare const OpenAIResponsesIncludable$outboundSchema: z.ZodType<
|
|
12
|
+
export declare const OpenAIResponsesIncludable$outboundSchema: z.ZodType<string, OpenAIResponsesIncludable>;
|
|
13
13
|
//# sourceMappingURL=openairesponsesincludable.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 OpenAIResponsesIncludable = {
|
|
6
6
|
FileSearchCallResults: "file_search_call.results",
|
|
7
7
|
MessageInputImageImageUrl: "message.input_image.image_url",
|
|
@@ -10,8 +10,5 @@ export const OpenAIResponsesIncludable = {
|
|
|
10
10
|
CodeInterpreterCallOutputs: "code_interpreter_call.outputs",
|
|
11
11
|
};
|
|
12
12
|
/** @internal */
|
|
13
|
-
export const OpenAIResponsesIncludable$outboundSchema =
|
|
14
|
-
z.enum(OpenAIResponsesIncludable),
|
|
15
|
-
z.string().and(z.custom()),
|
|
16
|
-
]);
|
|
13
|
+
export const OpenAIResponsesIncludable$outboundSchema = openEnums.outboundSchema(OpenAIResponsesIncludable);
|
|
17
14
|
//# sourceMappingURL=openairesponsesincludable.js.map
|
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { safeParse } from "../lib/schemas.js";
|
|
6
|
-
import
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
7
7
|
export const Reason = {
|
|
8
8
|
MaxOutputTokens: "max_output_tokens",
|
|
9
9
|
ContentFilter: "content_filter",
|
|
10
10
|
};
|
|
11
11
|
/** @internal */
|
|
12
|
-
export const Reason$inboundSchema =
|
|
13
|
-
.
|
|
14
|
-
z.enum(Reason),
|
|
15
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
16
|
-
]);
|
|
12
|
+
export const Reason$inboundSchema = openEnums
|
|
13
|
+
.inboundSchema(Reason);
|
|
17
14
|
/** @internal */
|
|
18
15
|
export const OpenAIResponsesIncompleteDetails$inboundSchema = z.object({
|
|
19
16
|
reason: Reason$inboundSchema.optional(),
|
|
@@ -5,10 +5,11 @@ export declare const OpenAIResponsesReasoningEffort: {
|
|
|
5
5
|
readonly Medium: "medium";
|
|
6
6
|
readonly Low: "low";
|
|
7
7
|
readonly Minimal: "minimal";
|
|
8
|
+
readonly None: "none";
|
|
8
9
|
};
|
|
9
10
|
export type OpenAIResponsesReasoningEffort = OpenEnum<typeof OpenAIResponsesReasoningEffort>;
|
|
10
11
|
/** @internal */
|
|
11
12
|
export declare const OpenAIResponsesReasoningEffort$inboundSchema: z.ZodType<OpenAIResponsesReasoningEffort, unknown>;
|
|
12
13
|
/** @internal */
|
|
13
|
-
export declare const OpenAIResponsesReasoningEffort$outboundSchema: z.ZodType<
|
|
14
|
+
export declare const OpenAIResponsesReasoningEffort$outboundSchema: z.ZodType<string, OpenAIResponsesReasoningEffort>;
|
|
14
15
|
//# sourceMappingURL=openairesponsesreasoningeffort.d.ts.map
|
|
@@ -1,23 +1,16 @@
|
|
|
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 OpenAIResponsesReasoningEffort = {
|
|
7
6
|
High: "high",
|
|
8
7
|
Medium: "medium",
|
|
9
8
|
Low: "low",
|
|
10
9
|
Minimal: "minimal",
|
|
10
|
+
None: "none",
|
|
11
11
|
};
|
|
12
12
|
/** @internal */
|
|
13
|
-
export const OpenAIResponsesReasoningEffort$inboundSchema =
|
|
14
|
-
.union([
|
|
15
|
-
z.enum(OpenAIResponsesReasoningEffort),
|
|
16
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
17
|
-
]);
|
|
13
|
+
export const OpenAIResponsesReasoningEffort$inboundSchema = openEnums.inboundSchema(OpenAIResponsesReasoningEffort);
|
|
18
14
|
/** @internal */
|
|
19
|
-
export const OpenAIResponsesReasoningEffort$outboundSchema =
|
|
20
|
-
z.enum(OpenAIResponsesReasoningEffort),
|
|
21
|
-
z.string().and(z.custom()),
|
|
22
|
-
]);
|
|
15
|
+
export const OpenAIResponsesReasoningEffort$outboundSchema = openEnums.outboundSchema(OpenAIResponsesReasoningEffort);
|
|
23
16
|
//# sourceMappingURL=openairesponsesreasoningeffort.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
import { catchUnrecognizedEnum } from "../types/enums.js";
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
6
5
|
export const OpenAIResponsesResponseStatus = {
|
|
7
6
|
Completed: "completed",
|
|
8
7
|
Incomplete: "incomplete",
|
|
@@ -12,9 +11,5 @@ export const OpenAIResponsesResponseStatus = {
|
|
|
12
11
|
Queued: "queued",
|
|
13
12
|
};
|
|
14
13
|
/** @internal */
|
|
15
|
-
export const OpenAIResponsesResponseStatus$inboundSchema =
|
|
16
|
-
.union([
|
|
17
|
-
z.enum(OpenAIResponsesResponseStatus),
|
|
18
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
19
|
-
]);
|
|
14
|
+
export const OpenAIResponsesResponseStatus$inboundSchema = openEnums.inboundSchema(OpenAIResponsesResponseStatus);
|
|
20
15
|
//# sourceMappingURL=openairesponsesresponsestatus.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
5
|
-
import { catchUnrecognizedEnum } from "../types/enums.js";
|
|
4
|
+
import * as openEnums from "../types/enums.js";
|
|
6
5
|
export const OpenAIResponsesServiceTier = {
|
|
7
6
|
Auto: "auto",
|
|
8
7
|
Default: "default",
|
|
@@ -11,9 +10,5 @@ export const OpenAIResponsesServiceTier = {
|
|
|
11
10
|
Scale: "scale",
|
|
12
11
|
};
|
|
13
12
|
/** @internal */
|
|
14
|
-
export const OpenAIResponsesServiceTier$inboundSchema =
|
|
15
|
-
.union([
|
|
16
|
-
z.enum(OpenAIResponsesServiceTier),
|
|
17
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
18
|
-
]);
|
|
13
|
+
export const OpenAIResponsesServiceTier$inboundSchema = openEnums.inboundSchema(OpenAIResponsesServiceTier);
|
|
19
14
|
//# sourceMappingURL=openairesponsesservicetier.js.map
|
|
@@ -1,16 +1,11 @@
|
|
|
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 OpenAIResponsesTruncation = {
|
|
7
6
|
Auto: "auto",
|
|
8
7
|
Disabled: "disabled",
|
|
9
8
|
};
|
|
10
9
|
/** @internal */
|
|
11
|
-
export const OpenAIResponsesTruncation$inboundSchema =
|
|
12
|
-
.union([
|
|
13
|
-
z.enum(OpenAIResponsesTruncation),
|
|
14
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
15
|
-
]);
|
|
10
|
+
export const OpenAIResponsesTruncation$inboundSchema = openEnums.inboundSchema(OpenAIResponsesTruncation);
|
|
16
11
|
//# sourceMappingURL=openairesponsestruncation.js.map
|
|
@@ -24,6 +24,7 @@ export declare const OpenResponsesReasoningFormat: {
|
|
|
24
24
|
readonly OpenaiResponsesV1: "openai-responses-v1";
|
|
25
25
|
readonly XaiResponsesV1: "xai-responses-v1";
|
|
26
26
|
readonly AnthropicClaudeV1: "anthropic-claude-v1";
|
|
27
|
+
readonly GoogleGeminiV1: "google-gemini-v1";
|
|
27
28
|
};
|
|
28
29
|
export type OpenResponsesReasoningFormat = OpenEnum<typeof OpenResponsesReasoningFormat>;
|
|
29
30
|
/**
|
|
@@ -53,7 +54,7 @@ export type OpenResponsesReasoningStatusUnion$Outbound = string | string | strin
|
|
|
53
54
|
export declare const OpenResponsesReasoningStatusUnion$outboundSchema: z.ZodType<OpenResponsesReasoningStatusUnion$Outbound, OpenResponsesReasoningStatusUnion>;
|
|
54
55
|
export declare function openResponsesReasoningStatusUnionToJSON(openResponsesReasoningStatusUnion: OpenResponsesReasoningStatusUnion): string;
|
|
55
56
|
/** @internal */
|
|
56
|
-
export declare const OpenResponsesReasoningFormat$outboundSchema: z.ZodType<
|
|
57
|
+
export declare const OpenResponsesReasoningFormat$outboundSchema: z.ZodType<string, OpenResponsesReasoningFormat>;
|
|
57
58
|
/** @internal */
|
|
58
59
|
export type OpenResponsesReasoning$Outbound = {
|
|
59
60
|
type: string;
|
|
@@ -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 { ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js";
|
|
7
8
|
import { ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js";
|
|
8
9
|
export const OpenResponsesReasoningType = {
|
|
@@ -22,6 +23,7 @@ export const OpenResponsesReasoningFormat = {
|
|
|
22
23
|
OpenaiResponsesV1: "openai-responses-v1",
|
|
23
24
|
XaiResponsesV1: "xai-responses-v1",
|
|
24
25
|
AnthropicClaudeV1: "anthropic-claude-v1",
|
|
26
|
+
GoogleGeminiV1: "google-gemini-v1",
|
|
25
27
|
};
|
|
26
28
|
/** @internal */
|
|
27
29
|
export const OpenResponsesReasoningType$outboundSchema = z.enum(OpenResponsesReasoningType);
|
|
@@ -41,10 +43,7 @@ export function openResponsesReasoningStatusUnionToJSON(openResponsesReasoningSt
|
|
|
41
43
|
return JSON.stringify(OpenResponsesReasoningStatusUnion$outboundSchema.parse(openResponsesReasoningStatusUnion));
|
|
42
44
|
}
|
|
43
45
|
/** @internal */
|
|
44
|
-
export const OpenResponsesReasoningFormat$outboundSchema =
|
|
45
|
-
z.enum(OpenResponsesReasoningFormat),
|
|
46
|
-
z.string().and(z.custom()),
|
|
47
|
-
]);
|
|
46
|
+
export const OpenResponsesReasoningFormat$outboundSchema = openEnums.outboundSchema(OpenResponsesReasoningFormat);
|
|
48
47
|
/** @internal */
|
|
49
48
|
export const OpenResponsesReasoning$outboundSchema = z.object({
|
|
50
49
|
type: OpenResponsesReasoningType$outboundSchema,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { DataCollection } from "./datacollection.js";
|
|
3
4
|
import { OpenAIResponsesIncludable } from "./openairesponsesincludable.js";
|
|
4
5
|
import { OpenAIResponsesPrompt, OpenAIResponsesPrompt$Outbound } from "./openairesponsesprompt.js";
|
|
5
6
|
import { OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnion$Outbound } from "./openairesponsestoolchoiceunion.js";
|
|
@@ -11,6 +12,7 @@ import { OpenResponsesWebSearchPreview20250311Tool, OpenResponsesWebSearchPrevie
|
|
|
11
12
|
import { OpenResponsesWebSearchPreviewTool, OpenResponsesWebSearchPreviewTool$Outbound } from "./openresponseswebsearchpreviewtool.js";
|
|
12
13
|
import { OpenResponsesWebSearchTool, OpenResponsesWebSearchTool$Outbound } from "./openresponseswebsearchtool.js";
|
|
13
14
|
import { ProviderName } from "./providername.js";
|
|
15
|
+
import { ProviderSort } from "./providersort.js";
|
|
14
16
|
import { Quantization } from "./quantization.js";
|
|
15
17
|
export declare const OpenResponsesRequestType: {
|
|
16
18
|
readonly Function: "function";
|
|
@@ -42,40 +44,9 @@ export declare const Truncation: {
|
|
|
42
44
|
readonly Disabled: "disabled";
|
|
43
45
|
};
|
|
44
46
|
export type Truncation = OpenEnum<typeof Truncation>;
|
|
45
|
-
/**
|
|
46
|
-
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
50
|
-
* - deny: use only providers which do not collect user data.
|
|
51
|
-
*/
|
|
52
|
-
export declare const DataCollection: {
|
|
53
|
-
readonly Deny: "deny";
|
|
54
|
-
readonly Allow: "allow";
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
61
|
-
* - deny: use only providers which do not collect user data.
|
|
62
|
-
*/
|
|
63
|
-
export type DataCollection = OpenEnum<typeof DataCollection>;
|
|
64
47
|
export type Order = ProviderName | string;
|
|
65
48
|
export type Only = ProviderName | string;
|
|
66
49
|
export type Ignore = ProviderName | string;
|
|
67
|
-
/**
|
|
68
|
-
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
69
|
-
*/
|
|
70
|
-
export declare const Sort: {
|
|
71
|
-
readonly Price: "price";
|
|
72
|
-
readonly Throughput: "throughput";
|
|
73
|
-
readonly Latency: "latency";
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
77
|
-
*/
|
|
78
|
-
export type Sort = OpenEnum<typeof Sort>;
|
|
79
50
|
/**
|
|
80
51
|
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
81
52
|
*/
|
|
@@ -122,6 +93,7 @@ export type Provider = {
|
|
|
122
93
|
*
|
|
123
94
|
* @remarks
|
|
124
95
|
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
96
|
+
*
|
|
125
97
|
* - deny: use only providers which do not collect user data.
|
|
126
98
|
*/
|
|
127
99
|
dataCollection?: DataCollection | null | undefined;
|
|
@@ -152,7 +124,7 @@ export type Provider = {
|
|
|
152
124
|
/**
|
|
153
125
|
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
154
126
|
*/
|
|
155
|
-
sort?:
|
|
127
|
+
sort?: ProviderSort | null | undefined;
|
|
156
128
|
/**
|
|
157
129
|
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
158
130
|
*/
|
|
@@ -275,11 +247,9 @@ export type OpenResponsesRequestToolUnion$Outbound = OpenResponsesRequestToolFun
|
|
|
275
247
|
export declare const OpenResponsesRequestToolUnion$outboundSchema: z.ZodType<OpenResponsesRequestToolUnion$Outbound, OpenResponsesRequestToolUnion>;
|
|
276
248
|
export declare function openResponsesRequestToolUnionToJSON(openResponsesRequestToolUnion: OpenResponsesRequestToolUnion): string;
|
|
277
249
|
/** @internal */
|
|
278
|
-
export declare const ServiceTier$outboundSchema: z.ZodType<
|
|
279
|
-
/** @internal */
|
|
280
|
-
export declare const Truncation$outboundSchema: z.ZodType<Truncation, Truncation>;
|
|
250
|
+
export declare const ServiceTier$outboundSchema: z.ZodType<string, ServiceTier>;
|
|
281
251
|
/** @internal */
|
|
282
|
-
export declare const
|
|
252
|
+
export declare const Truncation$outboundSchema: z.ZodType<string, Truncation>;
|
|
283
253
|
/** @internal */
|
|
284
254
|
export type Order$Outbound = string | string;
|
|
285
255
|
/** @internal */
|
|
@@ -296,8 +266,6 @@ export type Ignore$Outbound = string | string;
|
|
|
296
266
|
export declare const Ignore$outboundSchema: z.ZodType<Ignore$Outbound, Ignore>;
|
|
297
267
|
export declare function ignoreToJSON(ignore: Ignore): string;
|
|
298
268
|
/** @internal */
|
|
299
|
-
export declare const Sort$outboundSchema: z.ZodType<Sort, Sort>;
|
|
300
|
-
/** @internal */
|
|
301
269
|
export type MaxPrice$Outbound = {
|
|
302
270
|
prompt?: any | undefined;
|
|
303
271
|
completion?: any | undefined;
|
|
@@ -328,7 +296,7 @@ export declare function providerToJSON(provider: Provider): string;
|
|
|
328
296
|
/** @internal */
|
|
329
297
|
export declare const IdFileParser$outboundSchema: z.ZodEnum<typeof IdFileParser>;
|
|
330
298
|
/** @internal */
|
|
331
|
-
export declare const PdfEngine$outboundSchema: z.ZodType<
|
|
299
|
+
export declare const PdfEngine$outboundSchema: z.ZodType<string, PdfEngine>;
|
|
332
300
|
/** @internal */
|
|
333
301
|
export type Pdf$Outbound = {
|
|
334
302
|
engine?: string | undefined;
|
|
@@ -348,7 +316,7 @@ export declare function pluginFileParserToJSON(pluginFileParser: PluginFileParse
|
|
|
348
316
|
/** @internal */
|
|
349
317
|
export declare const IdWeb$outboundSchema: z.ZodEnum<typeof IdWeb>;
|
|
350
318
|
/** @internal */
|
|
351
|
-
export declare const Engine$outboundSchema: z.ZodType<
|
|
319
|
+
export declare const Engine$outboundSchema: z.ZodType<string, Engine>;
|
|
352
320
|
/** @internal */
|
|
353
321
|
export type PluginWeb$Outbound = {
|
|
354
322
|
id: string;
|
|
@@ -3,6 +3,8 @@
|
|
|
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";
|
|
7
|
+
import { DataCollection$outboundSchema, } from "./datacollection.js";
|
|
6
8
|
import { OpenAIResponsesIncludable$outboundSchema, } from "./openairesponsesincludable.js";
|
|
7
9
|
import { OpenAIResponsesPrompt$outboundSchema, } from "./openairesponsesprompt.js";
|
|
8
10
|
import { OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js";
|
|
@@ -14,6 +16,7 @@ import { OpenResponsesWebSearchPreview20250311Tool$outboundSchema, } from "./ope
|
|
|
14
16
|
import { OpenResponsesWebSearchPreviewTool$outboundSchema, } from "./openresponseswebsearchpreviewtool.js";
|
|
15
17
|
import { OpenResponsesWebSearchTool$outboundSchema, } from "./openresponseswebsearchtool.js";
|
|
16
18
|
import { ProviderName$outboundSchema } from "./providername.js";
|
|
19
|
+
import { ProviderSort$outboundSchema } from "./providersort.js";
|
|
17
20
|
import { Quantization$outboundSchema } from "./quantization.js";
|
|
18
21
|
export const OpenResponsesRequestType = {
|
|
19
22
|
Function: "function",
|
|
@@ -29,25 +32,6 @@ export const Truncation = {
|
|
|
29
32
|
Auto: "auto",
|
|
30
33
|
Disabled: "disabled",
|
|
31
34
|
};
|
|
32
|
-
/**
|
|
33
|
-
* Data collection setting. If no available model provider meets the requirement, your request will return an error.
|
|
34
|
-
*
|
|
35
|
-
* @remarks
|
|
36
|
-
* - allow: (default) allow providers which store user data non-transiently and may train on it
|
|
37
|
-
* - deny: use only providers which do not collect user data.
|
|
38
|
-
*/
|
|
39
|
-
export const DataCollection = {
|
|
40
|
-
Deny: "deny",
|
|
41
|
-
Allow: "allow",
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
45
|
-
*/
|
|
46
|
-
export const Sort = {
|
|
47
|
-
Price: "price",
|
|
48
|
-
Throughput: "throughput",
|
|
49
|
-
Latency: "latency",
|
|
50
|
-
};
|
|
51
35
|
export const IdFileParser = {
|
|
52
36
|
FileParser: "file-parser",
|
|
53
37
|
};
|
|
@@ -91,22 +75,9 @@ export function openResponsesRequestToolUnionToJSON(openResponsesRequestToolUnio
|
|
|
91
75
|
return JSON.stringify(OpenResponsesRequestToolUnion$outboundSchema.parse(openResponsesRequestToolUnion));
|
|
92
76
|
}
|
|
93
77
|
/** @internal */
|
|
94
|
-
export const ServiceTier$outboundSchema =
|
|
95
|
-
.union([
|
|
96
|
-
z.enum(ServiceTier),
|
|
97
|
-
z.string().and(z.custom()),
|
|
98
|
-
]);
|
|
78
|
+
export const ServiceTier$outboundSchema = openEnums.outboundSchema(ServiceTier);
|
|
99
79
|
/** @internal */
|
|
100
|
-
export const Truncation$outboundSchema =
|
|
101
|
-
.union([
|
|
102
|
-
z.enum(Truncation),
|
|
103
|
-
z.string().and(z.custom()),
|
|
104
|
-
]);
|
|
105
|
-
/** @internal */
|
|
106
|
-
export const DataCollection$outboundSchema = z.union([
|
|
107
|
-
z.enum(DataCollection),
|
|
108
|
-
z.string().and(z.custom()),
|
|
109
|
-
]);
|
|
80
|
+
export const Truncation$outboundSchema = openEnums.outboundSchema(Truncation);
|
|
110
81
|
/** @internal */
|
|
111
82
|
export const Order$outboundSchema = z.union([
|
|
112
83
|
ProviderName$outboundSchema,
|
|
@@ -130,11 +101,6 @@ export function ignoreToJSON(ignore) {
|
|
|
130
101
|
return JSON.stringify(Ignore$outboundSchema.parse(ignore));
|
|
131
102
|
}
|
|
132
103
|
/** @internal */
|
|
133
|
-
export const Sort$outboundSchema = z.union([
|
|
134
|
-
z.enum(Sort),
|
|
135
|
-
z.string().and(z.custom()),
|
|
136
|
-
]);
|
|
137
|
-
/** @internal */
|
|
138
104
|
export const MaxPrice$outboundSchema = z
|
|
139
105
|
.object({
|
|
140
106
|
prompt: z.any().optional(),
|
|
@@ -158,7 +124,7 @@ export const Provider$outboundSchema = z
|
|
|
158
124
|
only: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))).optional(),
|
|
159
125
|
ignore: z.nullable(z.array(z.union([ProviderName$outboundSchema, z.string()]))).optional(),
|
|
160
126
|
quantizations: z.nullable(z.array(Quantization$outboundSchema)).optional(),
|
|
161
|
-
sort: z.nullable(
|
|
127
|
+
sort: z.nullable(ProviderSort$outboundSchema).optional(),
|
|
162
128
|
maxPrice: z.lazy(() => MaxPrice$outboundSchema).optional(),
|
|
163
129
|
}).transform((v) => {
|
|
164
130
|
return remap$(v, {
|
|
@@ -176,11 +142,8 @@ export function providerToJSON(provider) {
|
|
|
176
142
|
export const IdFileParser$outboundSchema = z
|
|
177
143
|
.enum(IdFileParser);
|
|
178
144
|
/** @internal */
|
|
179
|
-
export const PdfEngine$outboundSchema =
|
|
180
|
-
.
|
|
181
|
-
z.enum(PdfEngine),
|
|
182
|
-
z.string().and(z.custom()),
|
|
183
|
-
]);
|
|
145
|
+
export const PdfEngine$outboundSchema = openEnums
|
|
146
|
+
.outboundSchema(PdfEngine);
|
|
184
147
|
/** @internal */
|
|
185
148
|
export const Pdf$outboundSchema = z.object({
|
|
186
149
|
engine: PdfEngine$outboundSchema.optional(),
|
|
@@ -204,10 +167,8 @@ export function pluginFileParserToJSON(pluginFileParser) {
|
|
|
204
167
|
/** @internal */
|
|
205
168
|
export const IdWeb$outboundSchema = z.enum(IdWeb);
|
|
206
169
|
/** @internal */
|
|
207
|
-
export const Engine$outboundSchema =
|
|
208
|
-
|
|
209
|
-
z.string().and(z.custom()),
|
|
210
|
-
]);
|
|
170
|
+
export const Engine$outboundSchema = openEnums
|
|
171
|
+
.outboundSchema(Engine);
|
|
211
172
|
/** @internal */
|
|
212
173
|
export const PluginWeb$outboundSchema = z.object({
|
|
213
174
|
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;
|