@openrouter/sdk 1.1.25 → 1.2.1
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/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/generationresponse.d.ts +2 -2
- package/esm/models/generationresponse.js +2 -2
- package/esm/models/imagegenerationproviderpreferences.d.ts +6 -0
- package/esm/models/imagegenerationproviderpreferences.js +1 -0
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/providername.d.ts +1 -0
- package/esm/models/providername.js +1 -0
- package/esm/models/provideroptions.d.ts +6 -0
- package/esm/models/provideroptions.js +1 -0
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/videogenerationrequest.d.ts +6 -0
- package/esm/models/videogenerationrequest.js +1 -0
- 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 +5 -5
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.1
|
|
52
|
+
readonly sdkVersion: "1.2.1";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.1
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.1 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.1
|
|
29
|
+
sdkVersion: "1.2.1",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.1
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.2.1 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -94,6 +94,7 @@ export declare const BYOKProviderSlug: {
|
|
|
94
94
|
readonly Switchpoint: "switchpoint";
|
|
95
95
|
readonly Tencent: "tencent";
|
|
96
96
|
readonly Tenstorrent: "tenstorrent";
|
|
97
|
+
readonly Thinkingmachines: "thinkingmachines";
|
|
97
98
|
readonly Together: "together";
|
|
98
99
|
readonly Upstage: "upstage";
|
|
99
100
|
readonly Venice: "venice";
|
|
@@ -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
|
};
|
|
@@ -365,6 +365,9 @@ export type ImageGenerationProviderPreferencesOptions = {
|
|
|
365
365
|
tenstorrent?: {
|
|
366
366
|
[k: string]: any;
|
|
367
367
|
} | undefined;
|
|
368
|
+
thinkingmachines?: {
|
|
369
|
+
[k: string]: any;
|
|
370
|
+
} | undefined;
|
|
368
371
|
together?: {
|
|
369
372
|
[k: string]: any;
|
|
370
373
|
} | undefined;
|
|
@@ -806,6 +809,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
|
|
|
806
809
|
tenstorrent?: {
|
|
807
810
|
[k: string]: any;
|
|
808
811
|
} | undefined;
|
|
812
|
+
thinkingmachines?: {
|
|
813
|
+
[k: string]: any;
|
|
814
|
+
} | undefined;
|
|
809
815
|
together?: {
|
|
810
816
|
[k: string]: any;
|
|
811
817
|
} | undefined;
|
|
@@ -138,6 +138,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
|
|
|
138
138
|
targon: z.record(z.string(), z.any()).optional(),
|
|
139
139
|
tencent: z.record(z.string(), z.any()).optional(),
|
|
140
140
|
tenstorrent: z.record(z.string(), z.any()).optional(),
|
|
141
|
+
thinkingmachines: z.record(z.string(), z.any()).optional(),
|
|
141
142
|
together: z.record(z.string(), z.any()).optional(),
|
|
142
143
|
togetherLite: z.record(z.string(), z.any()).optional(),
|
|
143
144
|
ubicloud: z.record(z.string(), z.any()).optional(),
|
|
@@ -118,6 +118,7 @@ export declare const Provider: {
|
|
|
118
118
|
readonly Switchpoint: "switchpoint";
|
|
119
119
|
readonly Tencent: "tencent";
|
|
120
120
|
readonly Tenstorrent: "tenstorrent";
|
|
121
|
+
readonly Thinkingmachines: "thinkingmachines";
|
|
121
122
|
readonly Together: "together";
|
|
122
123
|
readonly Upstage: "upstage";
|
|
123
124
|
readonly Venice: "venice";
|
|
@@ -91,6 +91,7 @@ export declare const ProviderName: {
|
|
|
91
91
|
readonly Switchpoint: "Switchpoint";
|
|
92
92
|
readonly Tencent: "Tencent";
|
|
93
93
|
readonly Tenstorrent: "Tenstorrent";
|
|
94
|
+
readonly ThinkingMachines: "Thinking Machines";
|
|
94
95
|
readonly Together: "Together";
|
|
95
96
|
readonly Upstage: "Upstage";
|
|
96
97
|
readonly Venice: "Venice";
|
|
@@ -360,6 +360,9 @@ export type ProviderOptions = {
|
|
|
360
360
|
tenstorrent?: {
|
|
361
361
|
[k: string]: any;
|
|
362
362
|
} | undefined;
|
|
363
|
+
thinkingmachines?: {
|
|
364
|
+
[k: string]: any;
|
|
365
|
+
} | undefined;
|
|
363
366
|
together?: {
|
|
364
367
|
[k: string]: any;
|
|
365
368
|
} | undefined;
|
|
@@ -756,6 +759,9 @@ export type ProviderOptions$Outbound = {
|
|
|
756
759
|
tenstorrent?: {
|
|
757
760
|
[k: string]: any;
|
|
758
761
|
} | undefined;
|
|
762
|
+
thinkingmachines?: {
|
|
763
|
+
[k: string]: any;
|
|
764
|
+
} | undefined;
|
|
759
765
|
together?: {
|
|
760
766
|
[k: string]: any;
|
|
761
767
|
} | undefined;
|
|
@@ -125,6 +125,7 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
125
125
|
targon: z.record(z.string(), z.any()).optional(),
|
|
126
126
|
tencent: z.record(z.string(), z.any()).optional(),
|
|
127
127
|
tenstorrent: z.record(z.string(), z.any()).optional(),
|
|
128
|
+
thinkingmachines: z.record(z.string(), z.any()).optional(),
|
|
128
129
|
together: z.record(z.string(), z.any()).optional(),
|
|
129
130
|
togetherLite: z.record(z.string(), z.any()).optional(),
|
|
130
131
|
ubicloud: z.record(z.string(), z.any()).optional(),
|
|
@@ -123,6 +123,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
123
123
|
readonly Switchpoint: "Switchpoint";
|
|
124
124
|
readonly Tencent: "Tencent";
|
|
125
125
|
readonly Tenstorrent: "Tenstorrent";
|
|
126
|
+
readonly ThinkingMachines: "Thinking Machines";
|
|
126
127
|
readonly Together: "Together";
|
|
127
128
|
readonly Upstage: "Upstage";
|
|
128
129
|
readonly Venice: "Venice";
|
|
@@ -381,6 +381,9 @@ export type VideoGenerationRequestOptions = {
|
|
|
381
381
|
tenstorrent?: {
|
|
382
382
|
[k: string]: any;
|
|
383
383
|
} | undefined;
|
|
384
|
+
thinkingmachines?: {
|
|
385
|
+
[k: string]: any;
|
|
386
|
+
} | undefined;
|
|
384
387
|
together?: {
|
|
385
388
|
[k: string]: any;
|
|
386
389
|
} | undefined;
|
|
@@ -848,6 +851,9 @@ export type VideoGenerationRequestOptions$Outbound = {
|
|
|
848
851
|
tenstorrent?: {
|
|
849
852
|
[k: string]: any;
|
|
850
853
|
} | undefined;
|
|
854
|
+
thinkingmachines?: {
|
|
855
|
+
[k: string]: any;
|
|
856
|
+
} | undefined;
|
|
851
857
|
together?: {
|
|
852
858
|
[k: string]: any;
|
|
853
859
|
} | undefined;
|
|
@@ -156,6 +156,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
156
156
|
targon: z.record(z.string(), z.any()).optional(),
|
|
157
157
|
tencent: z.record(z.string(), z.any()).optional(),
|
|
158
158
|
tenstorrent: z.record(z.string(), z.any()).optional(),
|
|
159
|
+
thinkingmachines: z.record(z.string(), z.any()).optional(),
|
|
159
160
|
together: z.record(z.string(), z.any()).optional(),
|
|
160
161
|
togetherLite: z.record(z.string(), z.any()).optional(),
|
|
161
162
|
ubicloud: z.record(z.string(), z.any()).optional(),
|
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.1
|
|
3
|
+
"version": "1.2.1",
|
|
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": [
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
76
|
"compile": "tsc",
|
|
77
|
-
"test:transit": "exit 0",
|
|
78
|
-
"typecheck": "tsc --noEmit",
|
|
79
|
-
"typecheck:transit": "exit 0",
|
|
80
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
81
78
|
"prepare": "npm run build",
|
|
82
79
|
"test": "vitest --run --project unit",
|
|
80
|
+
"test:transit": "exit 0",
|
|
81
|
+
"test:watch": "vitest --watch --project unit",
|
|
82
|
+
"typecheck:transit": "exit 0",
|
|
83
83
|
"test:e2e": "vitest --run --project e2e",
|
|
84
|
-
"
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|