@openrouter/sdk 0.13.43 → 0.13.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/byokList.js +1 -1
- package/esm/funcs/embeddingsListModels.d.ts +4 -2
- package/esm/funcs/embeddingsListModels.js +45 -8
- package/esm/funcs/guardrailsList.js +1 -1
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +1 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +1 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +1 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +1 -1
- package/esm/funcs/modelsList.d.ts +4 -2
- package/esm/funcs/modelsList.js +39 -7
- package/esm/funcs/modelsListForUser.d.ts +4 -2
- package/esm/funcs/modelsListForUser.js +45 -8
- package/esm/funcs/observabilityList.js +1 -1
- package/esm/funcs/organizationListMembers.js +1 -1
- package/esm/funcs/presetsList.js +1 -1
- package/esm/funcs/presetsListVersions.js +1 -1
- package/esm/funcs/workspacesList.js +1 -1
- package/esm/funcs/workspacesListMembers.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/additionaltoolsitem.d.ts +5 -5
- package/esm/models/additionaltoolsitem.js +3 -3
- package/esm/models/anthropiccitationsearchresultlocationparam.d.ts +24 -0
- package/esm/models/{anthropiccitationsearchresultlocation.js → anthropiccitationsearchresultlocationparam.js} +5 -5
- package/esm/models/anthropiccitationwebsearchresultlocationparam.d.ts +20 -0
- package/esm/models/{anthropiccitationwebsearchresultlocation.js → anthropiccitationwebsearchresultlocationparam.js} +5 -5
- package/esm/models/anthropictextblockparam.d.ts +6 -6
- package/esm/models/anthropictextblockparam.js +6 -6
- package/esm/models/chatformatjsonobjectconfig.d.ts +15 -0
- package/esm/models/chatformatjsonobjectconfig.js +13 -0
- package/esm/models/chatrequest.d.ts +5 -5
- package/esm/models/chatrequest.js +3 -3
- package/esm/models/createobservabilitydestinationrequest.d.ts +3 -3
- package/esm/models/createobservabilitydestinationrequest.js +2 -2
- package/esm/models/imageinputmodality.d.ts +13 -0
- package/esm/models/imageinputmodality.js +15 -0
- package/esm/models/imagemodelarchitecture.d.ts +2 -2
- package/esm/models/imagemodelarchitecture.js +2 -2
- package/esm/models/index.d.ts +9 -2
- package/esm/models/index.js +9 -2
- package/esm/models/legacychatcontentvideo.d.ts +3 -3
- package/esm/models/legacychatcontentvideo.js +3 -3
- package/esm/models/legacychatcontentvideoinput.d.ts +23 -0
- package/esm/models/legacychatcontentvideoinput.js +21 -0
- package/esm/models/messagesrequest.d.ts +5 -5
- package/esm/models/messagesrequest.js +3 -3
- package/esm/models/messagessearchmodelsservertool.d.ts +28 -0
- package/esm/models/messagessearchmodelsservertool.js +20 -0
- package/esm/models/modelarchitecture.d.ts +2 -35
- package/esm/models/modelarchitecture.js +2 -32
- package/esm/models/modelslistresponse.d.ts +20 -0
- package/esm/models/modelslistresponse.js +14 -0
- package/esm/models/observabilityfilterrulegroup.d.ts +94 -0
- package/esm/models/observabilityfilterrulegroup.js +103 -0
- package/esm/models/observabilityfilterrulesconfig.d.ts +3 -100
- package/esm/models/observabilityfilterrulesconfig.js +2 -105
- package/esm/models/observabilityfilterrulesconfignullable.d.ts +18 -0
- package/esm/models/observabilityfilterrulesconfignullable.js +15 -0
- package/esm/models/operations/createembeddings.d.ts +1 -12
- package/esm/models/operations/createembeddings.js +1 -17
- package/esm/models/operations/getmodels.d.ts +19 -0
- package/esm/models/operations/getmodels.js +15 -0
- package/esm/models/operations/listbyokkeys.d.ts +2 -2
- package/esm/models/operations/listbyokkeys.js +2 -2
- package/esm/models/operations/listembeddingsmodels.d.ts +19 -0
- package/esm/models/operations/listembeddingsmodels.js +15 -0
- package/esm/models/operations/listguardrailkeyassignments.d.ts +2 -2
- package/esm/models/operations/listguardrailkeyassignments.js +2 -2
- package/esm/models/operations/listguardrailmemberassignments.d.ts +2 -2
- package/esm/models/operations/listguardrailmemberassignments.js +2 -2
- package/esm/models/operations/listguardrails.d.ts +2 -2
- package/esm/models/operations/listguardrails.js +2 -2
- package/esm/models/operations/listkeyassignments.d.ts +2 -2
- package/esm/models/operations/listkeyassignments.js +2 -2
- package/esm/models/operations/listmemberassignments.d.ts +2 -2
- package/esm/models/operations/listmemberassignments.js +2 -2
- package/esm/models/operations/listmodelsuser.d.ts +19 -0
- package/esm/models/operations/listmodelsuser.js +15 -0
- package/esm/models/operations/listobservabilitydestinations.d.ts +2 -2
- package/esm/models/operations/listobservabilitydestinations.js +2 -2
- package/esm/models/operations/listorganizationmembers.d.ts +2 -2
- package/esm/models/operations/listorganizationmembers.js +2 -2
- package/esm/models/operations/listpresets.d.ts +2 -2
- package/esm/models/operations/listpresets.js +2 -2
- package/esm/models/operations/listpresetversions.d.ts +2 -2
- package/esm/models/operations/listpresetversions.js +2 -2
- package/esm/models/operations/listworkspacemembers.d.ts +2 -2
- package/esm/models/operations/listworkspacemembers.js +2 -2
- package/esm/models/operations/listworkspaces.d.ts +2 -2
- package/esm/models/operations/listworkspaces.js +2 -2
- package/esm/models/responsesrequest.d.ts +5 -5
- package/esm/models/responsesrequest.js +3 -3
- package/esm/models/searchmodelsservertoolopenrouter.d.ts +28 -0
- package/esm/models/searchmodelsservertoolopenrouter.js +20 -0
- package/esm/models/updateobservabilitydestinationrequest.d.ts +3 -3
- package/esm/models/updateobservabilitydestinationrequest.js +2 -2
- package/esm/sdk/embeddings.d.ts +4 -2
- package/esm/sdk/embeddings.js +2 -1
- package/esm/sdk/models.d.ts +7 -2
- package/esm/sdk/models.js +3 -2
- package/jsr.json +1 -1
- package/package.json +8 -8
- package/esm/models/anthropiccitationsearchresultlocation.d.ts +0 -24
- package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +0 -20
package/esm/funcs/byokList.js
CHANGED
|
@@ -115,7 +115,7 @@ async function $do(client, request, options) {
|
|
|
115
115
|
if (!Array.isArray(results) || !results.length) {
|
|
116
116
|
return { next: () => null };
|
|
117
117
|
}
|
|
118
|
-
const limit = request?.limit ??
|
|
118
|
+
const limit = request?.limit ?? 50;
|
|
119
119
|
if (results.length < limit) {
|
|
120
120
|
return { next: () => null };
|
|
121
121
|
}
|
|
@@ -5,15 +5,17 @@ import * as errors from "../models/errors/index.js";
|
|
|
5
5
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
6
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
7
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
-
import * as models from "../models/index.js";
|
|
9
8
|
import * as operations from "../models/operations/index.js";
|
|
10
9
|
import { APIPromise } from "../types/async.js";
|
|
11
10
|
import { Result } from "../types/fp.js";
|
|
11
|
+
import { PageIterator } from "../types/operations.js";
|
|
12
12
|
/**
|
|
13
13
|
* List all embeddings models
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* Returns a list of all available embeddings models and their properties
|
|
17
17
|
*/
|
|
18
|
-
export declare function embeddingsListModels(client: OpenRouterCore, request?: operations.ListEmbeddingsModelsRequest | undefined, options?: RequestOptions): APIPromise<Result<
|
|
18
|
+
export declare function embeddingsListModels(client: OpenRouterCore, request?: operations.ListEmbeddingsModelsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListEmbeddingsModelsResponse, errors.BadRequestResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
|
+
offset: number;
|
|
20
|
+
}>>;
|
|
19
21
|
//# sourceMappingURL=embeddingsListModels.d.ts.map
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
* @generated-id: dbe9751f8369
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { dlv } from "../lib/dlv.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
6
7
|
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -10,9 +11,9 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
12
|
import { pathToFunc } from "../lib/url.js";
|
|
12
13
|
import * as errors from "../models/errors/index.js";
|
|
13
|
-
import * as models from "../models/index.js";
|
|
14
14
|
import * as operations from "../models/operations/index.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
|
+
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
16
17
|
/**
|
|
17
18
|
* List all embeddings models
|
|
18
19
|
*
|
|
@@ -25,11 +26,15 @@ export function embeddingsListModels(client, request, options) {
|
|
|
25
26
|
async function $do(client, request, options) {
|
|
26
27
|
const parsed = safeParse(request, (value) => operations.ListEmbeddingsModelsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
27
28
|
if (!parsed.ok) {
|
|
28
|
-
return [parsed, { status: "invalid" }];
|
|
29
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
29
30
|
}
|
|
30
31
|
const payload = parsed.value;
|
|
31
32
|
const body = null;
|
|
32
33
|
const path = pathToFunc("/embeddings/models")();
|
|
34
|
+
const query = encodeFormQuery({
|
|
35
|
+
"limit": payload?.limit,
|
|
36
|
+
"offset": payload?.offset,
|
|
37
|
+
});
|
|
33
38
|
const headers = new Headers(compactMap({
|
|
34
39
|
Accept: "application/json",
|
|
35
40
|
"HTTP-Referer": encodeSimple("HTTP-Referer", payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
@@ -67,12 +72,13 @@ async function $do(client, request, options) {
|
|
|
67
72
|
baseURL: options?.serverURL,
|
|
68
73
|
path: path,
|
|
69
74
|
headers: headers,
|
|
75
|
+
query: query,
|
|
70
76
|
body: body,
|
|
71
77
|
userAgent: client._options.userAgent,
|
|
72
78
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
73
79
|
}, options);
|
|
74
80
|
if (!requestRes.ok) {
|
|
75
|
-
return [requestRes, { status: "invalid" }];
|
|
81
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
76
82
|
}
|
|
77
83
|
const req = requestRes.value;
|
|
78
84
|
const doResult = await client._do(req, {
|
|
@@ -82,16 +88,47 @@ async function $do(client, request, options) {
|
|
|
82
88
|
retryCodes: context.retryCodes,
|
|
83
89
|
});
|
|
84
90
|
if (!doResult.ok) {
|
|
85
|
-
return [doResult, { status: "request-error", request: req }];
|
|
91
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
86
92
|
}
|
|
87
93
|
const response = doResult.value;
|
|
88
94
|
const responseFields = {
|
|
89
95
|
HttpMeta: { Response: response, Request: req },
|
|
90
96
|
};
|
|
91
|
-
const [result] = await M.match(M.json(200,
|
|
97
|
+
const [result, raw] = await M.match(M.json(200, operations.ListEmbeddingsModelsResponse$inboundSchema, {
|
|
98
|
+
key: "Result",
|
|
99
|
+
}), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
92
100
|
if (!result.ok) {
|
|
93
|
-
return [result, {
|
|
101
|
+
return [haltIterator(result), {
|
|
102
|
+
status: "complete",
|
|
103
|
+
request: req,
|
|
104
|
+
response,
|
|
105
|
+
}];
|
|
94
106
|
}
|
|
95
|
-
|
|
107
|
+
const nextFunc = (responseData) => {
|
|
108
|
+
const offset = request?.offset ?? 0;
|
|
109
|
+
if (!responseData) {
|
|
110
|
+
return { next: () => null };
|
|
111
|
+
}
|
|
112
|
+
const results = dlv(responseData, "data");
|
|
113
|
+
if (!Array.isArray(results) || !results.length) {
|
|
114
|
+
return { next: () => null };
|
|
115
|
+
}
|
|
116
|
+
const limit = request?.limit ?? 500;
|
|
117
|
+
if (results.length < limit) {
|
|
118
|
+
return { next: () => null };
|
|
119
|
+
}
|
|
120
|
+
const nextOffset = offset + results.length;
|
|
121
|
+
const nextVal = () => embeddingsListModels(client, {
|
|
122
|
+
...request,
|
|
123
|
+
offset: nextOffset,
|
|
124
|
+
}, options);
|
|
125
|
+
return { next: nextVal, "~next": { offset: nextOffset } };
|
|
126
|
+
};
|
|
127
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
128
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
129
|
+
status: "complete",
|
|
130
|
+
request: req,
|
|
131
|
+
response,
|
|
132
|
+
}];
|
|
96
133
|
}
|
|
97
134
|
//# sourceMappingURL=embeddingsListModels.js.map
|
|
@@ -114,7 +114,7 @@ async function $do(client, request, options) {
|
|
|
114
114
|
if (!Array.isArray(results) || !results.length) {
|
|
115
115
|
return { next: () => null };
|
|
116
116
|
}
|
|
117
|
-
const limit = request?.limit ??
|
|
117
|
+
const limit = request?.limit ?? 50;
|
|
118
118
|
if (results.length < limit) {
|
|
119
119
|
return { next: () => null };
|
|
120
120
|
}
|
|
@@ -119,7 +119,7 @@ async function $do(client, request, options) {
|
|
|
119
119
|
if (!Array.isArray(results) || !results.length) {
|
|
120
120
|
return { next: () => null };
|
|
121
121
|
}
|
|
122
|
-
const limit = request?.limit ??
|
|
122
|
+
const limit = request?.limit ?? 50;
|
|
123
123
|
if (results.length < limit) {
|
|
124
124
|
return { next: () => null };
|
|
125
125
|
}
|
|
@@ -117,7 +117,7 @@ async function $do(client, request, options) {
|
|
|
117
117
|
if (!Array.isArray(results) || !results.length) {
|
|
118
118
|
return { next: () => null };
|
|
119
119
|
}
|
|
120
|
-
const limit = request?.limit ??
|
|
120
|
+
const limit = request?.limit ?? 50;
|
|
121
121
|
if (results.length < limit) {
|
|
122
122
|
return { next: () => null };
|
|
123
123
|
}
|
|
@@ -113,7 +113,7 @@ async function $do(client, request, options) {
|
|
|
113
113
|
if (!Array.isArray(results) || !results.length) {
|
|
114
114
|
return { next: () => null };
|
|
115
115
|
}
|
|
116
|
-
const limit = request?.limit ??
|
|
116
|
+
const limit = request?.limit ?? 50;
|
|
117
117
|
if (results.length < limit) {
|
|
118
118
|
return { next: () => null };
|
|
119
119
|
}
|
|
@@ -113,7 +113,7 @@ async function $do(client, request, options) {
|
|
|
113
113
|
if (!Array.isArray(results) || !results.length) {
|
|
114
114
|
return { next: () => null };
|
|
115
115
|
}
|
|
116
|
-
const limit = request?.limit ??
|
|
116
|
+
const limit = request?.limit ?? 50;
|
|
117
117
|
if (results.length < limit) {
|
|
118
118
|
return { next: () => null };
|
|
119
119
|
}
|
|
@@ -5,12 +5,14 @@ import * as errors from "../models/errors/index.js";
|
|
|
5
5
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
6
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
7
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
-
import * as models from "../models/index.js";
|
|
9
8
|
import * as operations from "../models/operations/index.js";
|
|
10
9
|
import { APIPromise } from "../types/async.js";
|
|
11
10
|
import { Result } from "../types/fp.js";
|
|
11
|
+
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<Result<
|
|
15
|
+
export declare function modelsList(client: OpenRouterCore, request?: operations.GetModelsRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.GetModelsResponse, errors.BadRequestResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
16
|
+
offset: number;
|
|
17
|
+
}>>;
|
|
16
18
|
//# sourceMappingURL=modelsList.d.ts.map
|
package/esm/funcs/modelsList.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
* @generated-id: deff050b46c5
|
|
4
4
|
*/
|
|
5
|
+
import { dlv } from "../lib/dlv.js";
|
|
5
6
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
6
7
|
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
@@ -10,9 +11,9 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
12
|
import { pathToFunc } from "../lib/url.js";
|
|
12
13
|
import * as errors from "../models/errors/index.js";
|
|
13
|
-
import * as models from "../models/index.js";
|
|
14
14
|
import * as operations from "../models/operations/index.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
|
+
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
16
17
|
/**
|
|
17
18
|
* List all models and their properties
|
|
18
19
|
*/
|
|
@@ -22,7 +23,7 @@ export function modelsList(client, request, options) {
|
|
|
22
23
|
async function $do(client, request, options) {
|
|
23
24
|
const parsed = safeParse(request, (value) => operations.GetModelsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
24
25
|
if (!parsed.ok) {
|
|
25
|
-
return [parsed, { status: "invalid" }];
|
|
26
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
26
27
|
}
|
|
27
28
|
const payload = parsed.value;
|
|
28
29
|
const body = null;
|
|
@@ -33,6 +34,7 @@ async function $do(client, request, options) {
|
|
|
33
34
|
"context": payload?.context,
|
|
34
35
|
"distillable": payload?.distillable,
|
|
35
36
|
"input_modalities": payload?.input_modalities,
|
|
37
|
+
"limit": payload?.limit,
|
|
36
38
|
"max_age_days": payload?.max_age_days,
|
|
37
39
|
"max_agentic_index": payload?.max_agentic_index,
|
|
38
40
|
"max_coding_index": payload?.max_coding_index,
|
|
@@ -48,6 +50,7 @@ async function $do(client, request, options) {
|
|
|
48
50
|
"min_price": payload?.min_price,
|
|
49
51
|
"min_tool_success_rate": payload?.min_tool_success_rate,
|
|
50
52
|
"model_authors": payload?.model_authors,
|
|
53
|
+
"offset": payload?.offset,
|
|
51
54
|
"output_modalities": payload?.output_modalities,
|
|
52
55
|
"providers": payload?.providers,
|
|
53
56
|
"q": payload?.q,
|
|
@@ -99,7 +102,7 @@ async function $do(client, request, options) {
|
|
|
99
102
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
100
103
|
}, options);
|
|
101
104
|
if (!requestRes.ok) {
|
|
102
|
-
return [requestRes, { status: "invalid" }];
|
|
105
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
103
106
|
}
|
|
104
107
|
const req = requestRes.value;
|
|
105
108
|
const doResult = await client._do(req, {
|
|
@@ -109,16 +112,45 @@ async function $do(client, request, options) {
|
|
|
109
112
|
retryCodes: context.retryCodes,
|
|
110
113
|
});
|
|
111
114
|
if (!doResult.ok) {
|
|
112
|
-
return [doResult, { status: "request-error", request: req }];
|
|
115
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
113
116
|
}
|
|
114
117
|
const response = doResult.value;
|
|
115
118
|
const responseFields = {
|
|
116
119
|
HttpMeta: { Response: response, Request: req },
|
|
117
120
|
};
|
|
118
|
-
const [result] = await M.match(M.json(200,
|
|
121
|
+
const [result, raw] = await M.match(M.json(200, operations.GetModelsResponse$inboundSchema, { key: "Result" }), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
119
122
|
if (!result.ok) {
|
|
120
|
-
return [result, {
|
|
123
|
+
return [haltIterator(result), {
|
|
124
|
+
status: "complete",
|
|
125
|
+
request: req,
|
|
126
|
+
response,
|
|
127
|
+
}];
|
|
121
128
|
}
|
|
122
|
-
|
|
129
|
+
const nextFunc = (responseData) => {
|
|
130
|
+
const offset = request?.offset ?? 0;
|
|
131
|
+
if (!responseData) {
|
|
132
|
+
return { next: () => null };
|
|
133
|
+
}
|
|
134
|
+
const results = dlv(responseData, "data");
|
|
135
|
+
if (!Array.isArray(results) || !results.length) {
|
|
136
|
+
return { next: () => null };
|
|
137
|
+
}
|
|
138
|
+
const limit = request?.limit ?? 500;
|
|
139
|
+
if (results.length < limit) {
|
|
140
|
+
return { next: () => null };
|
|
141
|
+
}
|
|
142
|
+
const nextOffset = offset + results.length;
|
|
143
|
+
const nextVal = () => modelsList(client, {
|
|
144
|
+
...request,
|
|
145
|
+
offset: nextOffset,
|
|
146
|
+
}, options);
|
|
147
|
+
return { next: nextVal, "~next": { offset: nextOffset } };
|
|
148
|
+
};
|
|
149
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
150
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
151
|
+
status: "complete",
|
|
152
|
+
request: req,
|
|
153
|
+
response,
|
|
154
|
+
}];
|
|
123
155
|
}
|
|
124
156
|
//# sourceMappingURL=modelsList.js.map
|
|
@@ -5,15 +5,17 @@ import * as errors from "../models/errors/index.js";
|
|
|
5
5
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
6
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
7
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
-
import * as models from "../models/index.js";
|
|
9
8
|
import * as operations from "../models/operations/index.js";
|
|
10
9
|
import { APIPromise } from "../types/async.js";
|
|
11
10
|
import { Result } from "../types/fp.js";
|
|
11
|
+
import { PageIterator } from "../types/operations.js";
|
|
12
12
|
/**
|
|
13
13
|
* List models filtered by user provider preferences, privacy settings, and guardrails
|
|
14
14
|
*
|
|
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). If requesting through `eu.openrouter.ai/api/v1/...` the results will be filtered to models that satisfy [EU in-region routing](https://openrouter.ai/docs/guides/privacy/provider-logging#enterprise-eu-in-region-routing).
|
|
17
17
|
*/
|
|
18
|
-
export declare function modelsListForUser(client: OpenRouterCore, security: operations.ListModelsUserSecurity, request?: operations.ListModelsUserRequest | undefined, options?: RequestOptions): APIPromise<Result<
|
|
18
|
+
export declare function modelsListForUser(client: OpenRouterCore, security: operations.ListModelsUserSecurity, request?: operations.ListModelsUserRequest | undefined, options?: RequestOptions): APIPromise<PageIterator<Result<operations.ListModelsUserResponse, errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>, {
|
|
19
|
+
offset: number;
|
|
20
|
+
}>>;
|
|
19
21
|
//# sourceMappingURL=modelsListForUser.d.ts.map
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
* @generated-id: db628dd3c179
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { dlv } from "../lib/dlv.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
6
7
|
import { matchStatusCode } from "../lib/http.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
8
9
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -10,9 +11,9 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
11
|
import { resolveSecurity } from "../lib/security.js";
|
|
11
12
|
import { pathToFunc } from "../lib/url.js";
|
|
12
13
|
import * as errors from "../models/errors/index.js";
|
|
13
|
-
import * as models from "../models/index.js";
|
|
14
14
|
import * as operations from "../models/operations/index.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
|
+
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
16
17
|
/**
|
|
17
18
|
* List models filtered by user provider preferences, privacy settings, and guardrails
|
|
18
19
|
*
|
|
@@ -25,11 +26,15 @@ export function modelsListForUser(client, security, request, options) {
|
|
|
25
26
|
async function $do(client, security, request, options) {
|
|
26
27
|
const parsed = safeParse(request, (value) => operations.ListModelsUserRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
27
28
|
if (!parsed.ok) {
|
|
28
|
-
return [parsed, { status: "invalid" }];
|
|
29
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
29
30
|
}
|
|
30
31
|
const payload = parsed.value;
|
|
31
32
|
const body = null;
|
|
32
33
|
const path = pathToFunc("/models/user")();
|
|
34
|
+
const query = encodeFormQuery({
|
|
35
|
+
"limit": payload?.limit,
|
|
36
|
+
"offset": payload?.offset,
|
|
37
|
+
});
|
|
33
38
|
const headers = new Headers(compactMap({
|
|
34
39
|
Accept: "application/json",
|
|
35
40
|
"HTTP-Referer": encodeSimple("HTTP-Referer", payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
@@ -71,12 +76,13 @@ async function $do(client, security, request, options) {
|
|
|
71
76
|
baseURL: options?.serverURL,
|
|
72
77
|
path: path,
|
|
73
78
|
headers: headers,
|
|
79
|
+
query: query,
|
|
74
80
|
body: body,
|
|
75
81
|
userAgent: client._options.userAgent,
|
|
76
82
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
77
83
|
}, options);
|
|
78
84
|
if (!requestRes.ok) {
|
|
79
|
-
return [requestRes, { status: "invalid" }];
|
|
85
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
80
86
|
}
|
|
81
87
|
const req = requestRes.value;
|
|
82
88
|
const doResult = await client._do(req, {
|
|
@@ -86,16 +92,47 @@ async function $do(client, security, request, options) {
|
|
|
86
92
|
retryCodes: context.retryCodes,
|
|
87
93
|
});
|
|
88
94
|
if (!doResult.ok) {
|
|
89
|
-
return [doResult, { status: "request-error", request: req }];
|
|
95
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
90
96
|
}
|
|
91
97
|
const response = doResult.value;
|
|
92
98
|
const responseFields = {
|
|
93
99
|
HttpMeta: { Response: response, Request: req },
|
|
94
100
|
};
|
|
95
|
-
const [result] = await M.match(M.json(200,
|
|
101
|
+
const [result, raw] = await M.match(M.json(200, operations.ListModelsUserResponse$inboundSchema, {
|
|
102
|
+
key: "Result",
|
|
103
|
+
}), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
96
104
|
if (!result.ok) {
|
|
97
|
-
return [result, {
|
|
105
|
+
return [haltIterator(result), {
|
|
106
|
+
status: "complete",
|
|
107
|
+
request: req,
|
|
108
|
+
response,
|
|
109
|
+
}];
|
|
98
110
|
}
|
|
99
|
-
|
|
111
|
+
const nextFunc = (responseData) => {
|
|
112
|
+
const offset = request?.offset ?? 0;
|
|
113
|
+
if (!responseData) {
|
|
114
|
+
return { next: () => null };
|
|
115
|
+
}
|
|
116
|
+
const results = dlv(responseData, "data");
|
|
117
|
+
if (!Array.isArray(results) || !results.length) {
|
|
118
|
+
return { next: () => null };
|
|
119
|
+
}
|
|
120
|
+
const limit = request?.limit ?? 500;
|
|
121
|
+
if (results.length < limit) {
|
|
122
|
+
return { next: () => null };
|
|
123
|
+
}
|
|
124
|
+
const nextOffset = offset + results.length;
|
|
125
|
+
const nextVal = () => modelsListForUser(client, security, {
|
|
126
|
+
...request,
|
|
127
|
+
offset: nextOffset,
|
|
128
|
+
}, options);
|
|
129
|
+
return { next: nextVal, "~next": { offset: nextOffset } };
|
|
130
|
+
};
|
|
131
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
132
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
133
|
+
status: "complete",
|
|
134
|
+
request: req,
|
|
135
|
+
response,
|
|
136
|
+
}];
|
|
100
137
|
}
|
|
101
138
|
//# sourceMappingURL=modelsListForUser.js.map
|
|
@@ -113,7 +113,7 @@ async function $do(client, request, options) {
|
|
|
113
113
|
if (!Array.isArray(results) || !results.length) {
|
|
114
114
|
return { next: () => null };
|
|
115
115
|
}
|
|
116
|
-
const limit = request?.limit ??
|
|
116
|
+
const limit = request?.limit ?? 50;
|
|
117
117
|
if (results.length < limit) {
|
|
118
118
|
return { next: () => null };
|
|
119
119
|
}
|
|
@@ -113,7 +113,7 @@ async function $do(client, request, options) {
|
|
|
113
113
|
if (!Array.isArray(results) || !results.length) {
|
|
114
114
|
return { next: () => null };
|
|
115
115
|
}
|
|
116
|
-
const limit = request?.limit ??
|
|
116
|
+
const limit = request?.limit ?? 50;
|
|
117
117
|
if (results.length < limit) {
|
|
118
118
|
return { next: () => null };
|
|
119
119
|
}
|
package/esm/funcs/presetsList.js
CHANGED
|
@@ -115,7 +115,7 @@ async function $do(client, request, options) {
|
|
|
115
115
|
if (!Array.isArray(results) || !results.length) {
|
|
116
116
|
return { next: () => null };
|
|
117
117
|
}
|
|
118
|
-
const limit = request?.limit ??
|
|
118
|
+
const limit = request?.limit ?? 50;
|
|
119
119
|
if (results.length < limit) {
|
|
120
120
|
return { next: () => null };
|
|
121
121
|
}
|
|
@@ -121,7 +121,7 @@ async function $do(client, request, options) {
|
|
|
121
121
|
if (!Array.isArray(results) || !results.length) {
|
|
122
122
|
return { next: () => null };
|
|
123
123
|
}
|
|
124
|
-
const limit = request?.limit ??
|
|
124
|
+
const limit = request?.limit ?? 50;
|
|
125
125
|
if (results.length < limit) {
|
|
126
126
|
return { next: () => null };
|
|
127
127
|
}
|
|
@@ -113,7 +113,7 @@ async function $do(client, request, options) {
|
|
|
113
113
|
if (!Array.isArray(results) || !results.length) {
|
|
114
114
|
return { next: () => null };
|
|
115
115
|
}
|
|
116
|
-
const limit = request?.limit ??
|
|
116
|
+
const limit = request?.limit ?? 50;
|
|
117
117
|
if (results.length < limit) {
|
|
118
118
|
return { next: () => null };
|
|
119
119
|
}
|
|
@@ -119,7 +119,7 @@ async function $do(client, request, options) {
|
|
|
119
119
|
if (!Array.isArray(results) || !results.length) {
|
|
120
120
|
return { next: () => null };
|
|
121
121
|
}
|
|
122
|
-
const limit = request?.limit ??
|
|
122
|
+
const limit = request?.limit ?? 50;
|
|
123
123
|
if (results.length < limit) {
|
|
124
124
|
return { next: () => null };
|
|
125
125
|
}
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "0.13.
|
|
52
|
+
readonly sdkVersion: "0.13.45";
|
|
53
53
|
readonly genVersion: "2.884.4";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.13.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.13.45 2.884.4 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "0.13.
|
|
29
|
+
sdkVersion: "0.13.45",
|
|
30
30
|
genVersion: "2.884.4",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.13.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.13.45 2.884.4 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -4,7 +4,6 @@ import { AdvisorServerToolOpenRouter, AdvisorServerToolOpenRouter$Outbound } fro
|
|
|
4
4
|
import { ApplyPatchServerTool, ApplyPatchServerTool$Outbound } from "./applypatchservertool.js";
|
|
5
5
|
import { ApplyPatchServerToolOpenRouter, ApplyPatchServerToolOpenRouter$Outbound } from "./applypatchservertoolopenrouter.js";
|
|
6
6
|
import { BashServerTool, BashServerTool$Outbound } from "./bashservertool.js";
|
|
7
|
-
import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
|
|
8
7
|
import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound } from "./codeinterpreterservertool.js";
|
|
9
8
|
import { CodexLocalShellTool, CodexLocalShellTool$Outbound } from "./codexlocalshelltool.js";
|
|
10
9
|
import { ComputerUseServerTool, ComputerUseServerTool$Outbound } from "./computeruseservertool.js";
|
|
@@ -19,6 +18,7 @@ import { LegacyWebSearchServerTool, LegacyWebSearchServerTool$Outbound } from ".
|
|
|
19
18
|
import { McpServerTool, McpServerTool$Outbound } from "./mcpservertool.js";
|
|
20
19
|
import { Preview20250311WebSearchServerTool, Preview20250311WebSearchServerTool$Outbound } from "./preview20250311websearchservertool.js";
|
|
21
20
|
import { PreviewWebSearchServerTool, PreviewWebSearchServerTool$Outbound } from "./previewwebsearchservertool.js";
|
|
21
|
+
import { SearchModelsServerToolOpenRouter, SearchModelsServerToolOpenRouter$Outbound } from "./searchmodelsservertoolopenrouter.js";
|
|
22
22
|
import { ShellServerTool, ShellServerTool$Outbound } from "./shellservertool.js";
|
|
23
23
|
import { ShellServerToolOpenRouter, ShellServerToolOpenRouter$Outbound } from "./shellservertoolopenrouter.js";
|
|
24
24
|
import { SubagentServerToolOpenRouter, SubagentServerToolOpenRouter$Outbound } from "./subagentservertoolopenrouter.js";
|
|
@@ -58,7 +58,7 @@ export type AdditionalToolsItemToolFunction = {
|
|
|
58
58
|
strict?: boolean | null | undefined;
|
|
59
59
|
type: AdditionalToolsItemTypeFunction;
|
|
60
60
|
};
|
|
61
|
-
export type AdditionalToolsItemToolUnion = ComputerUseServerTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter |
|
|
61
|
+
export type AdditionalToolsItemToolUnion = ComputerUseServerTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | AdditionalToolsItemTool;
|
|
62
62
|
export declare const TypeAdditionalTools: {
|
|
63
63
|
readonly AdditionalTools: "additional_tools";
|
|
64
64
|
};
|
|
@@ -69,7 +69,7 @@ export type TypeAdditionalTools = ClosedEnum<typeof TypeAdditionalTools>;
|
|
|
69
69
|
export type AdditionalToolsItem = {
|
|
70
70
|
id?: string | null | undefined;
|
|
71
71
|
role: AdditionalToolsItemRole;
|
|
72
|
-
tools: Array<ComputerUseServerTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter |
|
|
72
|
+
tools: Array<ComputerUseServerTool | AdditionalToolsItemToolFunction | FileSearchServerTool | CodeInterpreterServerTool | McpServerTool | CustomTool | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | AdvisorServerToolOpenRouter | SubagentServerToolOpenRouter | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | SearchModelsServerToolOpenRouter | WebFetchServerTool | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter | BashServerTool | ShellServerToolOpenRouter | AdditionalToolsItemTool>;
|
|
73
73
|
type: TypeAdditionalTools;
|
|
74
74
|
};
|
|
75
75
|
/** @internal */
|
|
@@ -98,7 +98,7 @@ export type AdditionalToolsItemToolFunction$Outbound = {
|
|
|
98
98
|
export declare const AdditionalToolsItemToolFunction$outboundSchema: z.ZodType<AdditionalToolsItemToolFunction$Outbound, AdditionalToolsItemToolFunction>;
|
|
99
99
|
export declare function additionalToolsItemToolFunctionToJSON(additionalToolsItemToolFunction: AdditionalToolsItemToolFunction): string;
|
|
100
100
|
/** @internal */
|
|
101
|
-
export type AdditionalToolsItemToolUnion$Outbound = ComputerUseServerTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound |
|
|
101
|
+
export type AdditionalToolsItemToolUnion$Outbound = ComputerUseServerTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | AdditionalToolsItemTool$Outbound;
|
|
102
102
|
/** @internal */
|
|
103
103
|
export declare const AdditionalToolsItemToolUnion$outboundSchema: z.ZodType<AdditionalToolsItemToolUnion$Outbound, AdditionalToolsItemToolUnion>;
|
|
104
104
|
export declare function additionalToolsItemToolUnionToJSON(additionalToolsItemToolUnion: AdditionalToolsItemToolUnion): string;
|
|
@@ -108,7 +108,7 @@ export declare const TypeAdditionalTools$outboundSchema: z.ZodEnum<typeof TypeAd
|
|
|
108
108
|
export type AdditionalToolsItem$Outbound = {
|
|
109
109
|
id?: string | null | undefined;
|
|
110
110
|
role: string;
|
|
111
|
-
tools: Array<ComputerUseServerTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound |
|
|
111
|
+
tools: Array<ComputerUseServerTool$Outbound | AdditionalToolsItemToolFunction$Outbound | FileSearchServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | CustomTool$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | AdvisorServerToolOpenRouter$Outbound | SubagentServerToolOpenRouter$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | SearchModelsServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound | BashServerTool$Outbound | ShellServerToolOpenRouter$Outbound | AdditionalToolsItemTool$Outbound>;
|
|
112
112
|
type: string;
|
|
113
113
|
};
|
|
114
114
|
/** @internal */
|
|
@@ -9,7 +9,6 @@ import { AdvisorServerToolOpenRouter$outboundSchema, } from "./advisorservertool
|
|
|
9
9
|
import { ApplyPatchServerTool$outboundSchema, } from "./applypatchservertool.js";
|
|
10
10
|
import { ApplyPatchServerToolOpenRouter$outboundSchema, } from "./applypatchservertoolopenrouter.js";
|
|
11
11
|
import { BashServerTool$outboundSchema, } from "./bashservertool.js";
|
|
12
|
-
import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
|
|
13
12
|
import { CodeInterpreterServerTool$outboundSchema, } from "./codeinterpreterservertool.js";
|
|
14
13
|
import { CodexLocalShellTool$outboundSchema, } from "./codexlocalshelltool.js";
|
|
15
14
|
import { ComputerUseServerTool$outboundSchema, } from "./computeruseservertool.js";
|
|
@@ -24,6 +23,7 @@ import { LegacyWebSearchServerTool$outboundSchema, } from "./legacywebsearchserv
|
|
|
24
23
|
import { McpServerTool$outboundSchema, } from "./mcpservertool.js";
|
|
25
24
|
import { Preview20250311WebSearchServerTool$outboundSchema, } from "./preview20250311websearchservertool.js";
|
|
26
25
|
import { PreviewWebSearchServerTool$outboundSchema, } from "./previewwebsearchservertool.js";
|
|
26
|
+
import { SearchModelsServerToolOpenRouter$outboundSchema, } from "./searchmodelsservertoolopenrouter.js";
|
|
27
27
|
import { ShellServerTool$outboundSchema, } from "./shellservertool.js";
|
|
28
28
|
import { ShellServerToolOpenRouter$outboundSchema, } from "./shellservertoolopenrouter.js";
|
|
29
29
|
import { SubagentServerToolOpenRouter$outboundSchema, } from "./subagentservertoolopenrouter.js";
|
|
@@ -98,7 +98,7 @@ export const AdditionalToolsItemToolUnion$outboundSchema = z.union([
|
|
|
98
98
|
FilesServerTool$outboundSchema,
|
|
99
99
|
FusionServerToolOpenRouter$outboundSchema,
|
|
100
100
|
ImageGenerationServerToolOpenRouter$outboundSchema,
|
|
101
|
-
|
|
101
|
+
SearchModelsServerToolOpenRouter$outboundSchema,
|
|
102
102
|
WebFetchServerTool$outboundSchema,
|
|
103
103
|
WebSearchServerToolOpenRouter$outboundSchema,
|
|
104
104
|
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
@@ -136,7 +136,7 @@ export const AdditionalToolsItem$outboundSchema = z.object({
|
|
|
136
136
|
FilesServerTool$outboundSchema,
|
|
137
137
|
FusionServerToolOpenRouter$outboundSchema,
|
|
138
138
|
ImageGenerationServerToolOpenRouter$outboundSchema,
|
|
139
|
-
|
|
139
|
+
SearchModelsServerToolOpenRouter$outboundSchema,
|
|
140
140
|
WebFetchServerTool$outboundSchema,
|
|
141
141
|
WebSearchServerToolOpenRouter$outboundSchema,
|
|
142
142
|
ApplyPatchServerToolOpenRouter$outboundSchema,
|