@openrouter/sdk 0.13.36 → 0.13.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/imagegenerationservertool.d.ts +2 -22
- package/esm/models/imagegenerationservertool.js +4 -26
- package/esm/models/responseserrorfield.d.ts +1 -0
- package/esm/models/responseserrorfield.js +1 -0
- package/jsr.json +1 -1
- package/package.json +8 -8
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "0.13.
|
|
52
|
+
readonly sdkVersion: "0.13.37";
|
|
53
53
|
readonly genVersion: "2.884.4";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.13.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.13.37 2.884.4 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "0.13.
|
|
29
|
+
sdkVersion: "0.13.37",
|
|
30
30
|
genVersion: "2.884.4",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.13.37 2.884.4 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -17,11 +17,6 @@ export type InputImageMask = {
|
|
|
17
17
|
fileId?: string | undefined;
|
|
18
18
|
imageUrl?: string | undefined;
|
|
19
19
|
};
|
|
20
|
-
export declare const ModelEnum: {
|
|
21
|
-
readonly GptImage1: "gpt-image-1";
|
|
22
|
-
readonly GptImage1Mini: "gpt-image-1-mini";
|
|
23
|
-
};
|
|
24
|
-
export type ModelEnum = OpenEnum<typeof ModelEnum>;
|
|
25
20
|
export declare const Moderation: {
|
|
26
21
|
readonly Auto: "auto";
|
|
27
22
|
readonly Low: "low";
|
|
@@ -40,13 +35,6 @@ export declare const ImageGenerationServerToolQuality: {
|
|
|
40
35
|
readonly Auto: "auto";
|
|
41
36
|
};
|
|
42
37
|
export type ImageGenerationServerToolQuality = OpenEnum<typeof ImageGenerationServerToolQuality>;
|
|
43
|
-
export declare const Size: {
|
|
44
|
-
readonly OneThousandAndTwentyFourx1024: "1024x1024";
|
|
45
|
-
readonly OneThousandAndTwentyFourx1536: "1024x1536";
|
|
46
|
-
readonly OneThousandFiveHundredAndThirtySixx1024: "1536x1024";
|
|
47
|
-
readonly Auto: "auto";
|
|
48
|
-
};
|
|
49
|
-
export type Size = OpenEnum<typeof Size>;
|
|
50
38
|
/**
|
|
51
39
|
* Image generation tool configuration
|
|
52
40
|
*/
|
|
@@ -54,13 +42,13 @@ export type ImageGenerationServerTool = {
|
|
|
54
42
|
background?: ImageGenerationServerToolBackground | undefined;
|
|
55
43
|
inputFidelity?: InputFidelity | null | undefined;
|
|
56
44
|
inputImageMask?: InputImageMask | undefined;
|
|
57
|
-
model?:
|
|
45
|
+
model?: string | undefined;
|
|
58
46
|
moderation?: Moderation | undefined;
|
|
59
47
|
outputCompression?: number | undefined;
|
|
60
48
|
outputFormat?: ImageGenerationServerToolOutputFormat | undefined;
|
|
61
49
|
partialImages?: number | undefined;
|
|
62
50
|
quality?: ImageGenerationServerToolQuality | undefined;
|
|
63
|
-
size?:
|
|
51
|
+
size?: string | undefined;
|
|
64
52
|
type: "image_generation";
|
|
65
53
|
};
|
|
66
54
|
/** @internal */
|
|
@@ -83,10 +71,6 @@ export declare const InputImageMask$outboundSchema: z.ZodType<InputImageMask$Out
|
|
|
83
71
|
export declare function inputImageMaskToJSON(inputImageMask: InputImageMask): string;
|
|
84
72
|
export declare function inputImageMaskFromJSON(jsonString: string): SafeParseResult<InputImageMask, SDKValidationError>;
|
|
85
73
|
/** @internal */
|
|
86
|
-
export declare const ModelEnum$inboundSchema: z.ZodType<ModelEnum, unknown>;
|
|
87
|
-
/** @internal */
|
|
88
|
-
export declare const ModelEnum$outboundSchema: z.ZodType<string, ModelEnum>;
|
|
89
|
-
/** @internal */
|
|
90
74
|
export declare const Moderation$inboundSchema: z.ZodType<Moderation, unknown>;
|
|
91
75
|
/** @internal */
|
|
92
76
|
export declare const Moderation$outboundSchema: z.ZodType<string, Moderation>;
|
|
@@ -99,10 +83,6 @@ export declare const ImageGenerationServerToolQuality$inboundSchema: z.ZodType<I
|
|
|
99
83
|
/** @internal */
|
|
100
84
|
export declare const ImageGenerationServerToolQuality$outboundSchema: z.ZodType<string, ImageGenerationServerToolQuality>;
|
|
101
85
|
/** @internal */
|
|
102
|
-
export declare const Size$inboundSchema: z.ZodType<Size, unknown>;
|
|
103
|
-
/** @internal */
|
|
104
|
-
export declare const Size$outboundSchema: z.ZodType<string, Size>;
|
|
105
|
-
/** @internal */
|
|
106
86
|
export declare const ImageGenerationServerTool$inboundSchema: z.ZodType<ImageGenerationServerTool, unknown>;
|
|
107
87
|
/** @internal */
|
|
108
88
|
export type ImageGenerationServerTool$Outbound = {
|
|
@@ -15,10 +15,6 @@ export const InputFidelity = {
|
|
|
15
15
|
High: "high",
|
|
16
16
|
Low: "low",
|
|
17
17
|
};
|
|
18
|
-
export const ModelEnum = {
|
|
19
|
-
GptImage1: "gpt-image-1",
|
|
20
|
-
GptImage1Mini: "gpt-image-1-mini",
|
|
21
|
-
};
|
|
22
18
|
export const Moderation = {
|
|
23
19
|
Auto: "auto",
|
|
24
20
|
Low: "low",
|
|
@@ -34,12 +30,6 @@ export const ImageGenerationServerToolQuality = {
|
|
|
34
30
|
High: "high",
|
|
35
31
|
Auto: "auto",
|
|
36
32
|
};
|
|
37
|
-
export const Size = {
|
|
38
|
-
OneThousandAndTwentyFourx1024: "1024x1024",
|
|
39
|
-
OneThousandAndTwentyFourx1536: "1024x1536",
|
|
40
|
-
OneThousandFiveHundredAndThirtySixx1024: "1536x1024",
|
|
41
|
-
Auto: "auto",
|
|
42
|
-
};
|
|
43
33
|
/** @internal */
|
|
44
34
|
export const ImageGenerationServerToolBackground$inboundSchema = openEnums.inboundSchema(ImageGenerationServerToolBackground);
|
|
45
35
|
/** @internal */
|
|
@@ -75,12 +65,6 @@ export function inputImageMaskFromJSON(jsonString) {
|
|
|
75
65
|
return safeParse(jsonString, (x) => InputImageMask$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InputImageMask' from JSON`);
|
|
76
66
|
}
|
|
77
67
|
/** @internal */
|
|
78
|
-
export const ModelEnum$inboundSchema = openEnums
|
|
79
|
-
.inboundSchema(ModelEnum);
|
|
80
|
-
/** @internal */
|
|
81
|
-
export const ModelEnum$outboundSchema = openEnums
|
|
82
|
-
.outboundSchema(ModelEnum);
|
|
83
|
-
/** @internal */
|
|
84
68
|
export const Moderation$inboundSchema = openEnums.inboundSchema(Moderation);
|
|
85
69
|
/** @internal */
|
|
86
70
|
export const Moderation$outboundSchema = openEnums.outboundSchema(Moderation);
|
|
@@ -93,23 +77,17 @@ export const ImageGenerationServerToolQuality$inboundSchema = openEnums.inboundS
|
|
|
93
77
|
/** @internal */
|
|
94
78
|
export const ImageGenerationServerToolQuality$outboundSchema = openEnums.outboundSchema(ImageGenerationServerToolQuality);
|
|
95
79
|
/** @internal */
|
|
96
|
-
export const Size$inboundSchema = openEnums
|
|
97
|
-
.inboundSchema(Size);
|
|
98
|
-
/** @internal */
|
|
99
|
-
export const Size$outboundSchema = openEnums
|
|
100
|
-
.outboundSchema(Size);
|
|
101
|
-
/** @internal */
|
|
102
80
|
export const ImageGenerationServerTool$inboundSchema = z.object({
|
|
103
81
|
background: ImageGenerationServerToolBackground$inboundSchema.optional(),
|
|
104
82
|
input_fidelity: z.nullable(InputFidelity$inboundSchema).optional(),
|
|
105
83
|
input_image_mask: z.lazy(() => InputImageMask$inboundSchema).optional(),
|
|
106
|
-
model:
|
|
84
|
+
model: z.string().optional(),
|
|
107
85
|
moderation: Moderation$inboundSchema.optional(),
|
|
108
86
|
output_compression: z.int().optional(),
|
|
109
87
|
output_format: ImageGenerationServerToolOutputFormat$inboundSchema.optional(),
|
|
110
88
|
partial_images: z.int().optional(),
|
|
111
89
|
quality: ImageGenerationServerToolQuality$inboundSchema.optional(),
|
|
112
|
-
size:
|
|
90
|
+
size: z.string().optional(),
|
|
113
91
|
type: z.literal("image_generation"),
|
|
114
92
|
}).transform((v) => {
|
|
115
93
|
return remap$(v, {
|
|
@@ -125,13 +103,13 @@ export const ImageGenerationServerTool$outboundSchema = z.object({
|
|
|
125
103
|
background: ImageGenerationServerToolBackground$outboundSchema.optional(),
|
|
126
104
|
inputFidelity: z.nullable(InputFidelity$outboundSchema).optional(),
|
|
127
105
|
inputImageMask: z.lazy(() => InputImageMask$outboundSchema).optional(),
|
|
128
|
-
model:
|
|
106
|
+
model: z.string().optional(),
|
|
129
107
|
moderation: Moderation$outboundSchema.optional(),
|
|
130
108
|
outputCompression: z.int().optional(),
|
|
131
109
|
outputFormat: ImageGenerationServerToolOutputFormat$outboundSchema.optional(),
|
|
132
110
|
partialImages: z.int().optional(),
|
|
133
111
|
quality: ImageGenerationServerToolQuality$outboundSchema.optional(),
|
|
134
|
-
size:
|
|
112
|
+
size: z.string().optional(),
|
|
135
113
|
type: z.literal("image_generation"),
|
|
136
114
|
}).transform((v) => {
|
|
137
115
|
return remap$(v, {
|
|
@@ -21,6 +21,7 @@ export declare const Code: {
|
|
|
21
21
|
readonly EmptyImageFile: "empty_image_file";
|
|
22
22
|
readonly FailedToDownloadImage: "failed_to_download_image";
|
|
23
23
|
readonly ImageFileNotFound: "image_file_not_found";
|
|
24
|
+
readonly BioPolicy: "bio_policy";
|
|
24
25
|
};
|
|
25
26
|
export type Code = OpenEnum<typeof Code>;
|
|
26
27
|
/**
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.37",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"packageManager": "pnpm@10.22.0",
|
|
23
23
|
"publishConfig": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"access": "public",
|
|
25
|
+
"provenance": true
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./esm/index.js",
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
77
|
+
"test": "vitest --run --project unit",
|
|
78
|
+
"test:e2e": "vitest --run --project e2e",
|
|
76
79
|
"test:transit": "exit 0",
|
|
77
|
-
"typecheck": "tsc --noEmit",
|
|
78
|
-
"typecheck:transit": "exit 0",
|
|
79
80
|
"test:watch": "vitest --watch --project unit",
|
|
80
81
|
"compile": "tsc",
|
|
81
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
82
82
|
"prepare": "npm run build",
|
|
83
|
-
"
|
|
84
|
-
"
|
|
83
|
+
"typecheck": "tsc --noEmit",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|