@openrouter/sdk 1.2.137 → 1.2.138
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/agentmessageitem.d.ts +3 -1
- package/esm/models/agentmessageitem.js +2 -0
- package/esm/models/customtoolcalloutputitem.d.ts +3 -1
- package/esm/models/customtoolcalloutputitem.js +2 -0
- package/esm/models/easyinputmessage.d.ts +3 -1
- package/esm/models/easyinputmessage.js +2 -0
- package/esm/models/functioncalloutputitem.d.ts +3 -1
- package/esm/models/functioncalloutputitem.js +2 -0
- package/esm/models/inputimage.d.ts +3 -1
- package/esm/models/inputimage.js +4 -0
- package/esm/models/inputmessageitem.d.ts +3 -1
- package/esm/models/inputmessageitem.js +2 -0
- package/jsr.json +1 -1
- package/package.json +7 -7
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.2.
|
|
53
|
+
readonly sdkVersion: "1.2.138";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.138 2.914.0 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.2.
|
|
32
|
+
sdkVersion: "1.2.138",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.138 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -22,10 +22,11 @@ export declare const AgentMessageItemDetail: {
|
|
|
22
22
|
};
|
|
23
23
|
export type AgentMessageItemDetail = OpenEnum<typeof AgentMessageItemDetail>;
|
|
24
24
|
/**
|
|
25
|
-
* Image input content item
|
|
25
|
+
* Image input content item. Provide either an image_url (a URL or a base64 data URL) or the file_id of an uploaded image.
|
|
26
26
|
*/
|
|
27
27
|
export type AgentMessageItemContentInputImage = {
|
|
28
28
|
detail: AgentMessageItemDetail;
|
|
29
|
+
fileId?: string | null | undefined;
|
|
29
30
|
imageUrl?: string | null | undefined;
|
|
30
31
|
type: "input_image";
|
|
31
32
|
};
|
|
@@ -70,6 +71,7 @@ export declare const AgentMessageItemDetail$outboundSchema: z.ZodType<string, Ag
|
|
|
70
71
|
/** @internal */
|
|
71
72
|
export type AgentMessageItemContentInputImage$Outbound = {
|
|
72
73
|
detail: string;
|
|
74
|
+
file_id?: string | null | undefined;
|
|
73
75
|
image_url?: string | null | undefined;
|
|
74
76
|
type: "input_image";
|
|
75
77
|
};
|
|
@@ -53,10 +53,12 @@ export const AgentMessageItemDetail$outboundSchema = openEnums.outboundSchema(Ag
|
|
|
53
53
|
/** @internal */
|
|
54
54
|
export const AgentMessageItemContentInputImage$outboundSchema = z.object({
|
|
55
55
|
detail: AgentMessageItemDetail$outboundSchema,
|
|
56
|
+
fileId: z.nullable(z.string()).optional(),
|
|
56
57
|
imageUrl: z.nullable(z.string()).optional(),
|
|
57
58
|
type: z.literal("input_image"),
|
|
58
59
|
}).transform((v) => {
|
|
59
60
|
return remap$(v, {
|
|
61
|
+
fileId: "file_id",
|
|
60
62
|
imageUrl: "image_url",
|
|
61
63
|
});
|
|
62
64
|
});
|
|
@@ -10,10 +10,11 @@ export declare const CustomToolCallOutputItemDetail: {
|
|
|
10
10
|
};
|
|
11
11
|
export type CustomToolCallOutputItemDetail = OpenEnum<typeof CustomToolCallOutputItemDetail>;
|
|
12
12
|
/**
|
|
13
|
-
* Image input content item
|
|
13
|
+
* Image input content item. Provide either an image_url (a URL or a base64 data URL) or the file_id of an uploaded image.
|
|
14
14
|
*/
|
|
15
15
|
export type CustomToolCallOutputItemOutputInputImage = {
|
|
16
16
|
detail: CustomToolCallOutputItemDetail;
|
|
17
|
+
fileId?: string | null | undefined;
|
|
17
18
|
imageUrl?: string | null | undefined;
|
|
18
19
|
type: "input_image";
|
|
19
20
|
};
|
|
@@ -37,6 +38,7 @@ export declare const CustomToolCallOutputItemDetail$outboundSchema: z.ZodType<st
|
|
|
37
38
|
/** @internal */
|
|
38
39
|
export type CustomToolCallOutputItemOutputInputImage$Outbound = {
|
|
39
40
|
detail: string;
|
|
41
|
+
file_id?: string | null | undefined;
|
|
40
42
|
image_url?: string | null | undefined;
|
|
41
43
|
type: "input_image";
|
|
42
44
|
};
|
|
@@ -21,10 +21,12 @@ export const CustomToolCallOutputItemDetail$outboundSchema = openEnums.outboundS
|
|
|
21
21
|
/** @internal */
|
|
22
22
|
export const CustomToolCallOutputItemOutputInputImage$outboundSchema = z.object({
|
|
23
23
|
detail: CustomToolCallOutputItemDetail$outboundSchema,
|
|
24
|
+
fileId: z.nullable(z.string()).optional(),
|
|
24
25
|
imageUrl: z.nullable(z.string()).optional(),
|
|
25
26
|
type: z.literal("input_image"),
|
|
26
27
|
}).transform((v) => {
|
|
27
28
|
return remap$(v, {
|
|
29
|
+
fileId: "file_id",
|
|
28
30
|
imageUrl: "image_url",
|
|
29
31
|
});
|
|
30
32
|
});
|
|
@@ -12,10 +12,11 @@ export declare const EasyInputMessageDetail: {
|
|
|
12
12
|
};
|
|
13
13
|
export type EasyInputMessageDetail = OpenEnum<typeof EasyInputMessageDetail>;
|
|
14
14
|
/**
|
|
15
|
-
* Image input content item
|
|
15
|
+
* Image input content item. Provide either an image_url (a URL or a base64 data URL) or the file_id of an uploaded image.
|
|
16
16
|
*/
|
|
17
17
|
export type EasyInputMessageContentInputImage = {
|
|
18
18
|
detail: EasyInputMessageDetail;
|
|
19
|
+
fileId?: string | null | undefined;
|
|
19
20
|
imageUrl?: string | null | undefined;
|
|
20
21
|
type: "input_image";
|
|
21
22
|
};
|
|
@@ -68,6 +69,7 @@ export declare const EasyInputMessageDetail$outboundSchema: z.ZodType<string, Ea
|
|
|
68
69
|
/** @internal */
|
|
69
70
|
export type EasyInputMessageContentInputImage$Outbound = {
|
|
70
71
|
detail: string;
|
|
72
|
+
file_id?: string | null | undefined;
|
|
71
73
|
image_url?: string | null | undefined;
|
|
72
74
|
type: "input_image";
|
|
73
75
|
};
|
|
@@ -41,10 +41,12 @@ export const EasyInputMessageDetail$outboundSchema = openEnums.outboundSchema(Ea
|
|
|
41
41
|
/** @internal */
|
|
42
42
|
export const EasyInputMessageContentInputImage$outboundSchema = z.object({
|
|
43
43
|
detail: EasyInputMessageDetail$outboundSchema,
|
|
44
|
+
fileId: z.nullable(z.string()).optional(),
|
|
44
45
|
imageUrl: z.nullable(z.string()).optional(),
|
|
45
46
|
type: z.literal("input_image"),
|
|
46
47
|
}).transform((v) => {
|
|
47
48
|
return remap$(v, {
|
|
49
|
+
fileId: "file_id",
|
|
48
50
|
imageUrl: "image_url",
|
|
49
51
|
});
|
|
50
52
|
});
|
|
@@ -11,10 +11,11 @@ export declare const FunctionCallOutputItemDetail: {
|
|
|
11
11
|
};
|
|
12
12
|
export type FunctionCallOutputItemDetail = OpenEnum<typeof FunctionCallOutputItemDetail>;
|
|
13
13
|
/**
|
|
14
|
-
* Image input content item
|
|
14
|
+
* Image input content item. Provide either an image_url (a URL or a base64 data URL) or the file_id of an uploaded image.
|
|
15
15
|
*/
|
|
16
16
|
export type FunctionCallOutputItemOutputInputImage = {
|
|
17
17
|
detail: FunctionCallOutputItemDetail;
|
|
18
|
+
fileId?: string | null | undefined;
|
|
18
19
|
imageUrl?: string | null | undefined;
|
|
19
20
|
type: "input_image";
|
|
20
21
|
};
|
|
@@ -39,6 +40,7 @@ export declare const FunctionCallOutputItemDetail$outboundSchema: z.ZodType<stri
|
|
|
39
40
|
/** @internal */
|
|
40
41
|
export type FunctionCallOutputItemOutputInputImage$Outbound = {
|
|
41
42
|
detail: string;
|
|
43
|
+
file_id?: string | null | undefined;
|
|
42
44
|
image_url?: string | null | undefined;
|
|
43
45
|
type: "input_image";
|
|
44
46
|
};
|
|
@@ -22,10 +22,12 @@ export const FunctionCallOutputItemDetail$outboundSchema = openEnums.outboundSch
|
|
|
22
22
|
/** @internal */
|
|
23
23
|
export const FunctionCallOutputItemOutputInputImage$outboundSchema = z.object({
|
|
24
24
|
detail: FunctionCallOutputItemDetail$outboundSchema,
|
|
25
|
+
fileId: z.nullable(z.string()).optional(),
|
|
25
26
|
imageUrl: z.nullable(z.string()).optional(),
|
|
26
27
|
type: z.literal("input_image"),
|
|
27
28
|
}).transform((v) => {
|
|
28
29
|
return remap$(v, {
|
|
30
|
+
fileId: "file_id",
|
|
29
31
|
imageUrl: "image_url",
|
|
30
32
|
});
|
|
31
33
|
});
|
|
@@ -14,10 +14,11 @@ export declare const InputImageTypeEnum: {
|
|
|
14
14
|
};
|
|
15
15
|
export type InputImageTypeEnum = ClosedEnum<typeof InputImageTypeEnum>;
|
|
16
16
|
/**
|
|
17
|
-
* Image input content item
|
|
17
|
+
* Image input content item. Provide either an image_url (a URL or a base64 data URL) or the file_id of an uploaded image.
|
|
18
18
|
*/
|
|
19
19
|
export type InputImage = {
|
|
20
20
|
detail: InputImageDetail;
|
|
21
|
+
fileId?: string | null | undefined;
|
|
21
22
|
imageUrl?: string | null | undefined;
|
|
22
23
|
type: InputImageTypeEnum;
|
|
23
24
|
};
|
|
@@ -34,6 +35,7 @@ export declare const InputImage$inboundSchema: z.ZodType<InputImage, unknown>;
|
|
|
34
35
|
/** @internal */
|
|
35
36
|
export type InputImage$Outbound = {
|
|
36
37
|
detail: string;
|
|
38
|
+
file_id?: string | null | undefined;
|
|
37
39
|
image_url?: string | null | undefined;
|
|
38
40
|
type: string;
|
|
39
41
|
};
|
package/esm/models/inputimage.js
CHANGED
|
@@ -27,20 +27,24 @@ export const InputImageTypeEnum$outboundSchema = InputImageTypeEnum$inboundSchem
|
|
|
27
27
|
export const InputImage$inboundSchema = z
|
|
28
28
|
.object({
|
|
29
29
|
detail: InputImageDetail$inboundSchema,
|
|
30
|
+
file_id: z.nullable(z.string()).optional(),
|
|
30
31
|
image_url: z.nullable(z.string()).optional(),
|
|
31
32
|
type: InputImageTypeEnum$inboundSchema,
|
|
32
33
|
}).transform((v) => {
|
|
33
34
|
return remap$(v, {
|
|
35
|
+
"file_id": "fileId",
|
|
34
36
|
"image_url": "imageUrl",
|
|
35
37
|
});
|
|
36
38
|
});
|
|
37
39
|
/** @internal */
|
|
38
40
|
export const InputImage$outboundSchema = z.object({
|
|
39
41
|
detail: InputImageDetail$outboundSchema,
|
|
42
|
+
fileId: z.nullable(z.string()).optional(),
|
|
40
43
|
imageUrl: z.nullable(z.string()).optional(),
|
|
41
44
|
type: InputImageTypeEnum$outboundSchema,
|
|
42
45
|
}).transform((v) => {
|
|
43
46
|
return remap$(v, {
|
|
47
|
+
fileId: "file_id",
|
|
44
48
|
imageUrl: "image_url",
|
|
45
49
|
});
|
|
46
50
|
});
|
|
@@ -12,10 +12,11 @@ export declare const InputMessageItemDetail: {
|
|
|
12
12
|
};
|
|
13
13
|
export type InputMessageItemDetail = OpenEnum<typeof InputMessageItemDetail>;
|
|
14
14
|
/**
|
|
15
|
-
* Image input content item
|
|
15
|
+
* Image input content item. Provide either an image_url (a URL or a base64 data URL) or the file_id of an uploaded image.
|
|
16
16
|
*/
|
|
17
17
|
export type InputMessageItemContentInputImage = {
|
|
18
18
|
detail: InputMessageItemDetail;
|
|
19
|
+
fileId?: string | null | undefined;
|
|
19
20
|
imageUrl?: string | null | undefined;
|
|
20
21
|
type: "input_image";
|
|
21
22
|
};
|
|
@@ -48,6 +49,7 @@ export declare const InputMessageItemDetail$outboundSchema: z.ZodType<string, In
|
|
|
48
49
|
/** @internal */
|
|
49
50
|
export type InputMessageItemContentInputImage$Outbound = {
|
|
50
51
|
detail: string;
|
|
52
|
+
file_id?: string | null | undefined;
|
|
51
53
|
image_url?: string | null | undefined;
|
|
52
54
|
type: "input_image";
|
|
53
55
|
};
|
|
@@ -32,10 +32,12 @@ export const InputMessageItemDetail$outboundSchema = openEnums.outboundSchema(In
|
|
|
32
32
|
/** @internal */
|
|
33
33
|
export const InputMessageItemContentInputImage$outboundSchema = z.object({
|
|
34
34
|
detail: InputMessageItemDetail$outboundSchema,
|
|
35
|
+
fileId: z.nullable(z.string()).optional(),
|
|
35
36
|
imageUrl: z.nullable(z.string()).optional(),
|
|
36
37
|
type: z.literal("input_image"),
|
|
37
38
|
}).transform((v) => {
|
|
38
39
|
return remap$(v, {
|
|
40
|
+
fileId: "file_id",
|
|
39
41
|
imageUrl: "image_url",
|
|
40
42
|
});
|
|
41
43
|
});
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.138",
|
|
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": [
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
77
|
+
"test": "vitest --run --project unit",
|
|
78
|
+
"test:e2e": "vitest --run --project e2e",
|
|
78
79
|
"test:transit": "exit 0",
|
|
79
80
|
"test:watch": "vitest --watch --project unit",
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"compile": "tsc",
|
|
80
83
|
"postinstall": "node scripts/check-types.js || true",
|
|
81
|
-
"
|
|
82
|
-
"test:e2e": "vitest --run --project e2e",
|
|
83
|
-
"typecheck": "tsc --noEmit",
|
|
84
|
-
"typecheck:transit": "exit 0"
|
|
84
|
+
"prepare": "npm run build"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|