@openrouter/sdk 0.3.14 → 0.3.15
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/funcs/analyticsGetUserActivity.d.ts +1 -1
- package/esm/funcs/analyticsGetUserActivity.js +1 -1
- package/esm/funcs/apiKeysCreate.d.ts +3 -0
- package/esm/funcs/apiKeysCreate.js +3 -0
- package/esm/funcs/apiKeysDelete.d.ts +3 -0
- package/esm/funcs/apiKeysDelete.js +3 -0
- package/esm/funcs/apiKeysGet.d.ts +3 -0
- package/esm/funcs/apiKeysGet.js +3 -0
- package/esm/funcs/apiKeysList.d.ts +3 -0
- package/esm/funcs/apiKeysList.js +3 -0
- package/esm/funcs/apiKeysUpdate.d.ts +3 -0
- package/esm/funcs/apiKeysUpdate.js +3 -0
- package/esm/funcs/call-model.js +9 -6
- package/esm/funcs/creditsGetCredits.d.ts +1 -1
- package/esm/funcs/creditsGetCredits.js +1 -1
- package/esm/funcs/guardrailsBulkAssignKeys.d.ts +18 -0
- package/esm/funcs/guardrailsBulkAssignKeys.js +89 -0
- package/esm/funcs/guardrailsBulkAssignMembers.d.ts +18 -0
- package/esm/funcs/guardrailsBulkAssignMembers.js +89 -0
- package/esm/funcs/guardrailsBulkUnassignKeys.d.ts +18 -0
- package/esm/funcs/guardrailsBulkUnassignKeys.js +89 -0
- package/esm/funcs/guardrailsBulkUnassignMembers.d.ts +18 -0
- package/esm/funcs/guardrailsBulkUnassignMembers.js +89 -0
- package/esm/funcs/guardrailsCreate.d.ts +18 -0
- package/esm/funcs/guardrailsCreate.js +83 -0
- package/esm/funcs/guardrailsDelete.d.ts +18 -0
- package/esm/funcs/guardrailsDelete.js +88 -0
- package/esm/funcs/{parametersGetParameters.d.ts → guardrailsGet.d.ts} +6 -3
- package/esm/funcs/guardrailsGet.js +88 -0
- package/esm/funcs/guardrailsList.d.ts +18 -0
- package/esm/funcs/guardrailsList.js +87 -0
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.d.ts +18 -0
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +93 -0
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.d.ts +18 -0
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +93 -0
- package/esm/funcs/guardrailsListKeyAssignments.d.ts +18 -0
- package/esm/funcs/guardrailsListKeyAssignments.js +87 -0
- package/esm/funcs/guardrailsListMemberAssignments.d.ts +18 -0
- package/esm/funcs/guardrailsListMemberAssignments.js +87 -0
- package/esm/funcs/guardrailsUpdate.d.ts +18 -0
- package/esm/funcs/{parametersGetParameters.js → guardrailsUpdate.js} +24 -32
- package/esm/index.d.ts +4 -3
- package/esm/index.js +3 -1
- package/esm/lib/async-params.d.ts +46 -6
- package/esm/lib/async-params.js +10 -2
- package/esm/lib/config.d.ts +2 -4
- package/esm/lib/config.js +2 -2
- package/esm/lib/conversation-state.d.ts +61 -0
- package/esm/lib/conversation-state.js +207 -0
- package/esm/lib/model-result.d.ts +175 -2
- package/esm/lib/model-result.js +678 -181
- package/esm/lib/tool-types.d.ts +108 -0
- package/esm/lib/tool-types.js +13 -0
- package/esm/lib/tool.d.ts +21 -1
- package/esm/lib/tool.js +7 -0
- package/esm/models/assistantmessage.d.ts +31 -0
- package/esm/models/assistantmessage.js +43 -0
- package/esm/models/chatmessagecontentitemimage.d.ts +8 -8
- package/esm/models/chatmessagecontentitemimage.js +8 -9
- package/esm/models/chatresponsechoice.d.ts +0 -2
- package/esm/models/chatresponsechoice.js +0 -3
- package/esm/models/chatstreamingmessagechunk.d.ts +2 -2
- package/esm/models/chatstreamingmessagechunk.js +2 -2
- package/esm/models/index.d.ts +1 -1
- package/esm/models/index.js +1 -1
- package/esm/models/model.d.ts +4 -0
- package/esm/models/model.js +2 -0
- package/esm/models/operations/bulkassignkeystoguardrail.d.ts +44 -0
- package/esm/models/operations/bulkassignkeystoguardrail.js +42 -0
- package/esm/models/operations/bulkassignmemberstoguardrail.d.ts +44 -0
- package/esm/models/operations/bulkassignmemberstoguardrail.js +42 -0
- package/esm/models/operations/bulkunassignkeysfromguardrail.d.ts +44 -0
- package/esm/models/operations/bulkunassignkeysfromguardrail.js +42 -0
- package/esm/models/operations/bulkunassignmembersfromguardrail.d.ts +44 -0
- package/esm/models/operations/bulkunassignmembersfromguardrail.js +42 -0
- package/esm/models/operations/createguardrail.d.ts +136 -0
- package/esm/models/operations/createguardrail.js +85 -0
- package/esm/models/operations/deleteguardrail.d.ts +29 -0
- package/esm/models/operations/deleteguardrail.js +21 -0
- package/esm/models/operations/getguardrail.d.ts +92 -0
- package/esm/models/operations/getguardrail.js +60 -0
- package/esm/models/operations/getmodels.d.ts +28 -1
- package/esm/models/operations/getmodels.js +22 -1
- package/esm/models/operations/index.d.ts +13 -1
- package/esm/models/operations/index.js +13 -1
- package/esm/models/operations/listguardrailkeyassignments.d.ts +76 -0
- package/esm/models/operations/listguardrailkeyassignments.js +51 -0
- package/esm/models/operations/listguardrailmemberassignments.d.ts +72 -0
- package/esm/models/operations/listguardrailmemberassignments.js +49 -0
- package/esm/models/operations/listguardrails.d.ts +98 -0
- package/esm/models/operations/listguardrails.js +66 -0
- package/esm/models/operations/listkeyassignments.d.ts +71 -0
- package/esm/models/operations/listkeyassignments.js +50 -0
- package/esm/models/operations/listmemberassignments.d.ts +67 -0
- package/esm/models/operations/listmemberassignments.js +48 -0
- package/esm/models/operations/updateguardrail.d.ts +151 -0
- package/esm/models/operations/updateguardrail.js +97 -0
- package/esm/models/percentilelatencycutoffs.js +1 -1
- package/esm/models/percentilestats.js +1 -1
- package/esm/models/percentilethroughputcutoffs.js +1 -1
- package/esm/models/preferredmaxlatency.js +1 -1
- package/esm/models/preferredminthroughput.js +1 -1
- package/esm/models/responseinputvideo.js +1 -1
- package/esm/models/responsesoutputmodality.js +1 -1
- package/esm/models/schema2.d.ts +92 -0
- package/esm/models/schema2.js +109 -0
- package/esm/sdk/analytics.d.ts +1 -1
- package/esm/sdk/analytics.js +1 -1
- package/esm/sdk/apikeys.d.ts +15 -0
- package/esm/sdk/apikeys.js +15 -0
- package/esm/sdk/credits.d.ts +1 -1
- package/esm/sdk/credits.js +1 -1
- package/esm/sdk/guardrails.d.ts +96 -0
- package/esm/sdk/guardrails.js +139 -0
- package/esm/sdk/sdk.d.ts +3 -3
- package/esm/sdk/sdk.js +4 -4
- package/esm/types/index.d.ts +2 -0
- package/esm/types/index.js +1 -0
- package/esm/types/models.d.ts +25 -0
- package/esm/types/models.js +10 -0
- package/jsr.json +1 -1
- package/package.json +12 -10
- package/scripts/check-types.js +127 -0
- package/esm/models/operations/getparameters.d.ts +0 -87
- package/esm/models/operations/getparameters.js +0 -73
- package/esm/models/schema3.d.ts +0 -51
- package/esm/models/schema3.js +0 -62
- package/esm/sdk/parameters.d.ts +0 -9
- package/esm/sdk/parameters.js +0 -16
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f5d5abd15e27
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
export const Schema4 = {
|
|
9
|
+
Unknown: "unknown",
|
|
10
|
+
OpenaiResponsesV1: "openai-responses-v1",
|
|
11
|
+
AzureOpenaiResponsesV1: "azure-openai-responses-v1",
|
|
12
|
+
XaiResponsesV1: "xai-responses-v1",
|
|
13
|
+
AnthropicClaudeV1: "anthropic-claude-v1",
|
|
14
|
+
GoogleGeminiV1: "google-gemini-v1",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const Schema4$inboundSchema = openEnums
|
|
18
|
+
.inboundSchema(Schema4);
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const Schema4$outboundSchema = openEnums
|
|
21
|
+
.outboundSchema(Schema4);
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const Schema2ReasoningText$inboundSchema = z.object({
|
|
24
|
+
type: z.literal("reasoning.text"),
|
|
25
|
+
text: z.nullable(z.string()).optional(),
|
|
26
|
+
signature: z.nullable(z.string()).optional(),
|
|
27
|
+
id: z.nullable(z.string()).optional(),
|
|
28
|
+
format: z.nullable(Schema4$inboundSchema).optional(),
|
|
29
|
+
index: z.number().optional(),
|
|
30
|
+
});
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const Schema2ReasoningText$outboundSchema = z.object({
|
|
33
|
+
type: z.literal("reasoning.text"),
|
|
34
|
+
text: z.nullable(z.string()).optional(),
|
|
35
|
+
signature: z.nullable(z.string()).optional(),
|
|
36
|
+
id: z.nullable(z.string()).optional(),
|
|
37
|
+
format: z.nullable(Schema4$outboundSchema).optional(),
|
|
38
|
+
index: z.number().optional(),
|
|
39
|
+
});
|
|
40
|
+
export function schema2ReasoningTextToJSON(schema2ReasoningText) {
|
|
41
|
+
return JSON.stringify(Schema2ReasoningText$outboundSchema.parse(schema2ReasoningText));
|
|
42
|
+
}
|
|
43
|
+
export function schema2ReasoningTextFromJSON(jsonString) {
|
|
44
|
+
return safeParse(jsonString, (x) => Schema2ReasoningText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema2ReasoningText' from JSON`);
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const Schema2ReasoningEncrypted$inboundSchema = z.object({
|
|
48
|
+
type: z.literal("reasoning.encrypted"),
|
|
49
|
+
data: z.string(),
|
|
50
|
+
id: z.nullable(z.string()).optional(),
|
|
51
|
+
format: z.nullable(Schema4$inboundSchema).optional(),
|
|
52
|
+
index: z.number().optional(),
|
|
53
|
+
});
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const Schema2ReasoningEncrypted$outboundSchema = z.object({
|
|
56
|
+
type: z.literal("reasoning.encrypted"),
|
|
57
|
+
data: z.string(),
|
|
58
|
+
id: z.nullable(z.string()).optional(),
|
|
59
|
+
format: z.nullable(Schema4$outboundSchema).optional(),
|
|
60
|
+
index: z.number().optional(),
|
|
61
|
+
});
|
|
62
|
+
export function schema2ReasoningEncryptedToJSON(schema2ReasoningEncrypted) {
|
|
63
|
+
return JSON.stringify(Schema2ReasoningEncrypted$outboundSchema.parse(schema2ReasoningEncrypted));
|
|
64
|
+
}
|
|
65
|
+
export function schema2ReasoningEncryptedFromJSON(jsonString) {
|
|
66
|
+
return safeParse(jsonString, (x) => Schema2ReasoningEncrypted$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema2ReasoningEncrypted' from JSON`);
|
|
67
|
+
}
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const Schema2ReasoningSummary$inboundSchema = z.object({
|
|
70
|
+
type: z.literal("reasoning.summary"),
|
|
71
|
+
summary: z.string(),
|
|
72
|
+
id: z.nullable(z.string()).optional(),
|
|
73
|
+
format: z.nullable(Schema4$inboundSchema).optional(),
|
|
74
|
+
index: z.number().optional(),
|
|
75
|
+
});
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const Schema2ReasoningSummary$outboundSchema = z.object({
|
|
78
|
+
type: z.literal("reasoning.summary"),
|
|
79
|
+
summary: z.string(),
|
|
80
|
+
id: z.nullable(z.string()).optional(),
|
|
81
|
+
format: z.nullable(Schema4$outboundSchema).optional(),
|
|
82
|
+
index: z.number().optional(),
|
|
83
|
+
});
|
|
84
|
+
export function schema2ReasoningSummaryToJSON(schema2ReasoningSummary) {
|
|
85
|
+
return JSON.stringify(Schema2ReasoningSummary$outboundSchema.parse(schema2ReasoningSummary));
|
|
86
|
+
}
|
|
87
|
+
export function schema2ReasoningSummaryFromJSON(jsonString) {
|
|
88
|
+
return safeParse(jsonString, (x) => Schema2ReasoningSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema2ReasoningSummary' from JSON`);
|
|
89
|
+
}
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const Schema2$inboundSchema = z.union([
|
|
92
|
+
z.lazy(() => Schema2ReasoningSummary$inboundSchema),
|
|
93
|
+
z.lazy(() => Schema2ReasoningEncrypted$inboundSchema),
|
|
94
|
+
z.lazy(() => Schema2ReasoningText$inboundSchema),
|
|
95
|
+
]);
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const Schema2$outboundSchema = z
|
|
98
|
+
.union([
|
|
99
|
+
z.lazy(() => Schema2ReasoningSummary$outboundSchema),
|
|
100
|
+
z.lazy(() => Schema2ReasoningEncrypted$outboundSchema),
|
|
101
|
+
z.lazy(() => Schema2ReasoningText$outboundSchema),
|
|
102
|
+
]);
|
|
103
|
+
export function schema2ToJSON(schema2) {
|
|
104
|
+
return JSON.stringify(Schema2$outboundSchema.parse(schema2));
|
|
105
|
+
}
|
|
106
|
+
export function schema2FromJSON(jsonString) {
|
|
107
|
+
return safeParse(jsonString, (x) => Schema2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema2' from JSON`);
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=schema2.js.map
|
package/esm/sdk/analytics.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Analytics extends ClientSDK {
|
|
|
5
5
|
* Get user activity grouped by endpoint
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Returns user activity data grouped by endpoint for the last 30 (completed) UTC days
|
|
8
|
+
* Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
9
9
|
*/
|
|
10
10
|
getUserActivity(request?: operations.GetUserActivityRequest | undefined, options?: RequestOptions): Promise<operations.GetUserActivityResponse>;
|
|
11
11
|
}
|
package/esm/sdk/analytics.js
CHANGED
|
@@ -10,7 +10,7 @@ export class Analytics extends ClientSDK {
|
|
|
10
10
|
* Get user activity grouped by endpoint
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* Returns user activity data grouped by endpoint for the last 30 (completed) UTC days
|
|
13
|
+
* Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
14
14
|
*/
|
|
15
15
|
async getUserActivity(request, options) {
|
|
16
16
|
return unwrapAsync(analyticsGetUserActivity(this, request, options));
|
package/esm/sdk/apikeys.d.ts
CHANGED
|
@@ -3,22 +3,37 @@ import * as operations from "../models/operations/index.js";
|
|
|
3
3
|
export declare class APIKeys extends ClientSDK {
|
|
4
4
|
/**
|
|
5
5
|
* List API keys
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
6
9
|
*/
|
|
7
10
|
list(request?: operations.ListRequest | undefined, options?: RequestOptions): Promise<operations.ListResponse>;
|
|
8
11
|
/**
|
|
9
12
|
* Create a new API key
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
10
16
|
*/
|
|
11
17
|
create(request: operations.CreateKeysRequest, options?: RequestOptions): Promise<operations.CreateKeysResponse>;
|
|
12
18
|
/**
|
|
13
19
|
* Update an API key
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
14
23
|
*/
|
|
15
24
|
update(request: operations.UpdateKeysRequest, options?: RequestOptions): Promise<operations.UpdateKeysResponse>;
|
|
16
25
|
/**
|
|
17
26
|
* Delete an API key
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
18
30
|
*/
|
|
19
31
|
delete(request: operations.DeleteKeysRequest, options?: RequestOptions): Promise<operations.DeleteKeysResponse>;
|
|
20
32
|
/**
|
|
21
33
|
* Get a single API key
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
22
37
|
*/
|
|
23
38
|
get(request: operations.GetKeyRequest, options?: RequestOptions): Promise<operations.GetKeyResponse>;
|
|
24
39
|
/**
|
package/esm/sdk/apikeys.js
CHANGED
|
@@ -13,30 +13,45 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
13
13
|
export class APIKeys extends ClientSDK {
|
|
14
14
|
/**
|
|
15
15
|
* List API keys
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* List all API keys for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
16
19
|
*/
|
|
17
20
|
async list(request, options) {
|
|
18
21
|
return unwrapAsync(apiKeysList(this, request, options));
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
21
24
|
* Create a new API key
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Create a new API key for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
22
28
|
*/
|
|
23
29
|
async create(request, options) {
|
|
24
30
|
return unwrapAsync(apiKeysCreate(this, request, options));
|
|
25
31
|
}
|
|
26
32
|
/**
|
|
27
33
|
* Update an API key
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Update an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
28
37
|
*/
|
|
29
38
|
async update(request, options) {
|
|
30
39
|
return unwrapAsync(apiKeysUpdate(this, request, options));
|
|
31
40
|
}
|
|
32
41
|
/**
|
|
33
42
|
* Delete an API key
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Delete an existing API key. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
34
46
|
*/
|
|
35
47
|
async delete(request, options) {
|
|
36
48
|
return unwrapAsync(apiKeysDelete(this, request, options));
|
|
37
49
|
}
|
|
38
50
|
/**
|
|
39
51
|
* Get a single API key
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Get a single API key by hash. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
40
55
|
*/
|
|
41
56
|
async get(request, options) {
|
|
42
57
|
return unwrapAsync(apiKeysGet(this, request, options));
|
package/esm/sdk/credits.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class Credits extends ClientSDK {
|
|
|
6
6
|
* Get remaining credits
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
|
-
* Get total credits purchased and used for the authenticated user
|
|
9
|
+
* Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
10
10
|
*/
|
|
11
11
|
getCredits(options?: RequestOptions): Promise<operations.GetCreditsResponse>;
|
|
12
12
|
/**
|
package/esm/sdk/credits.js
CHANGED
|
@@ -11,7 +11,7 @@ export class Credits extends ClientSDK {
|
|
|
11
11
|
* Get remaining credits
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Get total credits purchased and used for the authenticated user
|
|
14
|
+
* Get total credits purchased and used for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
15
15
|
*/
|
|
16
16
|
async getCredits(options) {
|
|
17
17
|
return unwrapAsync(creditsGetCredits(this, options));
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as operations from "../models/operations/index.js";
|
|
3
|
+
export declare class Guardrails extends ClientSDK {
|
|
4
|
+
/**
|
|
5
|
+
* List guardrails
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
9
|
+
*/
|
|
10
|
+
list(request?: operations.ListGuardrailsRequest | undefined, options?: RequestOptions): Promise<operations.ListGuardrailsResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a guardrail
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
16
|
+
*/
|
|
17
|
+
create(request: operations.CreateGuardrailRequest, options?: RequestOptions): Promise<operations.CreateGuardrailResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Get a guardrail
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
23
|
+
*/
|
|
24
|
+
get(request: operations.GetGuardrailRequest, options?: RequestOptions): Promise<operations.GetGuardrailResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Update a guardrail
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
30
|
+
*/
|
|
31
|
+
update(request: operations.UpdateGuardrailRequest, options?: RequestOptions): Promise<operations.UpdateGuardrailResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Delete a guardrail
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
37
|
+
*/
|
|
38
|
+
delete(request: operations.DeleteGuardrailRequest, options?: RequestOptions): Promise<operations.DeleteGuardrailResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* List all key assignments
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
44
|
+
*/
|
|
45
|
+
listKeyAssignments(request?: operations.ListKeyAssignmentsRequest | undefined, options?: RequestOptions): Promise<operations.ListKeyAssignmentsResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* List all member assignments
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
51
|
+
*/
|
|
52
|
+
listMemberAssignments(request?: operations.ListMemberAssignmentsRequest | undefined, options?: RequestOptions): Promise<operations.ListMemberAssignmentsResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* List key assignments for a guardrail
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
58
|
+
*/
|
|
59
|
+
listGuardrailKeyAssignments(request: operations.ListGuardrailKeyAssignmentsRequest, options?: RequestOptions): Promise<operations.ListGuardrailKeyAssignmentsResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Bulk assign keys to a guardrail
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
65
|
+
*/
|
|
66
|
+
bulkAssignKeys(request: operations.BulkAssignKeysToGuardrailRequest, options?: RequestOptions): Promise<operations.BulkAssignKeysToGuardrailResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* List member assignments for a guardrail
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
72
|
+
*/
|
|
73
|
+
listGuardrailMemberAssignments(request: operations.ListGuardrailMemberAssignmentsRequest, options?: RequestOptions): Promise<operations.ListGuardrailMemberAssignmentsResponse>;
|
|
74
|
+
/**
|
|
75
|
+
* Bulk assign members to a guardrail
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
79
|
+
*/
|
|
80
|
+
bulkAssignMembers(request: operations.BulkAssignMembersToGuardrailRequest, options?: RequestOptions): Promise<operations.BulkAssignMembersToGuardrailResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* Bulk unassign keys from a guardrail
|
|
83
|
+
*
|
|
84
|
+
* @remarks
|
|
85
|
+
* Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
86
|
+
*/
|
|
87
|
+
bulkUnassignKeys(request: operations.BulkUnassignKeysFromGuardrailRequest, options?: RequestOptions): Promise<operations.BulkUnassignKeysFromGuardrailResponse>;
|
|
88
|
+
/**
|
|
89
|
+
* Bulk unassign members from a guardrail
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
93
|
+
*/
|
|
94
|
+
bulkUnassignMembers(request: operations.BulkUnassignMembersFromGuardrailRequest, options?: RequestOptions): Promise<operations.BulkUnassignMembersFromGuardrailResponse>;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=guardrails.d.ts.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: c4e976dbf057
|
|
4
|
+
*/
|
|
5
|
+
import { guardrailsBulkAssignKeys } from "../funcs/guardrailsBulkAssignKeys.js";
|
|
6
|
+
import { guardrailsBulkAssignMembers } from "../funcs/guardrailsBulkAssignMembers.js";
|
|
7
|
+
import { guardrailsBulkUnassignKeys } from "../funcs/guardrailsBulkUnassignKeys.js";
|
|
8
|
+
import { guardrailsBulkUnassignMembers } from "../funcs/guardrailsBulkUnassignMembers.js";
|
|
9
|
+
import { guardrailsCreate } from "../funcs/guardrailsCreate.js";
|
|
10
|
+
import { guardrailsDelete } from "../funcs/guardrailsDelete.js";
|
|
11
|
+
import { guardrailsGet } from "../funcs/guardrailsGet.js";
|
|
12
|
+
import { guardrailsList } from "../funcs/guardrailsList.js";
|
|
13
|
+
import { guardrailsListGuardrailKeyAssignments } from "../funcs/guardrailsListGuardrailKeyAssignments.js";
|
|
14
|
+
import { guardrailsListGuardrailMemberAssignments } from "../funcs/guardrailsListGuardrailMemberAssignments.js";
|
|
15
|
+
import { guardrailsListKeyAssignments } from "../funcs/guardrailsListKeyAssignments.js";
|
|
16
|
+
import { guardrailsListMemberAssignments } from "../funcs/guardrailsListMemberAssignments.js";
|
|
17
|
+
import { guardrailsUpdate } from "../funcs/guardrailsUpdate.js";
|
|
18
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
19
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
20
|
+
export class Guardrails extends ClientSDK {
|
|
21
|
+
/**
|
|
22
|
+
* List guardrails
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* List all guardrails for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
26
|
+
*/
|
|
27
|
+
async list(request, options) {
|
|
28
|
+
return unwrapAsync(guardrailsList(this, request, options));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create a guardrail
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Create a new guardrail for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
35
|
+
*/
|
|
36
|
+
async create(request, options) {
|
|
37
|
+
return unwrapAsync(guardrailsCreate(this, request, options));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Get a guardrail
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* Get a single guardrail by ID. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
44
|
+
*/
|
|
45
|
+
async get(request, options) {
|
|
46
|
+
return unwrapAsync(guardrailsGet(this, request, options));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Update a guardrail
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* Update an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
53
|
+
*/
|
|
54
|
+
async update(request, options) {
|
|
55
|
+
return unwrapAsync(guardrailsUpdate(this, request, options));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Delete a guardrail
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* Delete an existing guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
62
|
+
*/
|
|
63
|
+
async delete(request, options) {
|
|
64
|
+
return unwrapAsync(guardrailsDelete(this, request, options));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* List all key assignments
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* List all API key guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
71
|
+
*/
|
|
72
|
+
async listKeyAssignments(request, options) {
|
|
73
|
+
return unwrapAsync(guardrailsListKeyAssignments(this, request, options));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* List all member assignments
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* List all organization member guardrail assignments for the authenticated user. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
80
|
+
*/
|
|
81
|
+
async listMemberAssignments(request, options) {
|
|
82
|
+
return unwrapAsync(guardrailsListMemberAssignments(this, request, options));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* List key assignments for a guardrail
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* List all API key assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
89
|
+
*/
|
|
90
|
+
async listGuardrailKeyAssignments(request, options) {
|
|
91
|
+
return unwrapAsync(guardrailsListGuardrailKeyAssignments(this, request, options));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Bulk assign keys to a guardrail
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
* Assign multiple API keys to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
98
|
+
*/
|
|
99
|
+
async bulkAssignKeys(request, options) {
|
|
100
|
+
return unwrapAsync(guardrailsBulkAssignKeys(this, request, options));
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* List member assignments for a guardrail
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* List all organization member assignments for a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
107
|
+
*/
|
|
108
|
+
async listGuardrailMemberAssignments(request, options) {
|
|
109
|
+
return unwrapAsync(guardrailsListGuardrailMemberAssignments(this, request, options));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Bulk assign members to a guardrail
|
|
113
|
+
*
|
|
114
|
+
* @remarks
|
|
115
|
+
* Assign multiple organization members to a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
116
|
+
*/
|
|
117
|
+
async bulkAssignMembers(request, options) {
|
|
118
|
+
return unwrapAsync(guardrailsBulkAssignMembers(this, request, options));
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Bulk unassign keys from a guardrail
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* Unassign multiple API keys from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
125
|
+
*/
|
|
126
|
+
async bulkUnassignKeys(request, options) {
|
|
127
|
+
return unwrapAsync(guardrailsBulkUnassignKeys(this, request, options));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Bulk unassign members from a guardrail
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* Unassign multiple organization members from a specific guardrail. [Provisioning key](/docs/guides/overview/auth/provisioning-api-keys) required.
|
|
134
|
+
*/
|
|
135
|
+
async bulkUnassignMembers(request, options) {
|
|
136
|
+
return unwrapAsync(guardrailsBulkUnassignMembers(this, request, options));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=guardrails.js.map
|
package/esm/sdk/sdk.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ import { Credits } from "./credits.js";
|
|
|
8
8
|
import { Embeddings } from "./embeddings.js";
|
|
9
9
|
import { Endpoints } from "./endpoints.js";
|
|
10
10
|
import { Generations } from "./generations.js";
|
|
11
|
+
import { Guardrails } from "./guardrails.js";
|
|
11
12
|
import { Models } from "./models.js";
|
|
12
13
|
import { OAuth } from "./oauth.js";
|
|
13
|
-
import { ParametersT } from "./parameters.js";
|
|
14
14
|
import { Providers } from "./providers.js";
|
|
15
15
|
import { type CallModelInput } from "../funcs/call-model.js";
|
|
16
16
|
import type { ModelResult } from "../lib/model-result.js";
|
|
@@ -32,12 +32,12 @@ export declare class OpenRouter extends ClientSDK {
|
|
|
32
32
|
get models(): Models;
|
|
33
33
|
private _endpoints?;
|
|
34
34
|
get endpoints(): Endpoints;
|
|
35
|
-
private _parameters?;
|
|
36
|
-
get parameters(): ParametersT;
|
|
37
35
|
private _providers?;
|
|
38
36
|
get providers(): Providers;
|
|
39
37
|
private _apiKeys?;
|
|
40
38
|
get apiKeys(): APIKeys;
|
|
39
|
+
private _guardrails?;
|
|
40
|
+
get guardrails(): Guardrails;
|
|
41
41
|
private _oAuth?;
|
|
42
42
|
get oAuth(): OAuth;
|
|
43
43
|
private _chat?;
|
package/esm/sdk/sdk.js
CHANGED
|
@@ -12,9 +12,9 @@ import { Credits } from "./credits.js";
|
|
|
12
12
|
import { Embeddings } from "./embeddings.js";
|
|
13
13
|
import { Endpoints } from "./endpoints.js";
|
|
14
14
|
import { Generations } from "./generations.js";
|
|
15
|
+
import { Guardrails } from "./guardrails.js";
|
|
15
16
|
import { Models } from "./models.js";
|
|
16
17
|
import { OAuth } from "./oauth.js";
|
|
17
|
-
import { ParametersT } from "./parameters.js";
|
|
18
18
|
import { Providers } from "./providers.js";
|
|
19
19
|
// #region imports
|
|
20
20
|
import { callModel as callModelFunc, } from "../funcs/call-model.js";
|
|
@@ -43,15 +43,15 @@ export class OpenRouter extends ClientSDK {
|
|
|
43
43
|
get endpoints() {
|
|
44
44
|
return (this._endpoints ?? (this._endpoints = new Endpoints(this._options)));
|
|
45
45
|
}
|
|
46
|
-
get parameters() {
|
|
47
|
-
return (this._parameters ?? (this._parameters = new ParametersT(this._options)));
|
|
48
|
-
}
|
|
49
46
|
get providers() {
|
|
50
47
|
return (this._providers ?? (this._providers = new Providers(this._options)));
|
|
51
48
|
}
|
|
52
49
|
get apiKeys() {
|
|
53
50
|
return (this._apiKeys ?? (this._apiKeys = new APIKeys(this._options)));
|
|
54
51
|
}
|
|
52
|
+
get guardrails() {
|
|
53
|
+
return (this._guardrails ?? (this._guardrails = new Guardrails(this._options)));
|
|
54
|
+
}
|
|
55
55
|
get oAuth() {
|
|
56
56
|
return (this._oAuth ?? (this._oAuth = new OAuth(this._options)));
|
|
57
57
|
}
|
package/esm/types/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export type { PageIterator, Paginator } from "./operations.js";
|
|
|
5
5
|
export { createPageIterator } from "./operations.js";
|
|
6
6
|
export { RFCDate } from "./rfcdate.js";
|
|
7
7
|
export * from "./unrecognized.js";
|
|
8
|
+
export type { ModelId, Variant, StaticVariant, VirtualVariant } from "./models.js";
|
|
9
|
+
export { MODEL_HASH } from "./models.js";
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
package/esm/types/index.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Union type of all available model IDs on OpenRouter.
|
|
3
|
+
* Includes base models and their variants (e.g., ":free", ":nitro").
|
|
4
|
+
*/
|
|
5
|
+
export type ModelId = 'ai21/jamba-large-1.7' | 'ai21/jamba-mini-1.7' | 'aion-labs/aion-1.0' | 'aion-labs/aion-1.0-mini' | 'aion-labs/aion-rp-llama-3.1-8b' | 'alfredpros/codellama-7b-instruct-solidity' | 'alibaba/tongyi-deepresearch-30b-a3b' | 'alibaba/tongyi-deepresearch-30b-a3b:free' | 'allenai/olmo-2-0325-32b-instruct' | 'allenai/olmo-3-32b-think:free' | 'allenai/olmo-3-7b-instruct' | 'allenai/olmo-3-7b-think' | 'allenai/olmo-3.1-32b-think:free' | 'alpindale/goliath-120b' | 'amazon/nova-2-lite-v1' | 'amazon/nova-lite-v1' | 'amazon/nova-micro-v1' | 'amazon/nova-premier-v1' | 'amazon/nova-pro-v1' | 'anthracite-org/magnum-v4-72b' | 'anthropic/claude-3-haiku' | 'anthropic/claude-3-opus' | 'anthropic/claude-3.5-haiku' | 'anthropic/claude-3.5-haiku-20241022' | 'anthropic/claude-3.5-sonnet' | 'anthropic/claude-3.7-sonnet' | 'anthropic/claude-3.7-sonnet:thinking' | 'anthropic/claude-haiku-4.5' | 'anthropic/claude-opus-4' | 'anthropic/claude-opus-4.1' | 'anthropic/claude-opus-4.5' | 'anthropic/claude-sonnet-4' | 'anthropic/claude-sonnet-4.5' | 'arcee-ai/coder-large' | 'arcee-ai/maestro-reasoning' | 'arcee-ai/spotlight' | 'arcee-ai/trinity-mini' | 'arcee-ai/trinity-mini:free' | 'arcee-ai/virtuoso-large' | 'arliai/qwq-32b-arliai-rpr-v1' | 'baidu/ernie-4.5-21b-a3b' | 'baidu/ernie-4.5-21b-a3b-thinking' | 'baidu/ernie-4.5-300b-a47b' | 'baidu/ernie-4.5-vl-28b-a3b' | 'baidu/ernie-4.5-vl-424b-a47b' | 'bytedance/ui-tars-1.5-7b' | 'cognitivecomputations/dolphin-mistral-24b-venice-edition:free' | 'cohere/command-a' | 'cohere/command-r-08-2024' | 'cohere/command-r-plus-08-2024' | 'cohere/command-r7b-12-2024' | 'deepcogito/cogito-v2-preview-llama-109b-moe' | 'deepcogito/cogito-v2-preview-llama-405b' | 'deepcogito/cogito-v2-preview-llama-70b' | 'deepcogito/cogito-v2.1-671b' | 'deepseek/deepseek-chat' | 'deepseek/deepseek-chat-v3-0324' | 'deepseek/deepseek-chat-v3.1' | 'deepseek/deepseek-prover-v2' | 'deepseek/deepseek-r1' | 'deepseek/deepseek-r1-0528' | 'deepseek/deepseek-r1-0528-qwen3-8b' | 'deepseek/deepseek-r1-0528:free' | 'deepseek/deepseek-r1-distill-llama-70b' | 'deepseek/deepseek-r1-distill-qwen-14b' | 'deepseek/deepseek-r1-distill-qwen-32b' | 'deepseek/deepseek-v3.1-terminus' | 'deepseek/deepseek-v3.1-terminus:exacto' | 'deepseek/deepseek-v3.2' | 'deepseek/deepseek-v3.2-exp' | 'deepseek/deepseek-v3.2-speciale' | 'eleutherai/llemma_7b' | 'essentialai/rnj-1-instruct' | 'google/gemini-2.0-flash-001' | 'google/gemini-2.0-flash-exp:free' | 'google/gemini-2.0-flash-lite-001' | 'google/gemini-2.5-flash' | 'google/gemini-2.5-flash-image' | 'google/gemini-2.5-flash-image-preview' | 'google/gemini-2.5-flash-lite' | 'google/gemini-2.5-flash-lite-preview-09-2025' | 'google/gemini-2.5-flash-preview-09-2025' | 'google/gemini-2.5-pro' | 'google/gemini-2.5-pro-preview' | 'google/gemini-2.5-pro-preview-05-06' | 'google/gemini-3-flash-preview' | 'google/gemini-3-pro-image-preview' | 'google/gemini-3-pro-preview' | 'google/gemma-2-27b-it' | 'google/gemma-2-9b-it' | 'google/gemma-3-12b-it' | 'google/gemma-3-12b-it:free' | 'google/gemma-3-27b-it' | 'google/gemma-3-27b-it:free' | 'google/gemma-3-4b-it' | 'google/gemma-3-4b-it:free' | 'google/gemma-3n-e2b-it:free' | 'google/gemma-3n-e4b-it' | 'google/gemma-3n-e4b-it:free' | 'gryphe/mythomax-l2-13b' | 'ibm-granite/granite-4.0-h-micro' | 'inception/mercury' | 'inception/mercury-coder' | 'inflection/inflection-3-pi' | 'inflection/inflection-3-productivity' | 'kwaipilot/kat-coder-pro:free' | 'liquid/lfm-2.2-6b' | 'liquid/lfm2-8b-a1b' | 'mancer/weaver' | 'meituan/longcat-flash-chat' | 'meta-llama/llama-3-70b-instruct' | 'meta-llama/llama-3-8b-instruct' | 'meta-llama/llama-3.1-405b' | 'meta-llama/llama-3.1-405b-instruct' | 'meta-llama/llama-3.1-405b-instruct:free' | 'meta-llama/llama-3.1-70b-instruct' | 'meta-llama/llama-3.1-8b-instruct' | 'meta-llama/llama-3.2-11b-vision-instruct' | 'meta-llama/llama-3.2-1b-instruct' | 'meta-llama/llama-3.2-3b-instruct' | 'meta-llama/llama-3.2-3b-instruct:free' | 'meta-llama/llama-3.2-90b-vision-instruct' | 'meta-llama/llama-3.3-70b-instruct' | 'meta-llama/llama-3.3-70b-instruct:free' | 'meta-llama/llama-4-maverick' | 'meta-llama/llama-4-scout' | 'meta-llama/llama-guard-2-8b' | 'meta-llama/llama-guard-3-8b' | 'meta-llama/llama-guard-4-12b' | 'microsoft/phi-3-medium-128k-instruct' | 'microsoft/phi-3-mini-128k-instruct' | 'microsoft/phi-3.5-mini-128k-instruct' | 'microsoft/phi-4' | 'microsoft/phi-4-multimodal-instruct' | 'microsoft/phi-4-reasoning-plus' | 'microsoft/wizardlm-2-8x22b' | 'minimax/minimax-01' | 'minimax/minimax-m1' | 'minimax/minimax-m2' | 'minimax/minimax-m2.1' | 'mistralai/codestral-2508' | 'mistralai/devstral-2512' | 'mistralai/devstral-2512:free' | 'mistralai/devstral-medium' | 'mistralai/devstral-small' | 'mistralai/devstral-small-2505' | 'mistralai/ministral-14b-2512' | 'mistralai/ministral-3b' | 'mistralai/ministral-3b-2512' | 'mistralai/ministral-8b' | 'mistralai/ministral-8b-2512' | 'mistralai/mistral-7b-instruct' | 'mistralai/mistral-7b-instruct-v0.1' | 'mistralai/mistral-7b-instruct-v0.2' | 'mistralai/mistral-7b-instruct-v0.3' | 'mistralai/mistral-7b-instruct:free' | 'mistralai/mistral-large' | 'mistralai/mistral-large-2407' | 'mistralai/mistral-large-2411' | 'mistralai/mistral-large-2512' | 'mistralai/mistral-medium-3' | 'mistralai/mistral-medium-3.1' | 'mistralai/mistral-nemo' | 'mistralai/mistral-saba' | 'mistralai/mistral-small-24b-instruct-2501' | 'mistralai/mistral-small-3.1-24b-instruct' | 'mistralai/mistral-small-3.1-24b-instruct:free' | 'mistralai/mistral-small-3.2-24b-instruct' | 'mistralai/mistral-small-creative' | 'mistralai/mistral-tiny' | 'mistralai/mixtral-8x22b-instruct' | 'mistralai/mixtral-8x7b-instruct' | 'mistralai/pixtral-12b' | 'mistralai/pixtral-large-2411' | 'mistralai/voxtral-small-24b-2507' | 'moonshotai/kimi-dev-72b' | 'moonshotai/kimi-k2' | 'moonshotai/kimi-k2-0905' | 'moonshotai/kimi-k2-0905:exacto' | 'moonshotai/kimi-k2-thinking' | 'moonshotai/kimi-k2:free' | 'morph/morph-v3-fast' | 'morph/morph-v3-large' | 'neversleep/llama-3.1-lumimaid-8b' | 'neversleep/noromaid-20b' | 'nex-agi/deepseek-v3.1-nex-n1:free' | 'nousresearch/deephermes-3-mistral-24b-preview' | 'nousresearch/hermes-2-pro-llama-3-8b' | 'nousresearch/hermes-3-llama-3.1-405b' | 'nousresearch/hermes-3-llama-3.1-405b:free' | 'nousresearch/hermes-3-llama-3.1-70b' | 'nousresearch/hermes-4-405b' | 'nousresearch/hermes-4-70b' | 'nvidia/llama-3.1-nemotron-70b-instruct' | 'nvidia/llama-3.1-nemotron-ultra-253b-v1' | 'nvidia/llama-3.3-nemotron-super-49b-v1.5' | 'nvidia/nemotron-3-nano-30b-a3b' | 'nvidia/nemotron-3-nano-30b-a3b:free' | 'nvidia/nemotron-nano-12b-v2-vl' | 'nvidia/nemotron-nano-12b-v2-vl:free' | 'nvidia/nemotron-nano-9b-v2' | 'nvidia/nemotron-nano-9b-v2:free' | 'openai/chatgpt-4o-latest' | 'openai/codex-mini' | 'openai/gpt-3.5-turbo' | 'openai/gpt-3.5-turbo-0613' | 'openai/gpt-3.5-turbo-16k' | 'openai/gpt-3.5-turbo-instruct' | 'openai/gpt-4' | 'openai/gpt-4-0314' | 'openai/gpt-4-1106-preview' | 'openai/gpt-4-turbo' | 'openai/gpt-4-turbo-preview' | 'openai/gpt-4.1' | 'openai/gpt-4.1-mini' | 'openai/gpt-4.1-nano' | 'openai/gpt-4o' | 'openai/gpt-4o-2024-05-13' | 'openai/gpt-4o-2024-08-06' | 'openai/gpt-4o-2024-11-20' | 'openai/gpt-4o-audio-preview' | 'openai/gpt-4o-mini' | 'openai/gpt-4o-mini-2024-07-18' | 'openai/gpt-4o-mini-search-preview' | 'openai/gpt-4o-search-preview' | 'openai/gpt-4o:extended' | 'openai/gpt-5' | 'openai/gpt-5-chat' | 'openai/gpt-5-codex' | 'openai/gpt-5-image' | 'openai/gpt-5-image-mini' | 'openai/gpt-5-mini' | 'openai/gpt-5-nano' | 'openai/gpt-5-pro' | 'openai/gpt-5.1' | 'openai/gpt-5.1-chat' | 'openai/gpt-5.1-codex' | 'openai/gpt-5.1-codex-max' | 'openai/gpt-5.1-codex-mini' | 'openai/gpt-5.2' | 'openai/gpt-5.2-chat' | 'openai/gpt-5.2-pro' | 'openai/gpt-oss-120b' | 'openai/gpt-oss-120b:exacto' | 'openai/gpt-oss-120b:free' | 'openai/gpt-oss-20b' | 'openai/gpt-oss-20b:free' | 'openai/gpt-oss-safeguard-20b' | 'openai/o1' | 'openai/o1-pro' | 'openai/o3' | 'openai/o3-deep-research' | 'openai/o3-mini' | 'openai/o3-mini-high' | 'openai/o3-pro' | 'openai/o4-mini' | 'openai/o4-mini-deep-research' | 'openai/o4-mini-high' | 'opengvlab/internvl3-78b' | 'openrouter/auto' | 'openrouter/bodybuilder' | 'perplexity/sonar' | 'perplexity/sonar-deep-research' | 'perplexity/sonar-pro' | 'perplexity/sonar-pro-search' | 'perplexity/sonar-reasoning' | 'perplexity/sonar-reasoning-pro' | 'prime-intellect/intellect-3' | 'qwen/qwen-2.5-72b-instruct' | 'qwen/qwen-2.5-7b-instruct' | 'qwen/qwen-2.5-coder-32b-instruct' | 'qwen/qwen-2.5-vl-7b-instruct' | 'qwen/qwen-2.5-vl-7b-instruct:free' | 'qwen/qwen-max' | 'qwen/qwen-plus' | 'qwen/qwen-plus-2025-07-28' | 'qwen/qwen-plus-2025-07-28:thinking' | 'qwen/qwen-turbo' | 'qwen/qwen-vl-max' | 'qwen/qwen-vl-plus' | 'qwen/qwen2.5-coder-7b-instruct' | 'qwen/qwen2.5-vl-32b-instruct' | 'qwen/qwen2.5-vl-72b-instruct' | 'qwen/qwen3-14b' | 'qwen/qwen3-235b-a22b' | 'qwen/qwen3-235b-a22b-2507' | 'qwen/qwen3-235b-a22b-thinking-2507' | 'qwen/qwen3-30b-a3b' | 'qwen/qwen3-30b-a3b-instruct-2507' | 'qwen/qwen3-30b-a3b-thinking-2507' | 'qwen/qwen3-32b' | 'qwen/qwen3-4b:free' | 'qwen/qwen3-8b' | 'qwen/qwen3-coder' | 'qwen/qwen3-coder-30b-a3b-instruct' | 'qwen/qwen3-coder-flash' | 'qwen/qwen3-coder-plus' | 'qwen/qwen3-coder:exacto' | 'qwen/qwen3-coder:free' | 'qwen/qwen3-max' | 'qwen/qwen3-next-80b-a3b-instruct' | 'qwen/qwen3-next-80b-a3b-thinking' | 'qwen/qwen3-vl-235b-a22b-instruct' | 'qwen/qwen3-vl-235b-a22b-thinking' | 'qwen/qwen3-vl-30b-a3b-instruct' | 'qwen/qwen3-vl-30b-a3b-thinking' | 'qwen/qwen3-vl-32b-instruct' | 'qwen/qwen3-vl-8b-instruct' | 'qwen/qwen3-vl-8b-thinking' | 'qwen/qwq-32b' | 'raifle/sorcererlm-8x22b' | 'relace/relace-apply-3' | 'relace/relace-search' | 'sao10k/l3-euryale-70b' | 'sao10k/l3-lunaris-8b' | 'sao10k/l3.1-70b-hanami-x1' | 'sao10k/l3.1-euryale-70b' | 'sao10k/l3.3-euryale-70b' | 'stepfun-ai/step3' | 'switchpoint/router' | 'tencent/hunyuan-a13b-instruct' | 'thedrummer/cydonia-24b-v4.1' | 'thedrummer/rocinante-12b' | 'thedrummer/skyfall-36b-v2' | 'thedrummer/unslopnemo-12b' | 'thudm/glm-4.1v-9b-thinking' | 'tngtech/deepseek-r1t-chimera' | 'tngtech/deepseek-r1t-chimera:free' | 'tngtech/deepseek-r1t2-chimera' | 'tngtech/deepseek-r1t2-chimera:free' | 'tngtech/tng-r1t-chimera' | 'tngtech/tng-r1t-chimera:free' | 'undi95/remm-slerp-l2-13b' | 'x-ai/grok-3' | 'x-ai/grok-3-beta' | 'x-ai/grok-3-mini' | 'x-ai/grok-3-mini-beta' | 'x-ai/grok-4' | 'x-ai/grok-4-fast' | 'x-ai/grok-4.1-fast' | 'x-ai/grok-code-fast-1' | 'xiaomi/mimo-v2-flash:free' | 'z-ai/glm-4-32b' | 'z-ai/glm-4.5' | 'z-ai/glm-4.5-air' | 'z-ai/glm-4.5-air:free' | 'z-ai/glm-4.5v' | 'z-ai/glm-4.6' | 'z-ai/glm-4.6:exacto' | 'z-ai/glm-4.6v' | 'z-ai/glm-4.7';
|
|
6
|
+
/**
|
|
7
|
+
* Static variants that create distinct model IDs.
|
|
8
|
+
* These are already present in the API response (e.g., "openai/gpt-4:free").
|
|
9
|
+
*/
|
|
10
|
+
export type StaticVariant = 'free' | 'extended' | 'exacto' | 'thinking';
|
|
11
|
+
/**
|
|
12
|
+
* Virtual variants used for routing hints.
|
|
13
|
+
* These do not create distinct model IDs but affect routing behavior.
|
|
14
|
+
*/
|
|
15
|
+
export type VirtualVariant = 'all' | 'online' | 'nitro' | 'floor';
|
|
16
|
+
/**
|
|
17
|
+
* All available variants.
|
|
18
|
+
*/
|
|
19
|
+
export type Variant = StaticVariant | VirtualVariant;
|
|
20
|
+
/**
|
|
21
|
+
* Hash of model IDs for staleness checking.
|
|
22
|
+
* Used by postinstall script to detect outdated types.
|
|
23
|
+
*/
|
|
24
|
+
export declare const MODEL_HASH = "986e77d89072f654";
|
|
25
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Auto-generated by @openrouter/cli types
|
|
2
|
+
// Run `npx @openrouter/cli types` to regenerate
|
|
3
|
+
// Generated: 2025-12-23T14:49:53.976Z
|
|
4
|
+
// Model count: 351
|
|
5
|
+
/**
|
|
6
|
+
* Hash of model IDs for staleness checking.
|
|
7
|
+
* Used by postinstall script to detect outdated types.
|
|
8
|
+
*/
|
|
9
|
+
export const MODEL_HASH = '986e77d89072f654';
|
|
10
|
+
//# sourceMappingURL=models.js.map
|