@openrouter/sdk 1.5.43 → 1.5.45
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/providersListProviderEndpoints.d.ts +19 -0
- package/esm/funcs/providersListProviderEndpoints.js +108 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/endpointsummary.d.ts +65 -0
- package/esm/models/endpointsummary.js +48 -0
- package/esm/models/endpointtestprofile.d.ts +271 -0
- package/esm/models/endpointtestprofile.js +252 -0
- package/esm/models/extractions.d.ts +16 -0
- package/esm/models/extractions.js +23 -0
- package/esm/models/index.d.ts +8 -0
- package/esm/models/index.js +8 -0
- package/esm/models/operations/gettaskclassifications.d.ts +4 -4
- package/esm/models/operations/gettaskclassifications.js +3 -3
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/listproviderendpoints.d.ts +106 -0
- package/esm/models/operations/listproviderendpoints.js +55 -0
- package/esm/models/perflast30mbyworkload.d.ts +2 -0
- package/esm/models/perflast30mbyworkload.js +2 -0
- package/esm/models/providerendpoints.d.ts +34 -0
- package/esm/models/providerendpoints.js +32 -0
- package/esm/models/providerendpointsresponse.d.ts +11 -0
- package/esm/models/providerendpointsresponse.js +15 -0
- package/esm/models/providerendpointstats.d.ts +11 -0
- package/esm/models/providerendpointstats.js +17 -0
- package/esm/models/providerendpointstatsavailable.d.ts +66 -0
- package/esm/models/providerendpointstatsavailable.js +51 -0
- package/esm/models/providerendpointstatsunavailable.d.ts +10 -0
- package/esm/models/providerendpointstatsunavailable.js +14 -0
- package/esm/sdk/providers.d.ts +8 -0
- package/esm/sdk/providers.js +10 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* List a provider's endpoints with provider-wide stats
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Returns every endpoint the provider serves, hidden ones included, with the provider-wide uptime, routing, latency and throughput stats over the window. Requires provider ownership, membership, or admin access.
|
|
17
|
+
*/
|
|
18
|
+
export declare function providersListProviderEndpoints(client: OpenRouterCore, request: operations.ListProviderEndpointsRequest, options?: RequestOptions): APIPromise<Result<models.ProviderEndpointsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
|
+
//# sourceMappingURL=providersListProviderEndpoints.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 1ca2bac6860f
|
|
4
|
+
*/
|
|
5
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
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 { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.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
|
+
import { ProviderEndpointsResponse$inboundSchema as models_ProviderEndpointsResponse$inboundSchema } from "../models/providerendpointsresponse.js";
|
|
14
|
+
import { ListProviderEndpointsRequest$outboundSchema as operations_ListProviderEndpointsRequest$outboundSchema } from "../models/operations/listproviderendpoints.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* List a provider's endpoints with provider-wide stats
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Returns every endpoint the provider serves, hidden ones included, with the provider-wide uptime, routing, latency and throughput stats over the window. Requires provider ownership, membership, or admin access.
|
|
21
|
+
*/
|
|
22
|
+
export function providersListProviderEndpoints(client, request, options) {
|
|
23
|
+
return new APIPromise($do(client, request, options));
|
|
24
|
+
}
|
|
25
|
+
async function $do(client, request, options) {
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_ListProviderEndpointsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
|
+
if (!parsed.ok) {
|
|
28
|
+
return [parsed, { status: "invalid" }];
|
|
29
|
+
}
|
|
30
|
+
const payload = parsed.value;
|
|
31
|
+
const body = null;
|
|
32
|
+
const pathParams = {
|
|
33
|
+
provider_slug: encodeSimple("provider_slug", payload.provider_slug, {
|
|
34
|
+
explode: false,
|
|
35
|
+
charEncoding: "percent",
|
|
36
|
+
}),
|
|
37
|
+
};
|
|
38
|
+
const path = pathToFunc("/providers/{provider_slug}/endpoints")(pathParams);
|
|
39
|
+
const query = encodeFormQuery({
|
|
40
|
+
"perf_workload": payload.perf_workload,
|
|
41
|
+
"window": payload.window,
|
|
42
|
+
});
|
|
43
|
+
const headers = new Headers(compactMap({
|
|
44
|
+
Accept: "application/json",
|
|
45
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
46
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
47
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
48
|
+
}));
|
|
49
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
50
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
51
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52
|
+
const context = {
|
|
53
|
+
options: client._options,
|
|
54
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
55
|
+
operationID: "listProviderEndpoints",
|
|
56
|
+
oAuth2Scopes: null,
|
|
57
|
+
resolvedSecurity: requestSecurity,
|
|
58
|
+
securitySource: client._options.apiKey,
|
|
59
|
+
retryConfig: options?.retries
|
|
60
|
+
|| client._options.retryConfig
|
|
61
|
+
|| {
|
|
62
|
+
strategy: "backoff",
|
|
63
|
+
backoff: {
|
|
64
|
+
initialInterval: 500,
|
|
65
|
+
maxInterval: 60000,
|
|
66
|
+
exponent: 1.5,
|
|
67
|
+
maxElapsedTime: 3600000,
|
|
68
|
+
},
|
|
69
|
+
retryConnectionErrors: true,
|
|
70
|
+
}
|
|
71
|
+
|| { strategy: "none" },
|
|
72
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
73
|
+
};
|
|
74
|
+
const requestRes = client._createRequest(context, {
|
|
75
|
+
security: requestSecurity,
|
|
76
|
+
method: "GET",
|
|
77
|
+
baseURL: options?.serverURL,
|
|
78
|
+
path: path,
|
|
79
|
+
headers: headers,
|
|
80
|
+
query: query,
|
|
81
|
+
body: body,
|
|
82
|
+
userAgent: client._options.userAgent,
|
|
83
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
84
|
+
}, options);
|
|
85
|
+
if (!requestRes.ok) {
|
|
86
|
+
return [requestRes, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const req = requestRes.value;
|
|
89
|
+
const doResult = await client._do(req, {
|
|
90
|
+
context,
|
|
91
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
92
|
+
retryConfig: context.retryConfig,
|
|
93
|
+
retryCodes: context.retryCodes,
|
|
94
|
+
});
|
|
95
|
+
if (!doResult.ok) {
|
|
96
|
+
return [doResult, { status: "request-error", request: req }];
|
|
97
|
+
}
|
|
98
|
+
const response = doResult.value;
|
|
99
|
+
const responseFields = {
|
|
100
|
+
HttpMeta: { Response: response, Request: req },
|
|
101
|
+
};
|
|
102
|
+
const [result] = await M.match(M.json(200, models_ProviderEndpointsResponse$inboundSchema), 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(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
103
|
+
if (!result.ok) {
|
|
104
|
+
return [result, { status: "complete", request: req, response }];
|
|
105
|
+
}
|
|
106
|
+
return [result, { status: "complete", request: req, response }];
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=providersListProviderEndpoints.js.map
|
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.45";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.45 2.950.13 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.45",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.45 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { EndpointTestProfile } from "./endpointtestprofile.js";
|
|
5
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
+
/**
|
|
7
|
+
* Whether the endpoint is listed on OpenRouter
|
|
8
|
+
*/
|
|
9
|
+
export declare const Visibility: {
|
|
10
|
+
readonly Visible: "visible";
|
|
11
|
+
readonly Hidden: "hidden";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Whether the endpoint is listed on OpenRouter
|
|
15
|
+
*/
|
|
16
|
+
export type Visibility = OpenEnum<typeof Visibility>;
|
|
17
|
+
export type EndpointSummary = {
|
|
18
|
+
/**
|
|
19
|
+
* Endpoint ID
|
|
20
|
+
*/
|
|
21
|
+
endpointId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Public model slug
|
|
24
|
+
*/
|
|
25
|
+
modelSlug: string;
|
|
26
|
+
/**
|
|
27
|
+
* When the endpoint was created
|
|
28
|
+
*/
|
|
29
|
+
createdAt: string;
|
|
30
|
+
/**
|
|
31
|
+
* Permanent model slug the endpoint is listed under
|
|
32
|
+
*/
|
|
33
|
+
modelPermaslug: string;
|
|
34
|
+
/**
|
|
35
|
+
* The provider's own model ID
|
|
36
|
+
*/
|
|
37
|
+
providerModelId: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Provider name
|
|
40
|
+
*/
|
|
41
|
+
providerName: string;
|
|
42
|
+
/**
|
|
43
|
+
* Serving region
|
|
44
|
+
*/
|
|
45
|
+
providerRegion: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Service tier; null for the default tier
|
|
48
|
+
*/
|
|
49
|
+
serviceTier: string | null;
|
|
50
|
+
testProfile: EndpointTestProfile;
|
|
51
|
+
/**
|
|
52
|
+
* Endpoint variant
|
|
53
|
+
*/
|
|
54
|
+
variant: string;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the endpoint is listed on OpenRouter
|
|
57
|
+
*/
|
|
58
|
+
visibility: Visibility;
|
|
59
|
+
};
|
|
60
|
+
/** @internal */
|
|
61
|
+
export declare const Visibility$inboundSchema: z.ZodType<Visibility, unknown>;
|
|
62
|
+
/** @internal */
|
|
63
|
+
export declare const EndpointSummary$inboundSchema: z.ZodType<EndpointSummary, unknown>;
|
|
64
|
+
export declare function endpointSummaryFromJSON(jsonString: string): SafeParseResult<EndpointSummary, SDKValidationError>;
|
|
65
|
+
//# sourceMappingURL=endpointsummary.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 31dc14145629
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
import { EndpointTestProfile$inboundSchema, } from "./endpointtestprofile.js";
|
|
10
|
+
/**
|
|
11
|
+
* Whether the endpoint is listed on OpenRouter
|
|
12
|
+
*/
|
|
13
|
+
export const Visibility = {
|
|
14
|
+
Visible: "visible",
|
|
15
|
+
Hidden: "hidden",
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const Visibility$inboundSchema = openEnums.inboundSchema(Visibility);
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const EndpointSummary$inboundSchema = z.object({
|
|
21
|
+
endpoint_id: z.string(),
|
|
22
|
+
model_slug: z.string(),
|
|
23
|
+
created_at: z.string(),
|
|
24
|
+
model_permaslug: z.string(),
|
|
25
|
+
provider_model_id: z.nullable(z.string()),
|
|
26
|
+
provider_name: z.string(),
|
|
27
|
+
provider_region: z.nullable(z.string()),
|
|
28
|
+
service_tier: z.nullable(z.string()),
|
|
29
|
+
test_profile: EndpointTestProfile$inboundSchema,
|
|
30
|
+
variant: z.string(),
|
|
31
|
+
visibility: Visibility$inboundSchema,
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"endpoint_id": "endpointId",
|
|
35
|
+
"model_slug": "modelSlug",
|
|
36
|
+
"created_at": "createdAt",
|
|
37
|
+
"model_permaslug": "modelPermaslug",
|
|
38
|
+
"provider_model_id": "providerModelId",
|
|
39
|
+
"provider_name": "providerName",
|
|
40
|
+
"provider_region": "providerRegion",
|
|
41
|
+
"service_tier": "serviceTier",
|
|
42
|
+
"test_profile": "testProfile",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
export function endpointSummaryFromJSON(jsonString) {
|
|
46
|
+
return safeParse(jsonString, (x) => EndpointSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointSummary' from JSON`);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=endpointsummary.js.map
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Reasoning return mechanism the endpoint uses when neither its features nor the model set one
|
|
7
|
+
*/
|
|
8
|
+
export declare const DefaultReasoningReturnMechanism: {
|
|
9
|
+
readonly ContentString: "content-string";
|
|
10
|
+
readonly ReasoningContent: "reasoning-content";
|
|
11
|
+
readonly Reasoning: "reasoning";
|
|
12
|
+
readonly None: "none";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Reasoning return mechanism the endpoint uses when neither its features nor the model set one
|
|
16
|
+
*/
|
|
17
|
+
export type DefaultReasoningReturnMechanism = OpenEnum<typeof DefaultReasoningReturnMechanism>;
|
|
18
|
+
/**
|
|
19
|
+
* How leading instruction (developer/system) messages are mapped before reaching a chat-completions provider. 'developer' keeps the developer role, 'system' downgrades developer to system, 'user-only' downgrades both to a wrapped user message. Overridable per-endpoint.
|
|
20
|
+
*/
|
|
21
|
+
export declare const InstructionRoleSupport: {
|
|
22
|
+
readonly Developer: "developer";
|
|
23
|
+
readonly System: "system";
|
|
24
|
+
readonly UserOnly: "user-only";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* How leading instruction (developer/system) messages are mapped before reaching a chat-completions provider. 'developer' keeps the developer role, 'system' downgrades developer to system, 'user-only' downgrades both to a wrapped user message. Overridable per-endpoint.
|
|
28
|
+
*/
|
|
29
|
+
export type InstructionRoleSupport = OpenEnum<typeof InstructionRoleSupport>;
|
|
30
|
+
export type ChatTemplateConfig = {
|
|
31
|
+
/**
|
|
32
|
+
* How leading instruction (developer/system) messages are mapped before reaching a chat-completions provider. 'developer' keeps the developer role, 'system' downgrades developer to system, 'user-only' downgrades both to a wrapped user message. Overridable per-endpoint.
|
|
33
|
+
*/
|
|
34
|
+
instructionRoleSupport?: InstructionRoleSupport | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to hoist and merge system messages
|
|
37
|
+
*/
|
|
38
|
+
shouldHoistAndMergeSystemMessages?: boolean | null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the model accepts system/developer messages that appear after the first user/assistant turn. When false, mid-session instruction messages are downgraded to wrapped user messages. Overridable per-endpoint.
|
|
41
|
+
*/
|
|
42
|
+
supportsMidSessionSystem?: boolean | null | undefined;
|
|
43
|
+
};
|
|
44
|
+
export declare const FeaturesDefaultReasoningEffort: {
|
|
45
|
+
readonly Max: "max";
|
|
46
|
+
readonly Xhigh: "xhigh";
|
|
47
|
+
readonly High: "high";
|
|
48
|
+
readonly Medium: "medium";
|
|
49
|
+
readonly Low: "low";
|
|
50
|
+
readonly Minimal: "minimal";
|
|
51
|
+
};
|
|
52
|
+
export type FeaturesDefaultReasoningEffort = OpenEnum<typeof FeaturesDefaultReasoningEffort>;
|
|
53
|
+
/**
|
|
54
|
+
* Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
|
|
55
|
+
*/
|
|
56
|
+
export declare const FeaturesReasoningReturnMechanism: {
|
|
57
|
+
readonly ContentString: "content-string";
|
|
58
|
+
readonly ReasoningContent: "reasoning-content";
|
|
59
|
+
readonly Reasoning: "reasoning";
|
|
60
|
+
readonly None: "none";
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
|
|
64
|
+
*/
|
|
65
|
+
export type FeaturesReasoningReturnMechanism = OpenEnum<typeof FeaturesReasoningReturnMechanism>;
|
|
66
|
+
export declare const FeaturesSupportedReasoningEffort: {
|
|
67
|
+
readonly Max: "max";
|
|
68
|
+
readonly Xhigh: "xhigh";
|
|
69
|
+
readonly High: "high";
|
|
70
|
+
readonly Medium: "medium";
|
|
71
|
+
readonly Low: "low";
|
|
72
|
+
readonly Minimal: "minimal";
|
|
73
|
+
};
|
|
74
|
+
export type FeaturesSupportedReasoningEffort = OpenEnum<typeof FeaturesSupportedReasoningEffort>;
|
|
75
|
+
export type FeaturesReasoningConfig = {
|
|
76
|
+
defaultReasoningEffort?: FeaturesDefaultReasoningEffort | null | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Default reasoning enabled state for the model. When true, reasoning is enabled by default; when false, disabled by default. User-specified values always override this.
|
|
79
|
+
*/
|
|
80
|
+
defaultReasoningEnabled?: boolean | null | undefined;
|
|
81
|
+
endToken?: string | null | undefined;
|
|
82
|
+
isMandatoryReasoning?: boolean | null | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
|
|
85
|
+
*/
|
|
86
|
+
reasoningReturnMechanism?: FeaturesReasoningReturnMechanism | null | undefined;
|
|
87
|
+
startToken?: string | null | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* List of reasoning effort values the model accepts upstream
|
|
90
|
+
*/
|
|
91
|
+
supportedReasoningEfforts?: Array<FeaturesSupportedReasoningEffort> | null | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Whether the model supports reasoning effort
|
|
94
|
+
*/
|
|
95
|
+
supportsReasoningEffort?: boolean | null | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the model supports reasoning max tokens
|
|
98
|
+
*/
|
|
99
|
+
supportsReasoningMaxTokens?: boolean | null | undefined;
|
|
100
|
+
systemPrompt?: string | null | undefined;
|
|
101
|
+
};
|
|
102
|
+
export declare const RequiredInputModality: {
|
|
103
|
+
readonly Text: "text";
|
|
104
|
+
readonly Image: "image";
|
|
105
|
+
readonly Audio: "audio";
|
|
106
|
+
readonly Video: "video";
|
|
107
|
+
};
|
|
108
|
+
export type RequiredInputModality = OpenEnum<typeof RequiredInputModality>;
|
|
109
|
+
export type Features = {
|
|
110
|
+
chatTemplateConfig?: ChatTemplateConfig | null | undefined;
|
|
111
|
+
reasoningConfig?: FeaturesReasoningConfig | null | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Input modalities every request to the model must include, e.g. ["video"] for video-to-video-only models. Requests missing a required modality are rejected before dispatch. A required text modality is satisfied by the prompt. Currently enforced on the video generation request path.
|
|
114
|
+
*/
|
|
115
|
+
requiredInputModalities?: Array<RequiredInputModality> | null | undefined;
|
|
116
|
+
};
|
|
117
|
+
export declare const EndpointTestProfileInputModality: {
|
|
118
|
+
readonly Text: "text";
|
|
119
|
+
readonly Image: "image";
|
|
120
|
+
readonly File: "file";
|
|
121
|
+
readonly Audio: "audio";
|
|
122
|
+
readonly Video: "video";
|
|
123
|
+
};
|
|
124
|
+
export type EndpointTestProfileInputModality = OpenEnum<typeof EndpointTestProfileInputModality>;
|
|
125
|
+
export declare const EndpointTestProfileOutputModality: {
|
|
126
|
+
readonly Text: "text";
|
|
127
|
+
readonly Image: "image";
|
|
128
|
+
readonly Embeddings: "embeddings";
|
|
129
|
+
readonly Audio: "audio";
|
|
130
|
+
readonly Video: "video";
|
|
131
|
+
readonly Rerank: "rerank";
|
|
132
|
+
readonly Decisions: "decisions";
|
|
133
|
+
readonly Speech: "speech";
|
|
134
|
+
readonly Transcription: "transcription";
|
|
135
|
+
};
|
|
136
|
+
export type EndpointTestProfileOutputModality = OpenEnum<typeof EndpointTestProfileOutputModality>;
|
|
137
|
+
export declare const DefaultReasoningEffort: {
|
|
138
|
+
readonly Max: "max";
|
|
139
|
+
readonly Xhigh: "xhigh";
|
|
140
|
+
readonly High: "high";
|
|
141
|
+
readonly Medium: "medium";
|
|
142
|
+
readonly Low: "low";
|
|
143
|
+
readonly Minimal: "minimal";
|
|
144
|
+
};
|
|
145
|
+
export type DefaultReasoningEffort = OpenEnum<typeof DefaultReasoningEffort>;
|
|
146
|
+
/**
|
|
147
|
+
* Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
|
|
148
|
+
*/
|
|
149
|
+
export declare const ReasoningReturnMechanism: {
|
|
150
|
+
readonly ContentString: "content-string";
|
|
151
|
+
readonly ReasoningContent: "reasoning-content";
|
|
152
|
+
readonly Reasoning: "reasoning";
|
|
153
|
+
readonly None: "none";
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
|
|
157
|
+
*/
|
|
158
|
+
export type ReasoningReturnMechanism = OpenEnum<typeof ReasoningReturnMechanism>;
|
|
159
|
+
export declare const SupportedReasoningEffort: {
|
|
160
|
+
readonly Max: "max";
|
|
161
|
+
readonly Xhigh: "xhigh";
|
|
162
|
+
readonly High: "high";
|
|
163
|
+
readonly Medium: "medium";
|
|
164
|
+
readonly Low: "low";
|
|
165
|
+
readonly Minimal: "minimal";
|
|
166
|
+
};
|
|
167
|
+
export type SupportedReasoningEffort = OpenEnum<typeof SupportedReasoningEffort>;
|
|
168
|
+
export type EndpointTestProfileReasoningConfig = {
|
|
169
|
+
defaultReasoningEffort?: DefaultReasoningEffort | null | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* Default reasoning enabled state for the model. When true, reasoning is enabled by default; when false, disabled by default. User-specified values always override this.
|
|
172
|
+
*/
|
|
173
|
+
defaultReasoningEnabled?: boolean | null | undefined;
|
|
174
|
+
endToken?: string | null | undefined;
|
|
175
|
+
isMandatoryReasoning?: boolean | null | undefined;
|
|
176
|
+
/**
|
|
177
|
+
* Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
|
|
178
|
+
*/
|
|
179
|
+
reasoningReturnMechanism?: ReasoningReturnMechanism | null | undefined;
|
|
180
|
+
startToken?: string | null | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* List of reasoning effort values the model accepts upstream
|
|
183
|
+
*/
|
|
184
|
+
supportedReasoningEfforts?: Array<SupportedReasoningEffort> | null | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* Whether the model supports reasoning effort
|
|
187
|
+
*/
|
|
188
|
+
supportsReasoningEffort?: boolean | null | undefined;
|
|
189
|
+
/**
|
|
190
|
+
* Whether the model supports reasoning max tokens
|
|
191
|
+
*/
|
|
192
|
+
supportsReasoningMaxTokens?: boolean | null | undefined;
|
|
193
|
+
systemPrompt?: string | null | undefined;
|
|
194
|
+
};
|
|
195
|
+
export type EndpointTestProfileModel = {
|
|
196
|
+
features: Features | null;
|
|
197
|
+
inputModalities: Array<EndpointTestProfileInputModality>;
|
|
198
|
+
outputModalities: Array<EndpointTestProfileOutputModality>;
|
|
199
|
+
reasoningConfig: EndpointTestProfileReasoningConfig | null;
|
|
200
|
+
/**
|
|
201
|
+
* Public model slug
|
|
202
|
+
*/
|
|
203
|
+
slug: string;
|
|
204
|
+
supportsReasoning: boolean;
|
|
205
|
+
};
|
|
206
|
+
export type EndpointTestProfile = {
|
|
207
|
+
/**
|
|
208
|
+
* Context length the endpoint serves: its override, else the model's
|
|
209
|
+
*/
|
|
210
|
+
contextLength: number | null;
|
|
211
|
+
/**
|
|
212
|
+
* Reasoning return mechanism the endpoint uses when neither its features nor the model set one
|
|
213
|
+
*/
|
|
214
|
+
defaultReasoningReturnMechanism: DefaultReasoningReturnMechanism | null;
|
|
215
|
+
/**
|
|
216
|
+
* Adapter the endpoint is served through: its provider override, else the provider's; null when unresolved
|
|
217
|
+
*/
|
|
218
|
+
effectiveAdapterName: string | null;
|
|
219
|
+
/**
|
|
220
|
+
* Endpoint feature flags; null when unset or invalid
|
|
221
|
+
*/
|
|
222
|
+
endpointFeatures: {
|
|
223
|
+
[k: string]: any;
|
|
224
|
+
} | null;
|
|
225
|
+
/**
|
|
226
|
+
* Whether the endpoint serves a closed lab model through the lab or an official partner
|
|
227
|
+
*/
|
|
228
|
+
isLabTrusted: boolean;
|
|
229
|
+
model: EndpointTestProfileModel;
|
|
230
|
+
};
|
|
231
|
+
/** @internal */
|
|
232
|
+
export declare const DefaultReasoningReturnMechanism$inboundSchema: z.ZodType<DefaultReasoningReturnMechanism, unknown>;
|
|
233
|
+
/** @internal */
|
|
234
|
+
export declare const InstructionRoleSupport$inboundSchema: z.ZodType<InstructionRoleSupport, unknown>;
|
|
235
|
+
/** @internal */
|
|
236
|
+
export declare const ChatTemplateConfig$inboundSchema: z.ZodType<ChatTemplateConfig, unknown>;
|
|
237
|
+
export declare function chatTemplateConfigFromJSON(jsonString: string): SafeParseResult<ChatTemplateConfig, SDKValidationError>;
|
|
238
|
+
/** @internal */
|
|
239
|
+
export declare const FeaturesDefaultReasoningEffort$inboundSchema: z.ZodType<FeaturesDefaultReasoningEffort, unknown>;
|
|
240
|
+
/** @internal */
|
|
241
|
+
export declare const FeaturesReasoningReturnMechanism$inboundSchema: z.ZodType<FeaturesReasoningReturnMechanism, unknown>;
|
|
242
|
+
/** @internal */
|
|
243
|
+
export declare const FeaturesSupportedReasoningEffort$inboundSchema: z.ZodType<FeaturesSupportedReasoningEffort, unknown>;
|
|
244
|
+
/** @internal */
|
|
245
|
+
export declare const FeaturesReasoningConfig$inboundSchema: z.ZodType<FeaturesReasoningConfig, unknown>;
|
|
246
|
+
export declare function featuresReasoningConfigFromJSON(jsonString: string): SafeParseResult<FeaturesReasoningConfig, SDKValidationError>;
|
|
247
|
+
/** @internal */
|
|
248
|
+
export declare const RequiredInputModality$inboundSchema: z.ZodType<RequiredInputModality, unknown>;
|
|
249
|
+
/** @internal */
|
|
250
|
+
export declare const Features$inboundSchema: z.ZodType<Features, unknown>;
|
|
251
|
+
export declare function featuresFromJSON(jsonString: string): SafeParseResult<Features, SDKValidationError>;
|
|
252
|
+
/** @internal */
|
|
253
|
+
export declare const EndpointTestProfileInputModality$inboundSchema: z.ZodType<EndpointTestProfileInputModality, unknown>;
|
|
254
|
+
/** @internal */
|
|
255
|
+
export declare const EndpointTestProfileOutputModality$inboundSchema: z.ZodType<EndpointTestProfileOutputModality, unknown>;
|
|
256
|
+
/** @internal */
|
|
257
|
+
export declare const DefaultReasoningEffort$inboundSchema: z.ZodType<DefaultReasoningEffort, unknown>;
|
|
258
|
+
/** @internal */
|
|
259
|
+
export declare const ReasoningReturnMechanism$inboundSchema: z.ZodType<ReasoningReturnMechanism, unknown>;
|
|
260
|
+
/** @internal */
|
|
261
|
+
export declare const SupportedReasoningEffort$inboundSchema: z.ZodType<SupportedReasoningEffort, unknown>;
|
|
262
|
+
/** @internal */
|
|
263
|
+
export declare const EndpointTestProfileReasoningConfig$inboundSchema: z.ZodType<EndpointTestProfileReasoningConfig, unknown>;
|
|
264
|
+
export declare function endpointTestProfileReasoningConfigFromJSON(jsonString: string): SafeParseResult<EndpointTestProfileReasoningConfig, SDKValidationError>;
|
|
265
|
+
/** @internal */
|
|
266
|
+
export declare const EndpointTestProfileModel$inboundSchema: z.ZodType<EndpointTestProfileModel, unknown>;
|
|
267
|
+
export declare function endpointTestProfileModelFromJSON(jsonString: string): SafeParseResult<EndpointTestProfileModel, SDKValidationError>;
|
|
268
|
+
/** @internal */
|
|
269
|
+
export declare const EndpointTestProfile$inboundSchema: z.ZodType<EndpointTestProfile, unknown>;
|
|
270
|
+
export declare function endpointTestProfileFromJSON(jsonString: string): SafeParseResult<EndpointTestProfile, SDKValidationError>;
|
|
271
|
+
//# sourceMappingURL=endpointtestprofile.d.ts.map
|