@openrouter/sdk 1.5.17 → 1.5.19
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/modelsList.d.ts +1 -1
- package/esm/funcs/modelsList.js +2 -2
- package/esm/funcs/modelsListForUser.d.ts +1 -1
- package/esm/funcs/modelsListForUser.js +2 -2
- 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/createguardrailrequest.d.ts +5 -0
- package/esm/models/createguardrailrequest.js +2 -0
- package/esm/models/guardrail.d.ts +4 -0
- package/esm/models/guardrail.js +2 -0
- package/esm/models/imagegenerationproviderpreferences.d.ts +6 -0
- package/esm/models/imagegenerationproviderpreferences.js +2 -0
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/organizationsettings.d.ts +1 -1
- 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 +2 -0
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/updateguardrailrequest.d.ts +5 -0
- package/esm/models/updateguardrailrequest.js +2 -0
- package/esm/models/updateorganizationsettingsrequest.d.ts +1 -1
- package/esm/models/videogenerationrequest.d.ts +6 -0
- package/esm/models/videogenerationrequest.js +2 -0
- package/jsr.json +1 -1
- package/package.json +7 -7
|
@@ -12,7 +12,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* List all models and their properties
|
|
14
14
|
*/
|
|
15
|
-
export declare function modelsList(client: OpenRouterCore, request?: operations.GetModelsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.GetModelsResponse, errors.BadRequestResponseError | errors.ForbiddenResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
15
|
+
export declare function modelsList(client: OpenRouterCore, request?: operations.GetModelsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.GetModelsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.ConflictResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
16
16
|
offset: number;
|
|
17
17
|
}>>;
|
|
18
18
|
//# sourceMappingURL=modelsList.d.ts.map
|
package/esm/funcs/modelsList.js
CHANGED
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { GetModelsRequest$outboundSchema as operations_GetModelsRequest$outboundSchema, GetModelsResponse$inboundSchema as operations_GetModelsResponse$inboundSchema } from "../models/operations/getmodels.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
@@ -117,7 +117,7 @@ async function $do(client, request, options) {
|
|
|
117
117
|
const responseFields = {
|
|
118
118
|
HttpMeta: { Response: response, Request: req },
|
|
119
119
|
};
|
|
120
|
-
const [result, raw] = await M.match(M.json(200, operations_GetModelsResponse$inboundSchema, { key: "Result" }), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
120
|
+
const [result, raw] = await M.match(M.json(200, operations_GetModelsResponse$inboundSchema, { key: "Result" }), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
121
121
|
if (!result.ok) {
|
|
122
122
|
return [haltIterator(result), {
|
|
123
123
|
status: "complete",
|
|
@@ -15,7 +15,7 @@ import { PageIterator } from "../types/operations.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/provider-logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). Returns text-output models by default; pass `output_modalities` (a comma-separated list of `text`, `image`, `embeddings`, `audio`, `video`, `rerank`, `speech`, `transcription`, or `all`) to include other modalities. If requesting through a regional hostname, the results will be filtered to models that satisfy in-region routing for that region.
|
|
17
17
|
*/
|
|
18
|
-
export declare function modelsListForUser(client: OpenRouterCore, security: operations.ListModelsUserSecurity, request?: operations.ListModelsUserRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListModelsUserResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
18
|
+
export declare function modelsListForUser(client: OpenRouterCore, security: operations.ListModelsUserSecurity, request?: operations.ListModelsUserRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListModelsUserResponse, errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.ConflictResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
19
|
offset: number;
|
|
20
20
|
}>>;
|
|
21
21
|
//# sourceMappingURL=modelsListForUser.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { resolveSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { ListModelsUserRequest$outboundSchema as operations_ListModelsUserRequest$outboundSchema, ListModelsUserResponse$inboundSchema as operations_ListModelsUserResponse$inboundSchema } from "../models/operations/listmodelsuser.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
@@ -101,7 +101,7 @@ async function $do(client, security, request, options) {
|
|
|
101
101
|
};
|
|
102
102
|
const [result, raw] = await M.match(M.json(200, operations_ListModelsUserResponse$inboundSchema, {
|
|
103
103
|
key: "Result",
|
|
104
|
-
}), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
104
|
+
}), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
105
105
|
if (!result.ok) {
|
|
106
106
|
return [haltIterator(result), {
|
|
107
107
|
status: "complete",
|
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.5.
|
|
53
|
+
readonly sdkVersion: "1.5.19";
|
|
54
54
|
readonly genVersion: "2.948.4";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.19 2.948.4 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.5.
|
|
32
|
+
sdkVersion: "1.5.19",
|
|
33
33
|
genVersion: "2.948.4",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.19 2.948.4 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -83,6 +83,7 @@ export declare const BYOKProviderSlug: {
|
|
|
83
83
|
readonly Openai: "openai";
|
|
84
84
|
readonly Parasail: "parasail";
|
|
85
85
|
readonly ParetoAlpha: "pareto-alpha";
|
|
86
|
+
readonly ParticleAi: "particle-ai";
|
|
86
87
|
readonly Perceptron: "perceptron";
|
|
87
88
|
readonly Perplexity: "perplexity";
|
|
88
89
|
readonly Phala: "phala";
|
|
@@ -48,6 +48,10 @@ export type CreateGuardrailRequest = {
|
|
|
48
48
|
* Whether this guardrail allows paid endpoints that train on request data.
|
|
49
49
|
*/
|
|
50
50
|
enablePaidModelTraining?: boolean | null | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Whether coding harnesses list only their vendor's own models: Codex lists OpenAI models and Claude Code and Claude Desktop list Anthropic models. Affects only the model list those harnesses request from GET /models; a model the client names directly is still routed. Any true across the workspace default, member, and API key guardrails applies.
|
|
53
|
+
*/
|
|
54
|
+
enforceFirstPartyHarnessModels?: boolean | null | undefined;
|
|
51
55
|
/**
|
|
52
56
|
* Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
|
|
53
57
|
*
|
|
@@ -116,6 +120,7 @@ export type CreateGuardrailRequest$Outbound = {
|
|
|
116
120
|
enable_free_model_publication?: boolean | null | undefined;
|
|
117
121
|
enable_free_model_training?: boolean | null | undefined;
|
|
118
122
|
enable_paid_model_training?: boolean | null | undefined;
|
|
123
|
+
enforce_first_party_harness_models?: boolean | null | undefined;
|
|
119
124
|
enforce_zdr?: boolean | null | undefined;
|
|
120
125
|
enforce_zdr_anthropic?: boolean | null | undefined;
|
|
121
126
|
enforce_zdr_google?: boolean | null | undefined;
|
|
@@ -23,6 +23,7 @@ export const CreateGuardrailRequest$outboundSchema = z.object({
|
|
|
23
23
|
enableFreeModelPublication: z.nullable(z.boolean()).optional(),
|
|
24
24
|
enableFreeModelTraining: z.nullable(z.boolean()).optional(),
|
|
25
25
|
enablePaidModelTraining: z.nullable(z.boolean()).optional(),
|
|
26
|
+
enforceFirstPartyHarnessModels: z.nullable(z.boolean()).optional(),
|
|
26
27
|
enforceZdr: z.nullable(z.boolean()).optional(),
|
|
27
28
|
enforceZdrAnthropic: z.nullable(z.boolean()).optional(),
|
|
28
29
|
enforceZdrGoogle: z.nullable(z.boolean()).optional(),
|
|
@@ -48,6 +49,7 @@ export const CreateGuardrailRequest$outboundSchema = z.object({
|
|
|
48
49
|
enableFreeModelPublication: "enable_free_model_publication",
|
|
49
50
|
enableFreeModelTraining: "enable_free_model_training",
|
|
50
51
|
enablePaidModelTraining: "enable_paid_model_training",
|
|
52
|
+
enforceFirstPartyHarnessModels: "enforce_first_party_harness_models",
|
|
51
53
|
enforceZdr: "enforce_zdr",
|
|
52
54
|
enforceZdrAnthropic: "enforce_zdr_anthropic",
|
|
53
55
|
enforceZdrGoogle: "enforce_zdr_google",
|
|
@@ -54,6 +54,10 @@ export type Guardrail = {
|
|
|
54
54
|
* Whether this guardrail allows paid endpoints that train on request data.
|
|
55
55
|
*/
|
|
56
56
|
enablePaidModelTraining?: boolean | null | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Whether coding harnesses list only their vendor's own models: Codex lists OpenAI models and Claude Code and Claude Desktop list Anthropic models. Affects only the model list those harnesses request from GET /models; a model the client names directly is still routed. Any true across the workspace default, member, and API key guardrails applies.
|
|
59
|
+
*/
|
|
60
|
+
enforceFirstPartyHarnessModels?: boolean | null | undefined;
|
|
57
61
|
/**
|
|
58
62
|
* Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
|
|
59
63
|
*
|
package/esm/models/guardrail.js
CHANGED
|
@@ -25,6 +25,7 @@ export const Guardrail$inboundSchema = z.object({
|
|
|
25
25
|
enable_free_model_publication: z.nullable(z.boolean()).optional(),
|
|
26
26
|
enable_free_model_training: z.nullable(z.boolean()).optional(),
|
|
27
27
|
enable_paid_model_training: z.nullable(z.boolean()).optional(),
|
|
28
|
+
enforce_first_party_harness_models: z.nullable(z.boolean()).optional(),
|
|
28
29
|
enforce_zdr: z.nullable(z.boolean()).optional(),
|
|
29
30
|
enforce_zdr_anthropic: z.nullable(z.boolean()).optional(),
|
|
30
31
|
enforce_zdr_google: z.nullable(z.boolean()).optional(),
|
|
@@ -53,6 +54,7 @@ export const Guardrail$inboundSchema = z.object({
|
|
|
53
54
|
"enable_free_model_publication": "enableFreeModelPublication",
|
|
54
55
|
"enable_free_model_training": "enableFreeModelTraining",
|
|
55
56
|
"enable_paid_model_training": "enablePaidModelTraining",
|
|
57
|
+
"enforce_first_party_harness_models": "enforceFirstPartyHarnessModels",
|
|
56
58
|
"enforce_zdr": "enforceZdr",
|
|
57
59
|
"enforce_zdr_anthropic": "enforceZdrAnthropic",
|
|
58
60
|
"enforce_zdr_google": "enforceZdrGoogle",
|
|
@@ -311,6 +311,9 @@ export type ImageGenerationProviderPreferencesOptions = {
|
|
|
311
311
|
paretoAlpha?: {
|
|
312
312
|
[k: string]: any;
|
|
313
313
|
} | undefined;
|
|
314
|
+
particleAi?: {
|
|
315
|
+
[k: string]: any;
|
|
316
|
+
} | undefined;
|
|
314
317
|
perceptron?: {
|
|
315
318
|
[k: string]: any;
|
|
316
319
|
} | undefined;
|
|
@@ -806,6 +809,9 @@ export type ImageGenerationProviderPreferencesOptions$Outbound = {
|
|
|
806
809
|
"pareto-alpha"?: {
|
|
807
810
|
[k: string]: any;
|
|
808
811
|
} | undefined;
|
|
812
|
+
"particle-ai"?: {
|
|
813
|
+
[k: string]: any;
|
|
814
|
+
} | undefined;
|
|
809
815
|
perceptron?: {
|
|
810
816
|
[k: string]: any;
|
|
811
817
|
} | undefined;
|
|
@@ -120,6 +120,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
|
|
|
120
120
|
openai: z.record(z.string(), z.any()).optional(),
|
|
121
121
|
parasail: z.record(z.string(), z.any()).optional(),
|
|
122
122
|
paretoAlpha: z.record(z.string(), z.any()).optional(),
|
|
123
|
+
particleAi: z.record(z.string(), z.any()).optional(),
|
|
123
124
|
perceptron: z.record(z.string(), z.any()).optional(),
|
|
124
125
|
perplexity: z.record(z.string(), z.any()).optional(),
|
|
125
126
|
phala: z.record(z.string(), z.any()).optional(),
|
|
@@ -194,6 +195,7 @@ export const ImageGenerationProviderPreferencesOptions$outboundSchema = z.object
|
|
|
194
195
|
nexAgi: "nex-agi",
|
|
195
196
|
openInference: "open-inference",
|
|
196
197
|
paretoAlpha: "pareto-alpha",
|
|
198
|
+
particleAi: "particle-ai",
|
|
197
199
|
sailResearch: "sail-research",
|
|
198
200
|
sakanaAi: "sakana-ai",
|
|
199
201
|
sambanovaCloaked: "sambanova-cloaked",
|
|
@@ -107,6 +107,7 @@ export declare const Provider: {
|
|
|
107
107
|
readonly Openai: "openai";
|
|
108
108
|
readonly Parasail: "parasail";
|
|
109
109
|
readonly ParetoAlpha: "pareto-alpha";
|
|
110
|
+
readonly ParticleAi: "particle-ai";
|
|
110
111
|
readonly Perceptron: "perceptron";
|
|
111
112
|
readonly Perplexity: "perplexity";
|
|
112
113
|
readonly Phala: "phala";
|
|
@@ -7,7 +7,7 @@ export type OrganizationSettings = {
|
|
|
7
7
|
*/
|
|
8
8
|
id: string;
|
|
9
9
|
/**
|
|
10
|
-
* When true, `GET /api/v1/models` called with
|
|
10
|
+
* When true, the signed-in dashboard lists only the models the organization can use. `GET /api/v1/models` called with an API key always returns only the models that key can use, whatever this setting says; anonymous requests receive the public catalog.
|
|
11
11
|
*/
|
|
12
12
|
isFilteredModelCatalogEnabled: boolean;
|
|
13
13
|
};
|
|
@@ -80,6 +80,7 @@ export declare const ProviderName: {
|
|
|
80
80
|
readonly OpenInference: "OpenInference";
|
|
81
81
|
readonly Parasail: "Parasail";
|
|
82
82
|
readonly ParetoAlpha: "ParetoAlpha";
|
|
83
|
+
readonly ParticleAI: "Particle AI";
|
|
83
84
|
readonly Poolside: "Poolside";
|
|
84
85
|
readonly PrimaLabs: "PrimaLabs";
|
|
85
86
|
readonly PrimeIntellect: "PrimeIntellect";
|
|
@@ -306,6 +306,9 @@ export type ProviderOptions = {
|
|
|
306
306
|
paretoAlpha?: {
|
|
307
307
|
[k: string]: any;
|
|
308
308
|
} | undefined;
|
|
309
|
+
particleAi?: {
|
|
310
|
+
[k: string]: any;
|
|
311
|
+
} | undefined;
|
|
309
312
|
perceptron?: {
|
|
310
313
|
[k: string]: any;
|
|
311
314
|
} | undefined;
|
|
@@ -756,6 +759,9 @@ export type ProviderOptions$Outbound = {
|
|
|
756
759
|
"pareto-alpha"?: {
|
|
757
760
|
[k: string]: any;
|
|
758
761
|
} | undefined;
|
|
762
|
+
"particle-ai"?: {
|
|
763
|
+
[k: string]: any;
|
|
764
|
+
} | undefined;
|
|
759
765
|
perceptron?: {
|
|
760
766
|
[k: string]: any;
|
|
761
767
|
} | undefined;
|
|
@@ -107,6 +107,7 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
107
107
|
openai: z.record(z.string(), z.any()).optional(),
|
|
108
108
|
parasail: z.record(z.string(), z.any()).optional(),
|
|
109
109
|
paretoAlpha: z.record(z.string(), z.any()).optional(),
|
|
110
|
+
particleAi: z.record(z.string(), z.any()).optional(),
|
|
110
111
|
perceptron: z.record(z.string(), z.any()).optional(),
|
|
111
112
|
perplexity: z.record(z.string(), z.any()).optional(),
|
|
112
113
|
phala: z.record(z.string(), z.any()).optional(),
|
|
@@ -181,6 +182,7 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
181
182
|
nexAgi: "nex-agi",
|
|
182
183
|
openInference: "open-inference",
|
|
183
184
|
paretoAlpha: "pareto-alpha",
|
|
185
|
+
particleAi: "particle-ai",
|
|
184
186
|
sailResearch: "sail-research",
|
|
185
187
|
sakanaAi: "sakana-ai",
|
|
186
188
|
sambanovaCloaked: "sambanova-cloaked",
|
|
@@ -113,6 +113,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
113
113
|
readonly OpenInference: "OpenInference";
|
|
114
114
|
readonly Parasail: "Parasail";
|
|
115
115
|
readonly ParetoAlpha: "ParetoAlpha";
|
|
116
|
+
readonly ParticleAI: "Particle AI";
|
|
116
117
|
readonly Poolside: "Poolside";
|
|
117
118
|
readonly PrimaLabs: "PrimaLabs";
|
|
118
119
|
readonly PrimeIntellect: "PrimeIntellect";
|
|
@@ -117,6 +117,7 @@ export const ProviderResponseProviderName = {
|
|
|
117
117
|
OpenInference: "OpenInference",
|
|
118
118
|
Parasail: "Parasail",
|
|
119
119
|
ParetoAlpha: "ParetoAlpha",
|
|
120
|
+
ParticleAI: "Particle AI",
|
|
120
121
|
Poolside: "Poolside",
|
|
121
122
|
PrimaLabs: "PrimaLabs",
|
|
122
123
|
PrimeIntellect: "PrimeIntellect",
|
|
@@ -48,6 +48,10 @@ export type UpdateGuardrailRequest = {
|
|
|
48
48
|
* Whether this guardrail allows paid endpoints that train on request data.
|
|
49
49
|
*/
|
|
50
50
|
enablePaidModelTraining?: boolean | null | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Whether coding harnesses list only their vendor's own models: Codex lists OpenAI models and Claude Code and Claude Desktop list Anthropic models. Affects only the model list those harnesses request from GET /models; a model the client names directly is still routed. Any true across the workspace default, member, and API key guardrails applies.
|
|
53
|
+
*/
|
|
54
|
+
enforceFirstPartyHarnessModels?: boolean | null | undefined;
|
|
51
55
|
/**
|
|
52
56
|
* Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, enforce_zdr_xai, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request.
|
|
53
57
|
*
|
|
@@ -112,6 +116,7 @@ export type UpdateGuardrailRequest$Outbound = {
|
|
|
112
116
|
enable_free_model_publication?: boolean | null | undefined;
|
|
113
117
|
enable_free_model_training?: boolean | null | undefined;
|
|
114
118
|
enable_paid_model_training?: boolean | null | undefined;
|
|
119
|
+
enforce_first_party_harness_models?: boolean | null | undefined;
|
|
115
120
|
enforce_zdr?: boolean | null | undefined;
|
|
116
121
|
enforce_zdr_anthropic?: boolean | null | undefined;
|
|
117
122
|
enforce_zdr_google?: boolean | null | undefined;
|
|
@@ -23,6 +23,7 @@ export const UpdateGuardrailRequest$outboundSchema = z.object({
|
|
|
23
23
|
enableFreeModelPublication: z.nullable(z.boolean()).optional(),
|
|
24
24
|
enableFreeModelTraining: z.nullable(z.boolean()).optional(),
|
|
25
25
|
enablePaidModelTraining: z.nullable(z.boolean()).optional(),
|
|
26
|
+
enforceFirstPartyHarnessModels: z.nullable(z.boolean()).optional(),
|
|
26
27
|
enforceZdr: z.nullable(z.boolean()).optional(),
|
|
27
28
|
enforceZdrAnthropic: z.nullable(z.boolean()).optional(),
|
|
28
29
|
enforceZdrGoogle: z.nullable(z.boolean()).optional(),
|
|
@@ -47,6 +48,7 @@ export const UpdateGuardrailRequest$outboundSchema = z.object({
|
|
|
47
48
|
enableFreeModelPublication: "enable_free_model_publication",
|
|
48
49
|
enableFreeModelTraining: "enable_free_model_training",
|
|
49
50
|
enablePaidModelTraining: "enable_paid_model_training",
|
|
51
|
+
enforceFirstPartyHarnessModels: "enforce_first_party_harness_models",
|
|
50
52
|
enforceZdr: "enforce_zdr",
|
|
51
53
|
enforceZdrAnthropic: "enforce_zdr_anthropic",
|
|
52
54
|
enforceZdrGoogle: "enforce_zdr_google",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
export type UpdateOrganizationSettingsRequest = {
|
|
3
3
|
/**
|
|
4
|
-
* When true, `GET /api/v1/models` called with
|
|
4
|
+
* When true, the signed-in dashboard lists only the models the organization can use. `GET /api/v1/models` called with an API key always returns only the models that key can use, whatever this setting says; anonymous requests receive the public catalog.
|
|
5
5
|
*/
|
|
6
6
|
isFilteredModelCatalogEnabled: boolean;
|
|
7
7
|
};
|
|
@@ -328,6 +328,9 @@ export type VideoGenerationRequestOptions = {
|
|
|
328
328
|
paretoAlpha?: {
|
|
329
329
|
[k: string]: any;
|
|
330
330
|
} | undefined;
|
|
331
|
+
particleAi?: {
|
|
332
|
+
[k: string]: any;
|
|
333
|
+
} | undefined;
|
|
331
334
|
perceptron?: {
|
|
332
335
|
[k: string]: any;
|
|
333
336
|
} | undefined;
|
|
@@ -874,6 +877,9 @@ export type VideoGenerationRequestOptions$Outbound = {
|
|
|
874
877
|
"pareto-alpha"?: {
|
|
875
878
|
[k: string]: any;
|
|
876
879
|
} | undefined;
|
|
880
|
+
"particle-ai"?: {
|
|
881
|
+
[k: string]: any;
|
|
882
|
+
} | undefined;
|
|
877
883
|
perceptron?: {
|
|
878
884
|
[k: string]: any;
|
|
879
885
|
} | undefined;
|
|
@@ -140,6 +140,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
140
140
|
openai: z.record(z.string(), z.any()).optional(),
|
|
141
141
|
parasail: z.record(z.string(), z.any()).optional(),
|
|
142
142
|
paretoAlpha: z.record(z.string(), z.any()).optional(),
|
|
143
|
+
particleAi: z.record(z.string(), z.any()).optional(),
|
|
143
144
|
perceptron: z.record(z.string(), z.any()).optional(),
|
|
144
145
|
perplexity: z.record(z.string(), z.any()).optional(),
|
|
145
146
|
phala: z.record(z.string(), z.any()).optional(),
|
|
@@ -214,6 +215,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
214
215
|
nexAgi: "nex-agi",
|
|
215
216
|
openInference: "open-inference",
|
|
216
217
|
paretoAlpha: "pareto-alpha",
|
|
218
|
+
particleAi: "particle-ai",
|
|
217
219
|
sailResearch: "sail-research",
|
|
218
220
|
sakanaAi: "sakana-ai",
|
|
219
221
|
sambanovaCloaked: "sambanova-cloaked",
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.19",
|
|
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 && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
77
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
76
|
+
"prepare": "npm run build",
|
|
78
77
|
"test": "vitest --run --project unit",
|
|
79
|
-
"test:
|
|
78
|
+
"test:transit": "exit 0",
|
|
80
79
|
"test:watch": "vitest --watch --project unit",
|
|
81
80
|
"typecheck": "tsc --noEmit",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
83
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
84
|
+
"test:e2e": "vitest --run --project e2e"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|