@openrouter/sdk 1.1.25 → 1.2.0
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/generationresponse.d.ts +2 -2
- package/esm/models/generationresponse.js +2 -2
- package/esm/sdk/byok.d.ts +1 -1
- package/esm/sdk/byok.js +1 -1
- package/esm/sdk/sdk.d.ts +6 -6
- package/esm/sdk/sdk.js +6 -6
- package/esm/sdk/stt.d.ts +1 -1
- package/esm/sdk/stt.js +1 -1
- package/esm/sdk/tts.d.ts +1 -1
- package/esm/sdk/tts.js +1 -1
- package/jsr.json +1 -1
- package/package.json +6 -6
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: "1.
|
|
52
|
+
readonly sdkVersion: "1.2.0";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.0 2.914.0 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: "1.
|
|
29
|
+
sdkVersion: "1.2.0",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.2.0 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -10,8 +10,8 @@ export declare const ApiType: {
|
|
|
10
10
|
readonly Completions: "completions";
|
|
11
11
|
readonly Embeddings: "embeddings";
|
|
12
12
|
readonly Rerank: "rerank";
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
13
|
+
readonly TTS: "tts";
|
|
14
|
+
readonly STT: "stt";
|
|
15
15
|
readonly Video: "video";
|
|
16
16
|
readonly Image: "image";
|
|
17
17
|
};
|
package/esm/sdk/byok.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as models from "../models/index.js";
|
|
3
3
|
import * as operations from "../models/operations/index.js";
|
|
4
4
|
import { PageIterator } from "../types/operations.js";
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class BYOK extends ClientSDK {
|
|
6
6
|
/**
|
|
7
7
|
* List BYOK provider credentials
|
|
8
8
|
*
|
package/esm/sdk/byok.js
CHANGED
|
@@ -10,7 +10,7 @@ import { byokUpdate } from "../funcs/byokUpdate.js";
|
|
|
10
10
|
import { ClientSDK } from "../lib/sdks.js";
|
|
11
11
|
import { unwrapAsync } from "../types/fp.js";
|
|
12
12
|
import { unwrapResultIterator } from "../types/operations.js";
|
|
13
|
-
export class
|
|
13
|
+
export class BYOK extends ClientSDK {
|
|
14
14
|
/**
|
|
15
15
|
* List BYOK provider credentials
|
|
16
16
|
*
|
package/esm/sdk/sdk.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Analytics } from "./analytics.js";
|
|
|
3
3
|
import { APIKeys } from "./apikeys.js";
|
|
4
4
|
import { Benchmarks } from "./benchmarks.js";
|
|
5
5
|
import { Beta } from "./beta.js";
|
|
6
|
-
import {
|
|
6
|
+
import { BYOK } from "./byok.js";
|
|
7
7
|
import { Chat } from "./chat.js";
|
|
8
8
|
import { Classifications } from "./classifications.js";
|
|
9
9
|
import { Credits } from "./credits.js";
|
|
@@ -23,8 +23,8 @@ import { Providers } from "./providers.js";
|
|
|
23
23
|
import { Rerank } from "./rerank.js";
|
|
24
24
|
import { Responses } from "./responses.js";
|
|
25
25
|
import { Scim } from "./scim.js";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
26
|
+
import { STT } from "./stt.js";
|
|
27
|
+
import { TTS } from "./tts.js";
|
|
28
28
|
import { VideoGeneration } from "./videogeneration.js";
|
|
29
29
|
import { Workspaces } from "./workspaces.js";
|
|
30
30
|
import type { $ZodObject, $ZodShape, infer as zodInfer } from "zod/v4/core";
|
|
@@ -39,15 +39,15 @@ export declare class OpenRouter extends ClientSDK {
|
|
|
39
39
|
private _beta?;
|
|
40
40
|
get beta(): Beta;
|
|
41
41
|
private _tts?;
|
|
42
|
-
get tts():
|
|
42
|
+
get tts(): TTS;
|
|
43
43
|
private _stt?;
|
|
44
|
-
get stt():
|
|
44
|
+
get stt(): STT;
|
|
45
45
|
private _oAuth?;
|
|
46
46
|
get oAuth(): OAuth;
|
|
47
47
|
private _benchmarks?;
|
|
48
48
|
get benchmarks(): Benchmarks;
|
|
49
49
|
private _byok?;
|
|
50
|
-
get byok():
|
|
50
|
+
get byok(): BYOK;
|
|
51
51
|
private _chat?;
|
|
52
52
|
get chat(): Chat;
|
|
53
53
|
private _classifications?;
|
package/esm/sdk/sdk.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Analytics } from "./analytics.js";
|
|
|
7
7
|
import { APIKeys } from "./apikeys.js";
|
|
8
8
|
import { Benchmarks } from "./benchmarks.js";
|
|
9
9
|
import { Beta } from "./beta.js";
|
|
10
|
-
import {
|
|
10
|
+
import { BYOK } from "./byok.js";
|
|
11
11
|
import { Chat } from "./chat.js";
|
|
12
12
|
import { Classifications } from "./classifications.js";
|
|
13
13
|
import { Credits } from "./credits.js";
|
|
@@ -27,8 +27,8 @@ import { Providers } from "./providers.js";
|
|
|
27
27
|
import { Rerank } from "./rerank.js";
|
|
28
28
|
import { Responses } from "./responses.js";
|
|
29
29
|
import { Scim } from "./scim.js";
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
30
|
+
import { STT } from "./stt.js";
|
|
31
|
+
import { TTS } from "./tts.js";
|
|
32
32
|
import { VideoGeneration } from "./videogeneration.js";
|
|
33
33
|
import { Workspaces } from "./workspaces.js";
|
|
34
34
|
import { callModel as callModelFunc, } from "../funcs/call-model.js";
|
|
@@ -43,10 +43,10 @@ export class OpenRouter extends ClientSDK {
|
|
|
43
43
|
return (this._beta ?? (this._beta = new Beta(this._options)));
|
|
44
44
|
}
|
|
45
45
|
get tts() {
|
|
46
|
-
return (this._tts ?? (this._tts = new
|
|
46
|
+
return (this._tts ?? (this._tts = new TTS(this._options)));
|
|
47
47
|
}
|
|
48
48
|
get stt() {
|
|
49
|
-
return (this._stt ?? (this._stt = new
|
|
49
|
+
return (this._stt ?? (this._stt = new STT(this._options)));
|
|
50
50
|
}
|
|
51
51
|
get oAuth() {
|
|
52
52
|
return (this._oAuth ?? (this._oAuth = new OAuth(this._options)));
|
|
@@ -55,7 +55,7 @@ export class OpenRouter extends ClientSDK {
|
|
|
55
55
|
return (this._benchmarks ?? (this._benchmarks = new Benchmarks(this._options)));
|
|
56
56
|
}
|
|
57
57
|
get byok() {
|
|
58
|
-
return (this._byok ?? (this._byok = new
|
|
58
|
+
return (this._byok ?? (this._byok = new BYOK(this._options)));
|
|
59
59
|
}
|
|
60
60
|
get chat() {
|
|
61
61
|
return (this._chat ?? (this._chat = new Chat(this._options)));
|
package/esm/sdk/stt.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
2
|
import * as models from "../models/index.js";
|
|
3
3
|
import * as operations from "../models/operations/index.js";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class STT extends ClientSDK {
|
|
5
5
|
/**
|
|
6
6
|
* Create transcription
|
|
7
7
|
*
|
package/esm/sdk/stt.js
CHANGED
|
@@ -6,7 +6,7 @@ import { sttCreateTranscription } from "../funcs/sttCreateTranscription.js";
|
|
|
6
6
|
import { sttCreateTranscriptionMultipart } from "../funcs/sttCreateTranscriptionMultipart.js";
|
|
7
7
|
import { ClientSDK } from "../lib/sdks.js";
|
|
8
8
|
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
-
export class
|
|
9
|
+
export class STT extends ClientSDK {
|
|
10
10
|
/**
|
|
11
11
|
* Create transcription
|
|
12
12
|
*
|
package/esm/sdk/tts.d.ts
CHANGED
package/esm/sdk/tts.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { ttsCreateSpeech } from "../funcs/ttsCreateSpeech.js";
|
|
6
6
|
import { ClientSDK } from "../lib/sdks.js";
|
|
7
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
|
-
export class
|
|
8
|
+
export class TTS extends ClientSDK {
|
|
9
9
|
/**
|
|
10
10
|
* Create speech
|
|
11
11
|
*
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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
|
+
"provenance": true,
|
|
25
|
+
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./esm/index.js",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
76
|
+
"prepare": "npm run build",
|
|
77
|
+
"test": "vitest --run --project unit",
|
|
77
78
|
"test:transit": "exit 0",
|
|
78
79
|
"typecheck": "tsc --noEmit",
|
|
79
80
|
"typecheck:transit": "exit 0",
|
|
81
|
+
"compile": "tsc",
|
|
80
82
|
"postinstall": "node scripts/check-types.js || true",
|
|
81
|
-
"prepare": "npm run build",
|
|
82
|
-
"test": "vitest --run --project unit",
|
|
83
83
|
"test:e2e": "vitest --run --project e2e",
|
|
84
84
|
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|