@openrouter/sdk 0.1.9 → 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/openairesponsesinputunion.d.ts +5 -5
- package/esm/models/openairesponsesinputunion.js +5 -5
- 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/openresponsesfunctioncalloutput.d.ts +4 -4
- package/esm/models/openresponsesfunctioncalloutput.js +2 -2
- package/esm/models/openresponsesfunctiontoolcall.d.ts +2 -2
- package/esm/models/openresponsesfunctiontoolcall.js +1 -1
- package/esm/models/openresponsesinput.d.ts +4 -4
- package/esm/models/openresponsesinput.js +4 -4
- 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/responsesoutputitem.d.ts +1 -1
- package/esm/models/responsesoutputitem.js +1 -1
- package/esm/models/responsesoutputitemreasoning.d.ts +2 -2
- package/esm/models/responsesoutputitemreasoning.js +2 -2
- 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/lib/config.d.ts
CHANGED
|
@@ -37,8 +37,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
37
37
|
export declare const SDK_METADATA: {
|
|
38
38
|
readonly language: "typescript";
|
|
39
39
|
readonly openapiDocVersion: "1.0.0";
|
|
40
|
-
readonly sdkVersion: "0.1.
|
|
41
|
-
readonly genVersion: "2.
|
|
42
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.1.
|
|
40
|
+
readonly sdkVersion: "0.1.11";
|
|
41
|
+
readonly genVersion: "2.750.0";
|
|
42
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.1.11 2.750.0 1.0.0 @openrouter/sdk";
|
|
43
43
|
};
|
|
44
44
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
|
|
|
25
25
|
export const SDK_METADATA = {
|
|
26
26
|
language: "typescript",
|
|
27
27
|
openapiDocVersion: "1.0.0",
|
|
28
|
-
sdkVersion: "0.1.
|
|
29
|
-
genVersion: "2.
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 0.1.
|
|
28
|
+
sdkVersion: "0.1.11",
|
|
29
|
+
genVersion: "2.750.0",
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 0.1.11 2.750.0 1.0.0 @openrouter/sdk",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.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 ChatCompletionFinishReason = {
|
|
7
6
|
ToolCalls: "tool_calls",
|
|
8
7
|
Stop: "stop",
|
|
@@ -11,9 +10,5 @@ export const ChatCompletionFinishReason = {
|
|
|
11
10
|
Error: "error",
|
|
12
11
|
};
|
|
13
12
|
/** @internal */
|
|
14
|
-
export const ChatCompletionFinishReason$inboundSchema =
|
|
15
|
-
.union([
|
|
16
|
-
z.enum(ChatCompletionFinishReason),
|
|
17
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
18
|
-
]);
|
|
13
|
+
export const ChatCompletionFinishReason$inboundSchema = openEnums.inboundSchema(ChatCompletionFinishReason);
|
|
19
14
|
//# sourceMappingURL=chatcompletionfinishreason.js.map
|
|
@@ -57,7 +57,7 @@ export type ChatGenerationParams = {
|
|
|
57
57
|
user?: string | undefined;
|
|
58
58
|
};
|
|
59
59
|
/** @internal */
|
|
60
|
-
export declare const Effort$outboundSchema: z.ZodType<
|
|
60
|
+
export declare const Effort$outboundSchema: z.ZodType<string, Effort>;
|
|
61
61
|
/** @internal */
|
|
62
62
|
export type Reasoning$Outbound = {
|
|
63
63
|
effort?: string | null | undefined;
|
|
@@ -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 { ChatStreamOptions$outboundSchema, } from "./chatstreamoptions.js";
|
|
7
8
|
import { Message$outboundSchema, } from "./message.js";
|
|
8
9
|
import { ReasoningSummaryVerbosity$outboundSchema, } from "./reasoningsummaryverbosity.js";
|
|
@@ -16,10 +17,8 @@ export const Effort = {
|
|
|
16
17
|
High: "high",
|
|
17
18
|
};
|
|
18
19
|
/** @internal */
|
|
19
|
-
export const Effort$outboundSchema =
|
|
20
|
-
|
|
21
|
-
z.string().and(z.custom()),
|
|
22
|
-
]);
|
|
20
|
+
export const Effort$outboundSchema = openEnums
|
|
21
|
+
.outboundSchema(Effort);
|
|
23
22
|
/** @internal */
|
|
24
23
|
export const Reasoning$outboundSchema = z.object({
|
|
25
24
|
effort: z.nullable(Effort$outboundSchema).optional(),
|
|
@@ -23,7 +23,7 @@ export type ChatMessageContentItemAudio = {
|
|
|
23
23
|
/** @internal */
|
|
24
24
|
export declare const ChatMessageContentItemAudioFormat$inboundSchema: z.ZodType<ChatMessageContentItemAudioFormat, unknown>;
|
|
25
25
|
/** @internal */
|
|
26
|
-
export declare const ChatMessageContentItemAudioFormat$outboundSchema: z.ZodType<
|
|
26
|
+
export declare const ChatMessageContentItemAudioFormat$outboundSchema: z.ZodType<string, ChatMessageContentItemAudioFormat>;
|
|
27
27
|
/** @internal */
|
|
28
28
|
export declare const ChatMessageContentItemAudioInputAudio$inboundSchema: z.ZodType<ChatMessageContentItemAudioInputAudio, unknown>;
|
|
29
29
|
/** @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 ChatMessageContentItemAudioFormat = {
|
|
9
9
|
Wav: "wav",
|
|
10
10
|
Mp3: "mp3",
|
|
@@ -15,16 +15,9 @@ export const ChatMessageContentItemAudioFormat = {
|
|
|
15
15
|
Pcm24: "pcm24",
|
|
16
16
|
};
|
|
17
17
|
/** @internal */
|
|
18
|
-
export const ChatMessageContentItemAudioFormat$inboundSchema =
|
|
19
|
-
.union([
|
|
20
|
-
z.enum(ChatMessageContentItemAudioFormat),
|
|
21
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
22
|
-
]);
|
|
18
|
+
export const ChatMessageContentItemAudioFormat$inboundSchema = openEnums.inboundSchema(ChatMessageContentItemAudioFormat);
|
|
23
19
|
/** @internal */
|
|
24
|
-
export const ChatMessageContentItemAudioFormat$outboundSchema =
|
|
25
|
-
z.enum(ChatMessageContentItemAudioFormat),
|
|
26
|
-
z.string().and(z.custom()),
|
|
27
|
-
]);
|
|
20
|
+
export const ChatMessageContentItemAudioFormat$outboundSchema = openEnums.outboundSchema(ChatMessageContentItemAudioFormat);
|
|
28
21
|
/** @internal */
|
|
29
22
|
export const ChatMessageContentItemAudioInputAudio$inboundSchema = z.object({
|
|
30
23
|
data: z.string(),
|
|
@@ -19,7 +19,7 @@ export type ChatMessageContentItemImage = {
|
|
|
19
19
|
/** @internal */
|
|
20
20
|
export declare const ChatMessageContentItemImageDetail$inboundSchema: z.ZodType<ChatMessageContentItemImageDetail, unknown>;
|
|
21
21
|
/** @internal */
|
|
22
|
-
export declare const ChatMessageContentItemImageDetail$outboundSchema: z.ZodType<
|
|
22
|
+
export declare const ChatMessageContentItemImageDetail$outboundSchema: z.ZodType<string, ChatMessageContentItemImageDetail>;
|
|
23
23
|
/** @internal */
|
|
24
24
|
export declare const ImageUrl$inboundSchema: z.ZodType<ImageUrl, unknown>;
|
|
25
25
|
/** @internal */
|
|
@@ -4,23 +4,16 @@
|
|
|
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 ChatMessageContentItemImageDetail = {
|
|
9
9
|
Auto: "auto",
|
|
10
10
|
Low: "low",
|
|
11
11
|
High: "high",
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export const ChatMessageContentItemImageDetail$inboundSchema =
|
|
15
|
-
.union([
|
|
16
|
-
z.enum(ChatMessageContentItemImageDetail),
|
|
17
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
18
|
-
]);
|
|
14
|
+
export const ChatMessageContentItemImageDetail$inboundSchema = openEnums.inboundSchema(ChatMessageContentItemImageDetail);
|
|
19
15
|
/** @internal */
|
|
20
|
-
export const ChatMessageContentItemImageDetail$outboundSchema =
|
|
21
|
-
z.enum(ChatMessageContentItemImageDetail),
|
|
22
|
-
z.string().and(z.custom()),
|
|
23
|
-
]);
|
|
16
|
+
export const ChatMessageContentItemImageDetail$outboundSchema = openEnums.outboundSchema(ChatMessageContentItemImageDetail);
|
|
24
17
|
/** @internal */
|
|
25
18
|
export const ImageUrl$inboundSchema = z.object({
|
|
26
19
|
url: z.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
|
import { CompletionLogprobs$inboundSchema, } from "./completionlogprobs.js";
|
|
9
9
|
export const CompletionFinishReason = {
|
|
10
10
|
Stop: "stop",
|
|
@@ -12,11 +12,7 @@ export const CompletionFinishReason = {
|
|
|
12
12
|
ContentFilter: "content_filter",
|
|
13
13
|
};
|
|
14
14
|
/** @internal */
|
|
15
|
-
export const CompletionFinishReason$inboundSchema =
|
|
16
|
-
.union([
|
|
17
|
-
z.enum(CompletionFinishReason),
|
|
18
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
19
|
-
]);
|
|
15
|
+
export const CompletionFinishReason$inboundSchema = openEnums.inboundSchema(CompletionFinishReason);
|
|
20
16
|
/** @internal */
|
|
21
17
|
export const CompletionChoice$inboundSchema = z.object({
|
|
22
18
|
text: z.string(),
|
|
@@ -15,7 +15,7 @@ export type CreateChargeRequest = {
|
|
|
15
15
|
chainId: ChainId;
|
|
16
16
|
};
|
|
17
17
|
/** @internal */
|
|
18
|
-
export declare const ChainId$outboundSchema: z.ZodType<
|
|
18
|
+
export declare const ChainId$outboundSchema: z.ZodType<number, ChainId>;
|
|
19
19
|
/** @internal */
|
|
20
20
|
export type CreateChargeRequest$Outbound = {
|
|
21
21
|
amount: number;
|
|
@@ -3,16 +3,15 @@
|
|
|
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
|
export const ChainId = {
|
|
7
8
|
One: 1,
|
|
8
9
|
OneHundredAndThirtySeven: 137,
|
|
9
10
|
EightThousandFourHundredAndFiftyThree: 8453,
|
|
10
11
|
};
|
|
11
12
|
/** @internal */
|
|
12
|
-
export const ChainId$outboundSchema =
|
|
13
|
-
|
|
14
|
-
z.number().and(z.custom()),
|
|
15
|
-
]);
|
|
13
|
+
export const ChainId$outboundSchema = openEnums
|
|
14
|
+
.outboundSchemaInt(ChainId);
|
|
16
15
|
/** @internal */
|
|
17
16
|
export const CreateChargeRequest$outboundSchema = z.object({
|
|
18
17
|
amount: z.number(),
|
|
@@ -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 EndpointStatus = {
|
|
7
6
|
Zero: 0,
|
|
8
7
|
Minus1: -1,
|
|
@@ -12,9 +11,5 @@ export const EndpointStatus = {
|
|
|
12
11
|
Minus10: -10,
|
|
13
12
|
};
|
|
14
13
|
/** @internal */
|
|
15
|
-
export const EndpointStatus$inboundSchema =
|
|
16
|
-
.union([
|
|
17
|
-
z.enum(EndpointStatus),
|
|
18
|
-
z.number().transform(catchUnrecognizedEnum),
|
|
19
|
-
]);
|
|
14
|
+
export const EndpointStatus$inboundSchema = openEnums.inboundSchemaInt(EndpointStatus);
|
|
20
15
|
//# sourceMappingURL=endpointstatus.js.map
|
|
@@ -10,5 +10,5 @@ export type ImageGenerationStatus = OpenEnum<typeof ImageGenerationStatus>;
|
|
|
10
10
|
/** @internal */
|
|
11
11
|
export declare const ImageGenerationStatus$inboundSchema: z.ZodType<ImageGenerationStatus, unknown>;
|
|
12
12
|
/** @internal */
|
|
13
|
-
export declare const ImageGenerationStatus$outboundSchema: z.ZodType<
|
|
13
|
+
export declare const ImageGenerationStatus$outboundSchema: z.ZodType<string, ImageGenerationStatus>;
|
|
14
14
|
//# sourceMappingURL=imagegenerationstatus.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 ImageGenerationStatus = {
|
|
7
6
|
InProgress: "in_progress",
|
|
8
7
|
Completed: "completed",
|
|
@@ -10,14 +9,7 @@ export const ImageGenerationStatus = {
|
|
|
10
9
|
Failed: "failed",
|
|
11
10
|
};
|
|
12
11
|
/** @internal */
|
|
13
|
-
export const ImageGenerationStatus$inboundSchema =
|
|
14
|
-
.union([
|
|
15
|
-
z.enum(ImageGenerationStatus),
|
|
16
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
17
|
-
]);
|
|
12
|
+
export const ImageGenerationStatus$inboundSchema = openEnums.inboundSchema(ImageGenerationStatus);
|
|
18
13
|
/** @internal */
|
|
19
|
-
export const ImageGenerationStatus$outboundSchema =
|
|
20
|
-
z.enum(ImageGenerationStatus),
|
|
21
|
-
z.string().and(z.custom()),
|
|
22
|
-
]);
|
|
14
|
+
export const ImageGenerationStatus$outboundSchema = openEnums.outboundSchema(ImageGenerationStatus);
|
|
23
15
|
//# sourceMappingURL=imagegenerationstatus.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 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(),
|
|
@@ -19,7 +19,7 @@ export type OpenAIResponsesInputFunctionCall = {
|
|
|
19
19
|
name: string;
|
|
20
20
|
arguments: string;
|
|
21
21
|
id?: string | undefined;
|
|
22
|
-
status?: ToolCallStatus | undefined;
|
|
22
|
+
status?: ToolCallStatus | null | undefined;
|
|
23
23
|
};
|
|
24
24
|
export declare const OpenAIResponsesInputTypeFunctionCallOutput: {
|
|
25
25
|
readonly FunctionCallOutput: "function_call_output";
|
|
@@ -27,10 +27,10 @@ export declare const OpenAIResponsesInputTypeFunctionCallOutput: {
|
|
|
27
27
|
export type OpenAIResponsesInputTypeFunctionCallOutput = ClosedEnum<typeof OpenAIResponsesInputTypeFunctionCallOutput>;
|
|
28
28
|
export type OpenAIResponsesInputFunctionCallOutput = {
|
|
29
29
|
type: OpenAIResponsesInputTypeFunctionCallOutput;
|
|
30
|
-
id
|
|
30
|
+
id?: string | null | undefined;
|
|
31
31
|
callId: string;
|
|
32
32
|
output: string;
|
|
33
|
-
status?: ToolCallStatus | undefined;
|
|
33
|
+
status?: ToolCallStatus | null | undefined;
|
|
34
34
|
};
|
|
35
35
|
export declare const OpenAIResponsesInputTypeMessage2: {
|
|
36
36
|
readonly Message: "message";
|
|
@@ -124,8 +124,8 @@ export type OpenAIResponsesInputMessage1 = {
|
|
|
124
124
|
type: "input_file";
|
|
125
125
|
})> | string;
|
|
126
126
|
};
|
|
127
|
-
export type OpenAIResponsesInputUnion1 =
|
|
128
|
-
export type OpenAIResponsesInputUnion = string | Array<
|
|
127
|
+
export type OpenAIResponsesInputUnion1 = OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1;
|
|
128
|
+
export type OpenAIResponsesInputUnion = string | Array<OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1> | any;
|
|
129
129
|
/** @internal */
|
|
130
130
|
export declare const OpenAIResponsesInputTypeFunctionCall$inboundSchema: z.ZodEnum<typeof OpenAIResponsesInputTypeFunctionCall>;
|
|
131
131
|
/** @internal */
|
|
@@ -53,7 +53,7 @@ export const OpenAIResponsesInputFunctionCall$inboundSchema = z.object({
|
|
|
53
53
|
name: z.string(),
|
|
54
54
|
arguments: z.string(),
|
|
55
55
|
id: z.string().optional(),
|
|
56
|
-
status: ToolCallStatus$inboundSchema.optional(),
|
|
56
|
+
status: z.nullable(ToolCallStatus$inboundSchema).optional(),
|
|
57
57
|
}).transform((v) => {
|
|
58
58
|
return remap$(v, {
|
|
59
59
|
"call_id": "callId",
|
|
@@ -67,10 +67,10 @@ export const OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema = z.enum(O
|
|
|
67
67
|
/** @internal */
|
|
68
68
|
export const OpenAIResponsesInputFunctionCallOutput$inboundSchema = z.object({
|
|
69
69
|
type: OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema,
|
|
70
|
-
id: z.string(),
|
|
70
|
+
id: z.nullable(z.string()).optional(),
|
|
71
71
|
call_id: z.string(),
|
|
72
72
|
output: z.string(),
|
|
73
|
-
status: ToolCallStatus$inboundSchema.optional(),
|
|
73
|
+
status: z.nullable(ToolCallStatus$inboundSchema).optional(),
|
|
74
74
|
}).transform((v) => {
|
|
75
75
|
return remap$(v, {
|
|
76
76
|
"call_id": "callId",
|
|
@@ -192,10 +192,10 @@ export function openAIResponsesInputMessage1FromJSON(jsonString) {
|
|
|
192
192
|
}
|
|
193
193
|
/** @internal */
|
|
194
194
|
export const OpenAIResponsesInputUnion1$inboundSchema = z.union([
|
|
195
|
-
z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
|
|
196
195
|
z.lazy(() => OpenAIResponsesInputFunctionCall$inboundSchema),
|
|
197
196
|
OutputMessage$inboundSchema,
|
|
198
197
|
z.lazy(() => OpenAIResponsesInputMessage2$inboundSchema),
|
|
198
|
+
z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
|
|
199
199
|
OutputItemImageGenerationCall$inboundSchema,
|
|
200
200
|
z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema),
|
|
201
201
|
]);
|
|
@@ -206,10 +206,10 @@ export function openAIResponsesInputUnion1FromJSON(jsonString) {
|
|
|
206
206
|
export const OpenAIResponsesInputUnion$inboundSchema = z.union([
|
|
207
207
|
z.string(),
|
|
208
208
|
z.array(z.union([
|
|
209
|
-
z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
|
|
210
209
|
z.lazy(() => OpenAIResponsesInputFunctionCall$inboundSchema),
|
|
211
210
|
OutputMessage$inboundSchema,
|
|
212
211
|
z.lazy(() => OpenAIResponsesInputMessage2$inboundSchema),
|
|
212
|
+
z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
|
|
213
213
|
OutputItemImageGenerationCall$inboundSchema,
|
|
214
214
|
z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema),
|
|
215
215
|
])),
|
|
@@ -10,5 +10,5 @@ export type OpenAIResponsesReasoningEffort = OpenEnum<typeof OpenAIResponsesReas
|
|
|
10
10
|
/** @internal */
|
|
11
11
|
export declare const OpenAIResponsesReasoningEffort$inboundSchema: z.ZodType<OpenAIResponsesReasoningEffort, unknown>;
|
|
12
12
|
/** @internal */
|
|
13
|
-
export declare const OpenAIResponsesReasoningEffort$outboundSchema: z.ZodType<
|
|
13
|
+
export declare const OpenAIResponsesReasoningEffort$outboundSchema: z.ZodType<string, OpenAIResponsesReasoningEffort>;
|
|
14
14
|
//# sourceMappingURL=openairesponsesreasoningeffort.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 OpenAIResponsesReasoningEffort = {
|
|
7
6
|
High: "high",
|
|
8
7
|
Medium: "medium",
|
|
@@ -10,14 +9,7 @@ export const OpenAIResponsesReasoningEffort = {
|
|
|
10
9
|
Minimal: "minimal",
|
|
11
10
|
};
|
|
12
11
|
/** @internal */
|
|
13
|
-
export const OpenAIResponsesReasoningEffort$inboundSchema =
|
|
14
|
-
.union([
|
|
15
|
-
z.enum(OpenAIResponsesReasoningEffort),
|
|
16
|
-
z.string().transform(catchUnrecognizedEnum),
|
|
17
|
-
]);
|
|
12
|
+
export const OpenAIResponsesReasoningEffort$inboundSchema = openEnums.inboundSchema(OpenAIResponsesReasoningEffort);
|
|
18
13
|
/** @internal */
|
|
19
|
-
export const OpenAIResponsesReasoningEffort$outboundSchema =
|
|
20
|
-
z.enum(OpenAIResponsesReasoningEffort),
|
|
21
|
-
z.string().and(z.custom()),
|
|
22
|
-
]);
|
|
14
|
+
export const OpenAIResponsesReasoningEffort$outboundSchema = openEnums.outboundSchema(OpenAIResponsesReasoningEffort);
|
|
23
15
|
//# 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
|
|
@@ -10,20 +10,20 @@ export type OpenResponsesFunctionCallOutputType = ClosedEnum<typeof OpenResponse
|
|
|
10
10
|
*/
|
|
11
11
|
export type OpenResponsesFunctionCallOutput = {
|
|
12
12
|
type: OpenResponsesFunctionCallOutputType;
|
|
13
|
-
id
|
|
13
|
+
id?: string | null | undefined;
|
|
14
14
|
callId: string;
|
|
15
15
|
output: string;
|
|
16
|
-
status?: ToolCallStatus | undefined;
|
|
16
|
+
status?: ToolCallStatus | null | undefined;
|
|
17
17
|
};
|
|
18
18
|
/** @internal */
|
|
19
19
|
export declare const OpenResponsesFunctionCallOutputType$outboundSchema: z.ZodEnum<typeof OpenResponsesFunctionCallOutputType>;
|
|
20
20
|
/** @internal */
|
|
21
21
|
export type OpenResponsesFunctionCallOutput$Outbound = {
|
|
22
22
|
type: string;
|
|
23
|
-
id
|
|
23
|
+
id?: string | null | undefined;
|
|
24
24
|
call_id: string;
|
|
25
25
|
output: string;
|
|
26
|
-
status?: string | undefined;
|
|
26
|
+
status?: string | null | undefined;
|
|
27
27
|
};
|
|
28
28
|
/** @internal */
|
|
29
29
|
export declare const OpenResponsesFunctionCallOutput$outboundSchema: z.ZodType<OpenResponsesFunctionCallOutput$Outbound, OpenResponsesFunctionCallOutput>;
|