@openrouter/sdk 1.0.5 → 1.0.7
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/autobetarouterplugin.d.ts +1 -1
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- 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/models/workspace.d.ts +4 -0
- package/esm/models/workspace.js +2 -0
- package/jsr.json +1 -1
- package/package.json +7 -7
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.0.
|
|
52
|
+
readonly sdkVersion: "1.0.7";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.0.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.0.7 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.0.
|
|
29
|
+
sdkVersion: "1.0.7",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.0.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.0.7 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -5,7 +5,7 @@ export type AutoBetaRouterPlugin = {
|
|
|
5
5
|
*/
|
|
6
6
|
allowedModels?: Array<string> | undefined;
|
|
7
7
|
/**
|
|
8
|
-
* Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to
|
|
8
|
+
* Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9.
|
|
9
9
|
*/
|
|
10
10
|
costQualityTradeoff?: number | undefined;
|
|
11
11
|
/**
|
|
@@ -26,6 +26,7 @@ export declare const BYOKProviderSlug: {
|
|
|
26
26
|
readonly Clarifai: "clarifai";
|
|
27
27
|
readonly Cloudflare: "cloudflare";
|
|
28
28
|
readonly Cohere: "cohere";
|
|
29
|
+
readonly Coreweave: "coreweave";
|
|
29
30
|
readonly Crusoe: "crusoe";
|
|
30
31
|
readonly Darkbloom: "darkbloom";
|
|
31
32
|
readonly Decart: "decart";
|
|
@@ -86,6 +86,9 @@ export type ImageGenerationProviderPreferencesOptions = {
|
|
|
86
86
|
cohere?: {
|
|
87
87
|
[k: string]: any;
|
|
88
88
|
} | undefined;
|
|
89
|
+
coreweave?: {
|
|
90
|
+
[k: string]: any;
|
|
91
|
+
} | undefined;
|
|
89
92
|
crofai?: {
|
|
90
93
|
[k: string]: any;
|
|
91
94
|
} | undefined;
|
|
@@ -512,6 +515,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
|
|
|
512
515
|
cohere?: {
|
|
513
516
|
[k: string]: any;
|
|
514
517
|
} | undefined;
|
|
518
|
+
coreweave?: {
|
|
519
|
+
[k: string]: any;
|
|
520
|
+
} | undefined;
|
|
515
521
|
crofai?: {
|
|
516
522
|
[k: string]: any;
|
|
517
523
|
} | undefined;
|
|
@@ -45,6 +45,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
|
|
|
45
45
|
clarifai: z.record(z.string(), z.any()).optional(),
|
|
46
46
|
cloudflare: z.record(z.string(), z.any()).optional(),
|
|
47
47
|
cohere: z.record(z.string(), z.any()).optional(),
|
|
48
|
+
coreweave: z.record(z.string(), z.any()).optional(),
|
|
48
49
|
crofai: z.record(z.string(), z.any()).optional(),
|
|
49
50
|
crucible: z.record(z.string(), z.any()).optional(),
|
|
50
51
|
crusoe: z.record(z.string(), z.any()).optional(),
|
|
@@ -50,6 +50,7 @@ export declare const Provider: {
|
|
|
50
50
|
readonly Clarifai: "clarifai";
|
|
51
51
|
readonly Cloudflare: "cloudflare";
|
|
52
52
|
readonly Cohere: "cohere";
|
|
53
|
+
readonly Coreweave: "coreweave";
|
|
53
54
|
readonly Crusoe: "crusoe";
|
|
54
55
|
readonly Darkbloom: "darkbloom";
|
|
55
56
|
readonly Decart: "decart";
|
|
@@ -23,6 +23,7 @@ export declare const ProviderName: {
|
|
|
23
23
|
readonly Clarifai: "Clarifai";
|
|
24
24
|
readonly Cloudflare: "Cloudflare";
|
|
25
25
|
readonly Cohere: "Cohere";
|
|
26
|
+
readonly CoreWeave: "CoreWeave";
|
|
26
27
|
readonly Crucible: "Crucible";
|
|
27
28
|
readonly Crusoe: "Crusoe";
|
|
28
29
|
readonly Darkbloom: "Darkbloom";
|
|
@@ -81,6 +81,9 @@ export type ProviderOptions = {
|
|
|
81
81
|
cohere?: {
|
|
82
82
|
[k: string]: any;
|
|
83
83
|
} | undefined;
|
|
84
|
+
coreweave?: {
|
|
85
|
+
[k: string]: any;
|
|
86
|
+
} | undefined;
|
|
84
87
|
crofai?: {
|
|
85
88
|
[k: string]: any;
|
|
86
89
|
} | undefined;
|
|
@@ -462,6 +465,9 @@ export type ProviderOptions$Outbound = {
|
|
|
462
465
|
cohere?: {
|
|
463
466
|
[k: string]: any;
|
|
464
467
|
} | undefined;
|
|
468
|
+
coreweave?: {
|
|
469
|
+
[k: string]: any;
|
|
470
|
+
} | undefined;
|
|
465
471
|
crofai?: {
|
|
466
472
|
[k: string]: any;
|
|
467
473
|
} | undefined;
|
|
@@ -32,6 +32,7 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
32
32
|
clarifai: z.record(z.string(), z.any()).optional(),
|
|
33
33
|
cloudflare: z.record(z.string(), z.any()).optional(),
|
|
34
34
|
cohere: z.record(z.string(), z.any()).optional(),
|
|
35
|
+
coreweave: z.record(z.string(), z.any()).optional(),
|
|
35
36
|
crofai: z.record(z.string(), z.any()).optional(),
|
|
36
37
|
crucible: z.record(z.string(), z.any()).optional(),
|
|
37
38
|
crusoe: z.record(z.string(), z.any()).optional(),
|
|
@@ -56,6 +56,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
56
56
|
readonly Clarifai: "Clarifai";
|
|
57
57
|
readonly Cloudflare: "Cloudflare";
|
|
58
58
|
readonly Cohere: "Cohere";
|
|
59
|
+
readonly CoreWeave: "CoreWeave";
|
|
59
60
|
readonly Crucible: "Crucible";
|
|
60
61
|
readonly Crusoe: "Crusoe";
|
|
61
62
|
readonly Darkbloom: "Darkbloom";
|
|
@@ -102,6 +102,9 @@ export type VideoGenerationRequestOptions = {
|
|
|
102
102
|
cohere?: {
|
|
103
103
|
[k: string]: any;
|
|
104
104
|
} | undefined;
|
|
105
|
+
coreweave?: {
|
|
106
|
+
[k: string]: any;
|
|
107
|
+
} | undefined;
|
|
105
108
|
crofai?: {
|
|
106
109
|
[k: string]: any;
|
|
107
110
|
} | undefined;
|
|
@@ -553,6 +556,9 @@ export type VideoGenerationRequestOptions$Outbound = {
|
|
|
553
556
|
cohere?: {
|
|
554
557
|
[k: string]: any;
|
|
555
558
|
} | undefined;
|
|
559
|
+
coreweave?: {
|
|
560
|
+
[k: string]: any;
|
|
561
|
+
} | undefined;
|
|
556
562
|
crofai?: {
|
|
557
563
|
[k: string]: any;
|
|
558
564
|
} | undefined;
|
|
@@ -62,6 +62,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
62
62
|
clarifai: z.record(z.string(), z.any()).optional(),
|
|
63
63
|
cloudflare: z.record(z.string(), z.any()).optional(),
|
|
64
64
|
cohere: z.record(z.string(), z.any()).optional(),
|
|
65
|
+
coreweave: z.record(z.string(), z.any()).optional(),
|
|
65
66
|
crofai: z.record(z.string(), z.any()).optional(),
|
|
66
67
|
crucible: z.record(z.string(), z.any()).optional(),
|
|
67
68
|
crusoe: z.record(z.string(), z.any()).optional(),
|
|
@@ -10,6 +10,10 @@ export type Workspace = {
|
|
|
10
10
|
* User ID of the workspace creator
|
|
11
11
|
*/
|
|
12
12
|
createdBy: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Deterministic ID of the workspace's implicitly-created default guardrail
|
|
15
|
+
*/
|
|
16
|
+
defaultGuardrailId: string;
|
|
13
17
|
/**
|
|
14
18
|
* Default image model for this workspace
|
|
15
19
|
*/
|
package/esm/models/workspace.js
CHANGED
|
@@ -9,6 +9,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
9
9
|
export const Workspace$inboundSchema = z.object({
|
|
10
10
|
created_at: z.string(),
|
|
11
11
|
created_by: z.nullable(z.string()),
|
|
12
|
+
default_guardrail_id: z.string(),
|
|
12
13
|
default_image_model: z.nullable(z.string()),
|
|
13
14
|
default_provider_sort: z.nullable(z.string()),
|
|
14
15
|
default_text_model: z.nullable(z.string()),
|
|
@@ -26,6 +27,7 @@ export const Workspace$inboundSchema = z.object({
|
|
|
26
27
|
return remap$(v, {
|
|
27
28
|
"created_at": "createdAt",
|
|
28
29
|
"created_by": "createdBy",
|
|
30
|
+
"default_guardrail_id": "defaultGuardrailId",
|
|
29
31
|
"default_image_model": "defaultImageModel",
|
|
30
32
|
"default_provider_sort": "defaultProviderSort",
|
|
31
33
|
"default_text_model": "defaultTextModel",
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
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
|
-
"test:watch": "vitest --watch --project unit",
|
|
78
|
-
"typecheck": "tsc --noEmit",
|
|
79
|
-
"test": "vitest --run --project unit",
|
|
76
|
+
"prepare": "npm run build",
|
|
80
77
|
"test:transit": "exit 0",
|
|
78
|
+
"test:watch": "vitest --watch --project unit",
|
|
81
79
|
"typecheck:transit": "exit 0",
|
|
80
|
+
"test": "vitest --run --project unit",
|
|
81
|
+
"test:e2e": "vitest --run --project e2e",
|
|
82
|
+
"typecheck": "tsc --noEmit",
|
|
82
83
|
"compile": "tsc",
|
|
83
|
-
"postinstall": "node scripts/check-types.js || true"
|
|
84
|
-
"prepare": "npm run build"
|
|
84
|
+
"postinstall": "node scripts/check-types.js || true"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|