@openrouter/sdk 1.2.124 → 1.2.125
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/operations/creatererank.d.ts +5 -0
- package/esm/models/operations/creatererank.js +1 -0
- package/esm/models/speechrequest.d.ts +5 -0
- package/esm/models/speechrequest.js +1 -0
- package/esm/models/sttrequest.d.ts +5 -0
- package/esm/models/sttrequest.js +1 -0
- package/esm/models/videogenerationrequest.d.ts +5 -0
- package/esm/models/videogenerationrequest.js +1 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
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.125";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.125 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.125",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.125 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -61,6 +61,10 @@ export type CreateRerankRequestBody = {
|
|
|
61
61
|
* Number of most relevant documents to return
|
|
62
62
|
*/
|
|
63
63
|
topN?: number | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider.
|
|
66
|
+
*/
|
|
67
|
+
user?: string | undefined;
|
|
64
68
|
};
|
|
65
69
|
export type CreateRerankRequest = {
|
|
66
70
|
/**
|
|
@@ -177,6 +181,7 @@ export type CreateRerankRequestBody$Outbound = {
|
|
|
177
181
|
provider?: models.ProviderPreferences$Outbound | null | undefined;
|
|
178
182
|
query: string;
|
|
179
183
|
top_n?: number | undefined;
|
|
184
|
+
user?: string | undefined;
|
|
180
185
|
};
|
|
181
186
|
/** @internal */
|
|
182
187
|
export declare const CreateRerankRequestBody$outboundSchema: z.ZodType<CreateRerankRequestBody$Outbound, CreateRerankRequestBody>;
|
|
@@ -27,6 +27,7 @@ export const CreateRerankRequestBody$outboundSchema = z.object({
|
|
|
27
27
|
provider: z.nullable(models.ProviderPreferences$outboundSchema).optional(),
|
|
28
28
|
query: z.string(),
|
|
29
29
|
topN: z.int().optional(),
|
|
30
|
+
user: z.string().optional(),
|
|
30
31
|
}).transform((v) => {
|
|
31
32
|
return remap$(v, {
|
|
32
33
|
topN: "top_n",
|
|
@@ -50,6 +50,10 @@ export type SpeechRequest = {
|
|
|
50
50
|
* Playback speed multiplier. Only used by models that support it (e.g. OpenAI TTS). Ignored by other providers.
|
|
51
51
|
*/
|
|
52
52
|
speed?: number | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider.
|
|
55
|
+
*/
|
|
56
|
+
user?: string | undefined;
|
|
53
57
|
/**
|
|
54
58
|
* Voice identifier (provider-specific).
|
|
55
59
|
*/
|
|
@@ -72,6 +76,7 @@ export type SpeechRequest$Outbound = {
|
|
|
72
76
|
provider?: SpeechRequestProvider$Outbound | undefined;
|
|
73
77
|
response_format: string;
|
|
74
78
|
speed?: number | undefined;
|
|
79
|
+
user?: string | undefined;
|
|
75
80
|
voice?: string | undefined;
|
|
76
81
|
};
|
|
77
82
|
/** @internal */
|
|
@@ -31,6 +31,7 @@ export const SpeechRequest$outboundSchema = z.object({
|
|
|
31
31
|
provider: z.lazy(() => SpeechRequestProvider$outboundSchema).optional(),
|
|
32
32
|
responseFormat: SpeechRequestResponseFormat$outboundSchema.default("pcm"),
|
|
33
33
|
speed: z.number().optional(),
|
|
34
|
+
user: z.string().optional(),
|
|
34
35
|
voice: z.string().optional(),
|
|
35
36
|
}).transform((v) => {
|
|
36
37
|
return remap$(v, {
|
|
@@ -55,6 +55,10 @@ export type STTRequest = {
|
|
|
55
55
|
* Timestamp detail levels to include when response_format is "verbose_json". "segment" returns segment-level timestamps; "word" additionally returns word-level timestamps in the words array. Ignored unless response_format is "verbose_json".
|
|
56
56
|
*/
|
|
57
57
|
timestampGranularities?: Array<STTTimestampGranularity> | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider.
|
|
60
|
+
*/
|
|
61
|
+
user?: string | undefined;
|
|
58
62
|
};
|
|
59
63
|
/** @internal */
|
|
60
64
|
export type STTRequestProvider$Outbound = {
|
|
@@ -74,6 +78,7 @@ export type STTRequest$Outbound = {
|
|
|
74
78
|
response_format?: string | undefined;
|
|
75
79
|
temperature?: number | undefined;
|
|
76
80
|
timestamp_granularities?: Array<string> | undefined;
|
|
81
|
+
user?: string | undefined;
|
|
77
82
|
};
|
|
78
83
|
/** @internal */
|
|
79
84
|
export declare const STTRequest$outboundSchema: z.ZodType<STTRequest$Outbound, STTRequest>;
|
package/esm/models/sttrequest.js
CHANGED
|
@@ -34,6 +34,7 @@ export const STTRequest$outboundSchema = z.object({
|
|
|
34
34
|
temperature: z.number().optional(),
|
|
35
35
|
timestampGranularities: z.array(STTTimestampGranularity$outboundSchema)
|
|
36
36
|
.optional(),
|
|
37
|
+
user: z.string().optional(),
|
|
37
38
|
}).transform((v) => {
|
|
38
39
|
return remap$(v, {
|
|
39
40
|
inputAudio: "input_audio",
|
|
@@ -524,6 +524,10 @@ export type VideoGenerationRequest = {
|
|
|
524
524
|
* Upscale factor for video upscaling models only. This parameter is not supported by video generation models.
|
|
525
525
|
*/
|
|
526
526
|
upscaleFactor?: number | undefined;
|
|
527
|
+
/**
|
|
528
|
+
* A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider.
|
|
529
|
+
*/
|
|
530
|
+
user?: string | undefined;
|
|
527
531
|
};
|
|
528
532
|
/** @internal */
|
|
529
533
|
export declare const VideoGenerationRequestAspectRatio$outboundSchema: z.ZodType<string, VideoGenerationRequestAspectRatio>;
|
|
@@ -981,6 +985,7 @@ export type VideoGenerationRequest$Outbound = {
|
|
|
981
985
|
seed?: number | undefined;
|
|
982
986
|
size?: string | undefined;
|
|
983
987
|
upscale_factor?: number | undefined;
|
|
988
|
+
user?: string | undefined;
|
|
984
989
|
};
|
|
985
990
|
/** @internal */
|
|
986
991
|
export declare const VideoGenerationRequest$outboundSchema: z.ZodType<VideoGenerationRequest$Outbound, VideoGenerationRequest>;
|
|
@@ -242,6 +242,7 @@ export const VideoGenerationRequest$outboundSchema = z.object({
|
|
|
242
242
|
seed: z.int().optional(),
|
|
243
243
|
size: z.string().optional(),
|
|
244
244
|
upscaleFactor: z.number().optional(),
|
|
245
|
+
user: z.string().optional(),
|
|
245
246
|
}).transform((v) => {
|
|
246
247
|
return remap$(v, {
|
|
247
248
|
aspectRatio: "aspect_ratio",
|
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.125",
|
|
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
|
-
"
|
|
76
|
+
"compile": "tsc",
|
|
77
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
77
78
|
"prepare": "npm run build",
|
|
78
79
|
"test:e2e": "vitest --run --project e2e",
|
|
80
|
+
"test:transit": "exit 0",
|
|
79
81
|
"typecheck": "tsc --noEmit",
|
|
80
|
-
"compile": "tsc",
|
|
81
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
82
82
|
"test": "vitest --run --project unit",
|
|
83
|
-
"test:
|
|
84
|
-
"
|
|
83
|
+
"test:watch": "vitest --watch --project unit",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|