@openrouter/sdk 0.5.1 → 0.9.11
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/FUNCTIONS.md +5 -1
- package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
- package/esm/funcs/analyticsGetUserActivity.js +4 -2
- package/esm/funcs/apiKeysCreate.d.ts +1 -1
- package/esm/funcs/apiKeysCreate.js +5 -3
- package/esm/funcs/apiKeysDelete.d.ts +1 -1
- package/esm/funcs/apiKeysDelete.js +3 -1
- package/esm/funcs/apiKeysGet.d.ts +1 -1
- package/esm/funcs/apiKeysGet.js +3 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +14 -3
- package/esm/funcs/apiKeysList.d.ts +1 -1
- package/esm/funcs/apiKeysList.js +4 -2
- package/esm/funcs/apiKeysUpdate.d.ts +1 -1
- package/esm/funcs/apiKeysUpdate.js +3 -1
- package/esm/funcs/betaResponsesSend.d.ts +9 -5
- package/esm/funcs/betaResponsesSend.js +10 -5
- package/esm/funcs/chatSend.d.ts +11 -7
- package/esm/funcs/chatSend.js +28 -7
- package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -2
- package/esm/funcs/creditsCreateCoinbaseCharge.js +7 -4
- package/esm/funcs/creditsGetCredits.d.ts +2 -2
- package/esm/funcs/creditsGetCredits.js +15 -4
- package/esm/funcs/embeddingsGenerate.js +4 -2
- package/esm/funcs/embeddingsListModels.d.ts +2 -1
- package/esm/funcs/embeddingsListModels.js +15 -3
- package/esm/funcs/endpointsList.js +2 -0
- package/esm/funcs/endpointsListZdrEndpoints.d.ts +1 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +14 -3
- package/esm/funcs/generationsGetGeneration.js +3 -1
- package/esm/funcs/guardrailsBulkAssignKeys.d.ts +1 -1
- package/esm/funcs/guardrailsBulkAssignKeys.js +3 -1
- package/esm/funcs/guardrailsBulkAssignMembers.d.ts +1 -1
- package/esm/funcs/guardrailsBulkAssignMembers.js +3 -1
- package/esm/funcs/guardrailsBulkUnassignKeys.d.ts +1 -1
- package/esm/funcs/guardrailsBulkUnassignKeys.js +3 -1
- package/esm/funcs/guardrailsBulkUnassignMembers.d.ts +1 -1
- package/esm/funcs/guardrailsBulkUnassignMembers.js +3 -1
- package/esm/funcs/guardrailsCreate.d.ts +1 -1
- package/esm/funcs/guardrailsCreate.js +5 -3
- package/esm/funcs/guardrailsDelete.d.ts +1 -1
- package/esm/funcs/guardrailsDelete.js +3 -1
- package/esm/funcs/guardrailsGet.d.ts +1 -1
- package/esm/funcs/guardrailsGet.js +3 -1
- package/esm/funcs/guardrailsList.d.ts +1 -1
- package/esm/funcs/guardrailsList.js +4 -2
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +3 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +3 -1
- package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +4 -2
- package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +4 -2
- package/esm/funcs/guardrailsUpdate.d.ts +1 -1
- package/esm/funcs/guardrailsUpdate.js +3 -1
- package/esm/funcs/modelsCount.d.ts +2 -1
- package/esm/funcs/modelsCount.js +15 -3
- package/esm/funcs/modelsList.js +3 -1
- package/esm/funcs/modelsListForUser.d.ts +1 -1
- package/esm/funcs/modelsListForUser.js +15 -3
- package/esm/funcs/oAuthCreateAuthCode.js +4 -2
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +4 -2
- package/esm/funcs/providersList.d.ts +1 -1
- package/esm/funcs/providersList.js +14 -3
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/model-result.d.ts +3 -5
- package/esm/lib/model-result.js +98 -46
- package/esm/models/assistantmessage.d.ts +47 -36
- package/esm/models/assistantmessage.js +35 -47
- package/esm/models/assistantmessageimages.d.ts +33 -0
- package/esm/models/assistantmessageimages.js +44 -0
- package/esm/models/chatgenerationparams.d.ts +318 -182
- package/esm/models/chatgenerationparams.js +157 -143
- package/esm/models/chatgenerationtokenusage.d.ts +48 -0
- package/esm/models/chatmessagecontentitem.d.ts +15 -10
- package/esm/models/chatmessagecontentitem.js +25 -4
- package/esm/models/chatmessagecontentitemaudio.d.ts +20 -2
- package/esm/models/chatmessagecontentitemaudio.js +9 -2
- package/esm/models/chatmessagecontentitemcachecontrol.d.ts +14 -3
- package/esm/models/chatmessagecontentitemcachecontrol.js +9 -2
- package/esm/models/chatmessagecontentitemimage.d.ts +26 -3
- package/esm/models/chatmessagecontentitemimage.js +12 -2
- package/esm/models/chatmessagecontentitemtext.d.ts +17 -2
- package/esm/models/chatmessagecontentitemtext.js +9 -2
- package/esm/models/chatmessagecontentitemvideo.d.ts +12 -55
- package/esm/models/chatmessagecontentitemvideo.js +5 -72
- package/esm/models/chatmessagecontentitemvideolegacy.d.ts +28 -0
- package/esm/models/chatmessagecontentitemvideolegacy.js +33 -0
- package/esm/models/chatmessagetokenlogprob.d.ts +15 -0
- package/esm/models/chatmessagetokenlogprobs.d.ts +9 -0
- package/esm/models/chatmessagetoolcall.d.ts +23 -2
- package/esm/models/chatmessagetoolcall.js +9 -2
- package/esm/models/chatresponse.d.ts +29 -1
- package/esm/models/chatresponse.js +6 -1
- package/esm/models/chatresponsechoice.d.ts +13 -2
- package/esm/models/chatresponsechoice.js +1 -2
- package/esm/models/chatstreamingchoice.d.ts +13 -2
- package/esm/models/chatstreamingchoice.js +1 -2
- package/esm/models/chatstreamingmessagechunk.d.ts +29 -2
- package/esm/models/chatstreamingmessagechunk.js +5 -2
- package/esm/models/chatstreamingmessagetoolcall.d.ts +38 -1
- package/esm/models/chatstreamingmessagetoolcall.js +9 -1
- package/esm/models/chatstreamingresponsechunk.d.ts +45 -11
- package/esm/models/chatstreamingresponsechunk.js +11 -25
- package/esm/models/chatstreamoptions.d.ts +8 -0
- package/esm/models/debugoptions.d.ts +18 -0
- package/esm/models/debugoptions.js +18 -0
- package/esm/models/developermessage.d.ts +35 -0
- package/esm/models/developermessage.js +24 -0
- package/esm/models/errors/index.d.ts +0 -1
- package/esm/models/errors/index.js +0 -1
- package/esm/models/index.d.ts +13 -5
- package/esm/models/index.js +13 -5
- package/esm/models/jsonschemaconfig.d.ts +17 -2
- package/esm/models/jsonschemaconfig.js +1 -1
- package/esm/models/message.d.ts +10 -23
- package/esm/models/message.js +3 -20
- package/esm/models/modelscountresponse.d.ts +4 -4
- package/esm/models/modelscountresponse.js +4 -4
- package/esm/models/namedtoolchoice.d.ts +15 -2
- package/esm/models/namedtoolchoice.js +6 -1
- package/esm/models/openairesponsesreasoningconfig.d.ts +1 -1
- package/esm/models/openairesponsesreasoningconfig.js +1 -1
- package/esm/models/openresponsesnonstreamingresponse.d.ts +4 -4
- package/esm/models/openresponsesnonstreamingresponse.js +3 -3
- package/esm/models/openresponsesreasoning.d.ts +2 -2
- package/esm/models/openresponsesreasoning.js +1 -1
- package/esm/models/openresponsesreasoningconfig.d.ts +2 -2
- package/esm/models/openresponsesreasoningconfig.js +1 -1
- package/esm/models/openresponsesrequest.d.ts +31 -13
- package/esm/models/openresponsesrequest.js +25 -0
- package/esm/models/operations/bulkassignkeystoguardrail.d.ts +30 -0
- package/esm/models/operations/bulkassignkeystoguardrail.js +4 -0
- package/esm/models/operations/bulkassignmemberstoguardrail.d.ts +30 -0
- package/esm/models/operations/bulkassignmemberstoguardrail.js +4 -0
- package/esm/models/operations/bulkunassignkeysfromguardrail.d.ts +30 -0
- package/esm/models/operations/bulkunassignkeysfromguardrail.js +4 -0
- package/esm/models/operations/bulkunassignmembersfromguardrail.d.ts +30 -0
- package/esm/models/operations/bulkunassignmembersfromguardrail.js +4 -0
- package/esm/models/operations/createauthkeyscode.d.ts +66 -2
- package/esm/models/operations/createauthkeyscode.js +30 -1
- package/esm/models/operations/createcoinbasecharge.d.ts +41 -0
- package/esm/models/operations/createcoinbasecharge.js +16 -0
- package/esm/models/operations/createembeddings.d.ts +42 -2
- package/esm/models/operations/createembeddings.js +16 -1
- package/esm/models/operations/createguardrail.d.ts +42 -2
- package/esm/models/operations/createguardrail.js +16 -1
- package/esm/models/operations/createkeys.d.ts +42 -2
- package/esm/models/operations/createkeys.js +16 -1
- package/esm/models/operations/createresponses.d.ts +40 -0
- package/esm/models/operations/createresponses.js +16 -0
- package/esm/models/operations/deleteguardrail.d.ts +30 -0
- package/esm/models/operations/deleteguardrail.js +8 -0
- package/esm/models/operations/deletekeys.d.ts +30 -0
- package/esm/models/operations/deletekeys.js +8 -0
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +42 -2
- package/esm/models/operations/exchangeauthcodeforapikey.js +16 -1
- package/esm/models/operations/getcredits.d.ts +38 -0
- package/esm/models/operations/getcredits.js +13 -0
- package/esm/models/operations/getcurrentkey.d.ts +45 -1
- package/esm/models/operations/getcurrentkey.js +15 -0
- package/esm/models/operations/getgeneration.d.ts +153 -0
- package/esm/models/operations/getgeneration.js +135 -0
- package/esm/models/operations/getguardrail.d.ts +30 -0
- package/esm/models/operations/getguardrail.js +7 -0
- package/esm/models/operations/getkey.d.ts +30 -0
- package/esm/models/operations/getkey.js +7 -0
- package/esm/models/operations/getmodels.d.ts +30 -0
- package/esm/models/operations/getmodels.js +4 -0
- package/esm/models/operations/getuseractivity.d.ts +30 -0
- package/esm/models/operations/getuseractivity.js +8 -0
- package/esm/models/operations/index.d.ts +2 -0
- package/esm/models/operations/index.js +2 -0
- package/esm/models/operations/list.d.ts +30 -0
- package/esm/models/operations/list.js +4 -0
- package/esm/models/operations/listembeddingsmodels.d.ts +40 -0
- package/esm/models/operations/listembeddingsmodels.js +20 -0
- package/esm/models/operations/listendpoints.d.ts +30 -0
- package/esm/models/operations/listendpoints.js +8 -0
- package/esm/models/operations/listendpointszdr.d.ts +38 -0
- package/esm/models/operations/listendpointszdr.js +14 -0
- package/esm/models/operations/listguardrailkeyassignments.d.ts +30 -0
- package/esm/models/operations/listguardrailkeyassignments.js +7 -0
- package/esm/models/operations/listguardrailmemberassignments.d.ts +30 -0
- package/esm/models/operations/listguardrailmemberassignments.js +7 -0
- package/esm/models/operations/listguardrails.d.ts +30 -0
- package/esm/models/operations/listguardrails.js +7 -0
- package/esm/models/operations/listkeyassignments.d.ts +30 -0
- package/esm/models/operations/listkeyassignments.js +7 -0
- package/esm/models/operations/listmemberassignments.d.ts +30 -0
- package/esm/models/operations/listmemberassignments.js +7 -0
- package/esm/models/operations/listmodelscount.d.ts +40 -0
- package/esm/models/operations/listmodelscount.js +20 -0
- package/esm/models/operations/listmodelsuser.d.ts +38 -0
- package/esm/models/operations/listmodelsuser.js +14 -0
- package/esm/models/operations/listproviders.d.ts +38 -0
- package/esm/models/operations/listproviders.js +13 -0
- package/esm/models/operations/sendchatcompletionrequest.d.ts +53 -1
- package/esm/models/operations/sendchatcompletionrequest.js +36 -2
- package/esm/models/operations/updateguardrail.d.ts +30 -0
- package/esm/models/operations/updateguardrail.js +4 -0
- package/esm/models/operations/updatekeys.d.ts +30 -0
- package/esm/models/operations/updatekeys.js +4 -0
- package/esm/models/providername.d.ts +4 -0
- package/esm/models/providername.js +4 -0
- package/esm/models/providerpreferences.d.ts +46 -27
- package/esm/models/providerpreferences.js +29 -15
- package/esm/models/providersort.d.ts +6 -0
- package/esm/models/providersort.js +3 -0
- package/esm/models/providersortconfig.d.ts +30 -2
- package/esm/models/providersortconfig.js +15 -2
- package/esm/models/publicendpoint.d.ts +0 -39
- package/esm/models/publicpricing.d.ts +0 -39
- package/esm/models/reasoningdetailencrypted.d.ts +42 -0
- package/esm/models/reasoningdetailencrypted.js +42 -0
- package/esm/models/reasoningdetailsummary.d.ts +42 -0
- package/esm/models/reasoningdetailsummary.js +42 -0
- package/esm/models/reasoningdetailtext.d.ts +44 -0
- package/esm/models/reasoningdetailtext.js +44 -0
- package/esm/models/reasoningdetailunion.d.ts +19 -0
- package/esm/models/reasoningdetailunion.js +28 -0
- package/esm/models/responseformatjsonobject.d.ts +20 -0
- package/esm/models/responseformatjsonobject.js +21 -0
- package/esm/models/responseformatjsonschema.d.ts +6 -0
- package/esm/models/responseformattext.d.ts +15 -0
- package/esm/models/responseformattext.js +13 -0
- package/esm/models/responseformattextconfig.d.ts +3 -3
- package/esm/models/responseformattextconfig.js +3 -3
- package/esm/models/responseformattextgrammar.d.ts +6 -0
- package/esm/models/responseformattextpython.d.ts +15 -0
- package/esm/models/responseformattextpython.js +13 -0
- package/esm/models/responseserrorfield.d.ts +4 -4
- package/esm/models/responseserrorfield.js +4 -4
- package/esm/models/responsesoutputitemreasoning.d.ts +2 -2
- package/esm/models/responsesoutputitemreasoning.js +2 -2
- package/esm/models/systemmessage.d.ts +12 -0
- package/esm/models/toolchoiceoption.d.ts +31 -0
- package/esm/models/toolchoiceoption.js +32 -0
- package/esm/models/tooldefinitionjson.d.ts +38 -4
- package/esm/models/tooldefinitionjson.js +14 -2
- package/esm/models/toolresponsemessage.d.ts +12 -0
- package/esm/models/usermessage.d.ts +12 -0
- package/esm/models/videoinput.d.ts +23 -0
- package/esm/models/videoinput.js +22 -0
- package/esm/sdk/analytics.d.ts +1 -1
- package/esm/sdk/analytics.js +1 -1
- package/esm/sdk/apikeys.d.ts +6 -6
- package/esm/sdk/apikeys.js +7 -7
- package/esm/sdk/chat.d.ts +10 -6
- package/esm/sdk/credits.d.ts +3 -4
- package/esm/sdk/credits.js +3 -3
- package/esm/sdk/embeddings.d.ts +1 -1
- package/esm/sdk/embeddings.js +2 -2
- package/esm/sdk/endpoints.d.ts +1 -1
- package/esm/sdk/endpoints.js +2 -2
- package/esm/sdk/guardrails.d.ts +13 -13
- package/esm/sdk/guardrails.js +13 -13
- package/esm/sdk/models.d.ts +2 -2
- package/esm/sdk/models.js +4 -4
- package/esm/sdk/providers.d.ts +1 -1
- package/esm/sdk/providers.js +2 -2
- package/esm/sdk/responses.d.ts +9 -5
- package/esm/sdk/sdk.d.ts +2 -2
- package/esm/sdk/sdk.js +3 -3
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/esm/models/chaterror.d.ts +0 -17
- package/esm/models/chaterror.js +0 -25
- package/esm/models/errors/chaterror.d.ts +0 -19
- package/esm/models/errors/chaterror.js +0 -32
- package/esm/models/providersortunion.d.ts +0 -10
- package/esm/models/providersortunion.js +0 -13
- package/esm/models/responsesformatjsonobject.d.ts +0 -20
- package/esm/models/responsesformatjsonobject.js +0 -21
- package/esm/models/schema0.d.ts +0 -84
- package/esm/models/schema0.js +0 -87
- package/esm/models/schema2.d.ts +0 -92
- package/esm/models/schema2.js +0 -109
package/esm/sdk/guardrails.d.ts
CHANGED
|
@@ -5,91 +5,91 @@ export declare class Guardrails extends ClientSDK {
|
|
|
5
5
|
* List guardrails
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* List all guardrails for the authenticated user. [
|
|
8
|
+
* List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
9
9
|
*/
|
|
10
10
|
list(request?: operations.ListGuardrailsRequest | undefined, options?: RequestOptions): Promise<operations.ListGuardrailsResponse>;
|
|
11
11
|
/**
|
|
12
12
|
* Create a guardrail
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Create a new guardrail for the authenticated user. [
|
|
15
|
+
* Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
16
|
*/
|
|
17
17
|
create(request: operations.CreateGuardrailRequest, options?: RequestOptions): Promise<operations.CreateGuardrailResponse>;
|
|
18
18
|
/**
|
|
19
19
|
* Get a guardrail
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
* Get a single guardrail by ID. [
|
|
22
|
+
* Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
23
23
|
*/
|
|
24
24
|
get(request: operations.GetGuardrailRequest, options?: RequestOptions): Promise<operations.GetGuardrailResponse>;
|
|
25
25
|
/**
|
|
26
26
|
* Update a guardrail
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
* Update an existing guardrail. [
|
|
29
|
+
* Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
30
30
|
*/
|
|
31
31
|
update(request: operations.UpdateGuardrailRequest, options?: RequestOptions): Promise<operations.UpdateGuardrailResponse>;
|
|
32
32
|
/**
|
|
33
33
|
* Delete a guardrail
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
* Delete an existing guardrail. [
|
|
36
|
+
* Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
37
37
|
*/
|
|
38
38
|
delete(request: operations.DeleteGuardrailRequest, options?: RequestOptions): Promise<operations.DeleteGuardrailResponse>;
|
|
39
39
|
/**
|
|
40
40
|
* List all key assignments
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
|
-
* List all API key guardrail assignments for the authenticated user. [
|
|
43
|
+
* List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
44
44
|
*/
|
|
45
45
|
listKeyAssignments(request?: operations.ListKeyAssignmentsRequest | undefined, options?: RequestOptions): Promise<operations.ListKeyAssignmentsResponse>;
|
|
46
46
|
/**
|
|
47
47
|
* List all member assignments
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
|
-
* List all organization member guardrail assignments for the authenticated user. [
|
|
50
|
+
* List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
51
51
|
*/
|
|
52
52
|
listMemberAssignments(request?: operations.ListMemberAssignmentsRequest | undefined, options?: RequestOptions): Promise<operations.ListMemberAssignmentsResponse>;
|
|
53
53
|
/**
|
|
54
54
|
* List key assignments for a guardrail
|
|
55
55
|
*
|
|
56
56
|
* @remarks
|
|
57
|
-
* List all API key assignments for a specific guardrail. [
|
|
57
|
+
* List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
58
58
|
*/
|
|
59
59
|
listGuardrailKeyAssignments(request: operations.ListGuardrailKeyAssignmentsRequest, options?: RequestOptions): Promise<operations.ListGuardrailKeyAssignmentsResponse>;
|
|
60
60
|
/**
|
|
61
61
|
* Bulk assign keys to a guardrail
|
|
62
62
|
*
|
|
63
63
|
* @remarks
|
|
64
|
-
* Assign multiple API keys to a specific guardrail. [
|
|
64
|
+
* Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
65
65
|
*/
|
|
66
66
|
bulkAssignKeys(request: operations.BulkAssignKeysToGuardrailRequest, options?: RequestOptions): Promise<operations.BulkAssignKeysToGuardrailResponse>;
|
|
67
67
|
/**
|
|
68
68
|
* List member assignments for a guardrail
|
|
69
69
|
*
|
|
70
70
|
* @remarks
|
|
71
|
-
* List all organization member assignments for a specific guardrail. [
|
|
71
|
+
* List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
72
72
|
*/
|
|
73
73
|
listGuardrailMemberAssignments(request: operations.ListGuardrailMemberAssignmentsRequest, options?: RequestOptions): Promise<operations.ListGuardrailMemberAssignmentsResponse>;
|
|
74
74
|
/**
|
|
75
75
|
* Bulk assign members to a guardrail
|
|
76
76
|
*
|
|
77
77
|
* @remarks
|
|
78
|
-
* Assign multiple organization members to a specific guardrail. [
|
|
78
|
+
* Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
79
79
|
*/
|
|
80
80
|
bulkAssignMembers(request: operations.BulkAssignMembersToGuardrailRequest, options?: RequestOptions): Promise<operations.BulkAssignMembersToGuardrailResponse>;
|
|
81
81
|
/**
|
|
82
82
|
* Bulk unassign keys from a guardrail
|
|
83
83
|
*
|
|
84
84
|
* @remarks
|
|
85
|
-
* Unassign multiple API keys from a specific guardrail. [
|
|
85
|
+
* Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
86
86
|
*/
|
|
87
87
|
bulkUnassignKeys(request: operations.BulkUnassignKeysFromGuardrailRequest, options?: RequestOptions): Promise<operations.BulkUnassignKeysFromGuardrailResponse>;
|
|
88
88
|
/**
|
|
89
89
|
* Bulk unassign members from a guardrail
|
|
90
90
|
*
|
|
91
91
|
* @remarks
|
|
92
|
-
* Unassign multiple organization members from a specific guardrail. [
|
|
92
|
+
* Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
93
93
|
*/
|
|
94
94
|
bulkUnassignMembers(request: operations.BulkUnassignMembersFromGuardrailRequest, options?: RequestOptions): Promise<operations.BulkUnassignMembersFromGuardrailResponse>;
|
|
95
95
|
}
|
package/esm/sdk/guardrails.js
CHANGED
|
@@ -22,7 +22,7 @@ export class Guardrails extends ClientSDK {
|
|
|
22
22
|
* List guardrails
|
|
23
23
|
*
|
|
24
24
|
* @remarks
|
|
25
|
-
* List all guardrails for the authenticated user. [
|
|
25
|
+
* List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
26
26
|
*/
|
|
27
27
|
async list(request, options) {
|
|
28
28
|
return unwrapAsync(guardrailsList(this, request, options));
|
|
@@ -31,7 +31,7 @@ export class Guardrails extends ClientSDK {
|
|
|
31
31
|
* Create a guardrail
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Create a new guardrail for the authenticated user. [
|
|
34
|
+
* Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
35
35
|
*/
|
|
36
36
|
async create(request, options) {
|
|
37
37
|
return unwrapAsync(guardrailsCreate(this, request, options));
|
|
@@ -40,7 +40,7 @@ export class Guardrails extends ClientSDK {
|
|
|
40
40
|
* Get a guardrail
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
|
-
* Get a single guardrail by ID. [
|
|
43
|
+
* Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
44
44
|
*/
|
|
45
45
|
async get(request, options) {
|
|
46
46
|
return unwrapAsync(guardrailsGet(this, request, options));
|
|
@@ -49,7 +49,7 @@ export class Guardrails extends ClientSDK {
|
|
|
49
49
|
* Update a guardrail
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
* Update an existing guardrail. [
|
|
52
|
+
* Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
53
53
|
*/
|
|
54
54
|
async update(request, options) {
|
|
55
55
|
return unwrapAsync(guardrailsUpdate(this, request, options));
|
|
@@ -58,7 +58,7 @@ export class Guardrails extends ClientSDK {
|
|
|
58
58
|
* Delete a guardrail
|
|
59
59
|
*
|
|
60
60
|
* @remarks
|
|
61
|
-
* Delete an existing guardrail. [
|
|
61
|
+
* Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
62
62
|
*/
|
|
63
63
|
async delete(request, options) {
|
|
64
64
|
return unwrapAsync(guardrailsDelete(this, request, options));
|
|
@@ -67,7 +67,7 @@ export class Guardrails extends ClientSDK {
|
|
|
67
67
|
* List all key assignments
|
|
68
68
|
*
|
|
69
69
|
* @remarks
|
|
70
|
-
* List all API key guardrail assignments for the authenticated user. [
|
|
70
|
+
* List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
71
71
|
*/
|
|
72
72
|
async listKeyAssignments(request, options) {
|
|
73
73
|
return unwrapAsync(guardrailsListKeyAssignments(this, request, options));
|
|
@@ -76,7 +76,7 @@ export class Guardrails extends ClientSDK {
|
|
|
76
76
|
* List all member assignments
|
|
77
77
|
*
|
|
78
78
|
* @remarks
|
|
79
|
-
* List all organization member guardrail assignments for the authenticated user. [
|
|
79
|
+
* List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
80
80
|
*/
|
|
81
81
|
async listMemberAssignments(request, options) {
|
|
82
82
|
return unwrapAsync(guardrailsListMemberAssignments(this, request, options));
|
|
@@ -85,7 +85,7 @@ export class Guardrails extends ClientSDK {
|
|
|
85
85
|
* List key assignments for a guardrail
|
|
86
86
|
*
|
|
87
87
|
* @remarks
|
|
88
|
-
* List all API key assignments for a specific guardrail. [
|
|
88
|
+
* List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
89
89
|
*/
|
|
90
90
|
async listGuardrailKeyAssignments(request, options) {
|
|
91
91
|
return unwrapAsync(guardrailsListGuardrailKeyAssignments(this, request, options));
|
|
@@ -94,7 +94,7 @@ export class Guardrails extends ClientSDK {
|
|
|
94
94
|
* Bulk assign keys to a guardrail
|
|
95
95
|
*
|
|
96
96
|
* @remarks
|
|
97
|
-
* Assign multiple API keys to a specific guardrail. [
|
|
97
|
+
* Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
98
98
|
*/
|
|
99
99
|
async bulkAssignKeys(request, options) {
|
|
100
100
|
return unwrapAsync(guardrailsBulkAssignKeys(this, request, options));
|
|
@@ -103,7 +103,7 @@ export class Guardrails extends ClientSDK {
|
|
|
103
103
|
* List member assignments for a guardrail
|
|
104
104
|
*
|
|
105
105
|
* @remarks
|
|
106
|
-
* List all organization member assignments for a specific guardrail. [
|
|
106
|
+
* List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
107
107
|
*/
|
|
108
108
|
async listGuardrailMemberAssignments(request, options) {
|
|
109
109
|
return unwrapAsync(guardrailsListGuardrailMemberAssignments(this, request, options));
|
|
@@ -112,7 +112,7 @@ export class Guardrails extends ClientSDK {
|
|
|
112
112
|
* Bulk assign members to a guardrail
|
|
113
113
|
*
|
|
114
114
|
* @remarks
|
|
115
|
-
* Assign multiple organization members to a specific guardrail. [
|
|
115
|
+
* Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
116
116
|
*/
|
|
117
117
|
async bulkAssignMembers(request, options) {
|
|
118
118
|
return unwrapAsync(guardrailsBulkAssignMembers(this, request, options));
|
|
@@ -121,7 +121,7 @@ export class Guardrails extends ClientSDK {
|
|
|
121
121
|
* Bulk unassign keys from a guardrail
|
|
122
122
|
*
|
|
123
123
|
* @remarks
|
|
124
|
-
* Unassign multiple API keys from a specific guardrail. [
|
|
124
|
+
* Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
125
125
|
*/
|
|
126
126
|
async bulkUnassignKeys(request, options) {
|
|
127
127
|
return unwrapAsync(guardrailsBulkUnassignKeys(this, request, options));
|
|
@@ -130,7 +130,7 @@ export class Guardrails extends ClientSDK {
|
|
|
130
130
|
* Bulk unassign members from a guardrail
|
|
131
131
|
*
|
|
132
132
|
* @remarks
|
|
133
|
-
* Unassign multiple organization members from a specific guardrail. [
|
|
133
|
+
* Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
134
134
|
*/
|
|
135
135
|
async bulkUnassignMembers(request, options) {
|
|
136
136
|
return unwrapAsync(guardrailsBulkUnassignMembers(this, request, options));
|
package/esm/sdk/models.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Models extends ClientSDK {
|
|
|
5
5
|
/**
|
|
6
6
|
* Get total count of available models
|
|
7
7
|
*/
|
|
8
|
-
count(options?: RequestOptions): Promise<models.ModelsCountResponse>;
|
|
8
|
+
count(request?: operations.ListModelsCountRequest | undefined, options?: RequestOptions): Promise<models.ModelsCountResponse>;
|
|
9
9
|
/**
|
|
10
10
|
* List all models and their properties
|
|
11
11
|
*/
|
|
@@ -16,6 +16,6 @@ export declare class Models extends ClientSDK {
|
|
|
16
16
|
* @remarks
|
|
17
17
|
* List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/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/logging#enterprise-eu-in-region-routing).
|
|
18
18
|
*/
|
|
19
|
-
listForUser(security: operations.ListModelsUserSecurity, options?: RequestOptions): Promise<models.ModelsListResponse>;
|
|
19
|
+
listForUser(security: operations.ListModelsUserSecurity, request?: operations.ListModelsUserRequest | undefined, options?: RequestOptions): Promise<models.ModelsListResponse>;
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=models.d.ts.map
|
package/esm/sdk/models.js
CHANGED
|
@@ -11,8 +11,8 @@ export class Models extends ClientSDK {
|
|
|
11
11
|
/**
|
|
12
12
|
* Get total count of available models
|
|
13
13
|
*/
|
|
14
|
-
async count(options) {
|
|
15
|
-
return unwrapAsync(modelsCount(this, options));
|
|
14
|
+
async count(request, options) {
|
|
15
|
+
return unwrapAsync(modelsCount(this, request, options));
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* List all models and their properties
|
|
@@ -26,8 +26,8 @@ export class Models extends ClientSDK {
|
|
|
26
26
|
* @remarks
|
|
27
27
|
* List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/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/logging#enterprise-eu-in-region-routing).
|
|
28
28
|
*/
|
|
29
|
-
async listForUser(security, options) {
|
|
30
|
-
return unwrapAsync(modelsListForUser(this, security, options));
|
|
29
|
+
async listForUser(security, request, options) {
|
|
30
|
+
return unwrapAsync(modelsListForUser(this, security, request, options));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=models.js.map
|
package/esm/sdk/providers.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export declare class Providers extends ClientSDK {
|
|
|
4
4
|
/**
|
|
5
5
|
* List all providers
|
|
6
6
|
*/
|
|
7
|
-
list(options?: RequestOptions): Promise<operations.ListProvidersResponse>;
|
|
7
|
+
list(request?: operations.ListProvidersRequest | undefined, options?: RequestOptions): Promise<operations.ListProvidersResponse>;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=providers.d.ts.map
|
package/esm/sdk/providers.js
CHANGED
|
@@ -9,8 +9,8 @@ export class Providers extends ClientSDK {
|
|
|
9
9
|
/**
|
|
10
10
|
* List all providers
|
|
11
11
|
*/
|
|
12
|
-
async list(options) {
|
|
13
|
-
return unwrapAsync(providersList(this, options));
|
|
12
|
+
async list(request, options) {
|
|
13
|
+
return unwrapAsync(providersList(this, request, options));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
//# sourceMappingURL=providers.js.map
|
package/esm/sdk/responses.d.ts
CHANGED
|
@@ -9,12 +9,16 @@ export declare class Responses extends ClientSDK {
|
|
|
9
9
|
* @remarks
|
|
10
10
|
* Creates a streaming or non-streaming response using OpenResponses API format
|
|
11
11
|
*/
|
|
12
|
-
send(request:
|
|
13
|
-
|
|
12
|
+
send(request: operations.CreateResponsesRequest & {
|
|
13
|
+
openResponsesRequest: {
|
|
14
|
+
stream?: false | undefined;
|
|
15
|
+
};
|
|
14
16
|
}, options?: RequestOptions): Promise<models.OpenResponsesNonStreamingResponse>;
|
|
15
|
-
send(request:
|
|
16
|
-
|
|
17
|
+
send(request: operations.CreateResponsesRequest & {
|
|
18
|
+
openResponsesRequest: {
|
|
19
|
+
stream: true;
|
|
20
|
+
};
|
|
17
21
|
}, options?: RequestOptions): Promise<EventStream<models.OpenResponsesStreamEvent>>;
|
|
18
|
-
send(request:
|
|
22
|
+
send(request: operations.CreateResponsesRequest, options?: RequestOptions): Promise<operations.CreateResponsesResponse>;
|
|
19
23
|
}
|
|
20
24
|
//# sourceMappingURL=responses.d.ts.map
|
package/esm/sdk/sdk.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare class OpenRouter extends ClientSDK {
|
|
|
21
21
|
get beta(): Beta;
|
|
22
22
|
private _analytics?;
|
|
23
23
|
get analytics(): Analytics;
|
|
24
|
+
private _chat?;
|
|
25
|
+
get chat(): Chat;
|
|
24
26
|
private _credits?;
|
|
25
27
|
get credits(): Credits;
|
|
26
28
|
private _embeddings?;
|
|
@@ -39,8 +41,6 @@ export declare class OpenRouter extends ClientSDK {
|
|
|
39
41
|
get guardrails(): Guardrails;
|
|
40
42
|
private _oAuth?;
|
|
41
43
|
get oAuth(): OAuth;
|
|
42
|
-
private _chat?;
|
|
43
|
-
get chat(): Chat;
|
|
44
44
|
callModel<TTools extends readonly Tool[]>(request: CallModelInput<TTools>, options?: RequestOptions): ModelResult<TTools>;
|
|
45
45
|
}
|
|
46
46
|
//# sourceMappingURL=sdk.d.ts.map
|
package/esm/sdk/sdk.js
CHANGED
|
@@ -27,6 +27,9 @@ export class OpenRouter extends ClientSDK {
|
|
|
27
27
|
get analytics() {
|
|
28
28
|
return (this._analytics ?? (this._analytics = new Analytics(this._options)));
|
|
29
29
|
}
|
|
30
|
+
get chat() {
|
|
31
|
+
return (this._chat ?? (this._chat = new Chat(this._options)));
|
|
32
|
+
}
|
|
30
33
|
get credits() {
|
|
31
34
|
return (this._credits ?? (this._credits = new Credits(this._options)));
|
|
32
35
|
}
|
|
@@ -54,9 +57,6 @@ export class OpenRouter extends ClientSDK {
|
|
|
54
57
|
get oAuth() {
|
|
55
58
|
return (this._oAuth ?? (this._oAuth = new OAuth(this._options)));
|
|
56
59
|
}
|
|
57
|
-
get chat() {
|
|
58
|
-
return (this._chat ?? (this._chat = new Chat(this._options)));
|
|
59
|
-
}
|
|
60
60
|
// #region sdk-class-body
|
|
61
61
|
callModel(request, options) {
|
|
62
62
|
return callModelFunc(this, request, options);
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.11",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
-
export type Code = string | number;
|
|
5
|
-
export type ChatErrorError = {
|
|
6
|
-
code: string | number | null;
|
|
7
|
-
message: string;
|
|
8
|
-
param?: string | null | undefined;
|
|
9
|
-
type?: string | null | undefined;
|
|
10
|
-
};
|
|
11
|
-
/** @internal */
|
|
12
|
-
export declare const Code$inboundSchema: z.ZodType<Code, unknown>;
|
|
13
|
-
export declare function codeFromJSON(jsonString: string): SafeParseResult<Code, SDKValidationError>;
|
|
14
|
-
/** @internal */
|
|
15
|
-
export declare const ChatErrorError$inboundSchema: z.ZodType<ChatErrorError, unknown>;
|
|
16
|
-
export declare function chatErrorErrorFromJSON(jsonString: string): SafeParseResult<ChatErrorError, SDKValidationError>;
|
|
17
|
-
//# sourceMappingURL=chaterror.d.ts.map
|
package/esm/models/chaterror.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: b107ec938dc1
|
|
4
|
-
*/
|
|
5
|
-
import * as z from "zod/v4";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export const Code$inboundSchema = z.union([
|
|
9
|
-
z.string(),
|
|
10
|
-
z.number(),
|
|
11
|
-
]);
|
|
12
|
-
export function codeFromJSON(jsonString) {
|
|
13
|
-
return safeParse(jsonString, (x) => Code$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Code' from JSON`);
|
|
14
|
-
}
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const ChatErrorError$inboundSchema = z.object({
|
|
17
|
-
code: z.nullable(z.union([z.string(), z.number()])),
|
|
18
|
-
message: z.string(),
|
|
19
|
-
param: z.nullable(z.string()).optional(),
|
|
20
|
-
type: z.nullable(z.string()).optional(),
|
|
21
|
-
});
|
|
22
|
-
export function chatErrorErrorFromJSON(jsonString) {
|
|
23
|
-
return safeParse(jsonString, (x) => ChatErrorError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatErrorError' from JSON`);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=chaterror.js.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import * as models from "../index.js";
|
|
3
|
-
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
-
export type ChatErrorData = {
|
|
5
|
-
error: models.ChatErrorError;
|
|
6
|
-
};
|
|
7
|
-
export declare class ChatError extends OpenRouterError {
|
|
8
|
-
error: models.ChatErrorError;
|
|
9
|
-
/** The original data that was passed to this error instance. */
|
|
10
|
-
data$: ChatErrorData;
|
|
11
|
-
constructor(err: ChatErrorData, httpMeta: {
|
|
12
|
-
response: Response;
|
|
13
|
-
request: Request;
|
|
14
|
-
body: string;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
/** @internal */
|
|
18
|
-
export declare const ChatError$inboundSchema: z.ZodType<ChatError, unknown>;
|
|
19
|
-
//# sourceMappingURL=chaterror.d.ts.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: a3b18e48f494
|
|
4
|
-
*/
|
|
5
|
-
import * as z from "zod/v4";
|
|
6
|
-
import * as models from "../index.js";
|
|
7
|
-
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
-
export class ChatError extends OpenRouterError {
|
|
9
|
-
constructor(err, httpMeta) {
|
|
10
|
-
const message = err.error?.message
|
|
11
|
-
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
12
|
-
super(message, httpMeta);
|
|
13
|
-
this.data$ = err;
|
|
14
|
-
this.error = err.error;
|
|
15
|
-
this.name = "ChatError";
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
/** @internal */
|
|
19
|
-
export const ChatError$inboundSchema = z.object({
|
|
20
|
-
error: z.lazy(() => models.ChatErrorError$inboundSchema),
|
|
21
|
-
request$: z.custom(x => x instanceof Request),
|
|
22
|
-
response$: z.custom(x => x instanceof Response),
|
|
23
|
-
body$: z.string(),
|
|
24
|
-
})
|
|
25
|
-
.transform((v) => {
|
|
26
|
-
return new ChatError(v, {
|
|
27
|
-
request: v.request$,
|
|
28
|
-
response: v.response$,
|
|
29
|
-
body: v.body$,
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=chaterror.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { ProviderSort } from "./providersort.js";
|
|
3
|
-
import { ProviderSortConfig, ProviderSortConfig$Outbound } from "./providersortconfig.js";
|
|
4
|
-
export type ProviderSortUnion = ProviderSort | ProviderSortConfig;
|
|
5
|
-
/** @internal */
|
|
6
|
-
export type ProviderSortUnion$Outbound = string | ProviderSortConfig$Outbound;
|
|
7
|
-
/** @internal */
|
|
8
|
-
export declare const ProviderSortUnion$outboundSchema: z.ZodType<ProviderSortUnion$Outbound, ProviderSortUnion>;
|
|
9
|
-
export declare function providerSortUnionToJSON(providerSortUnion: ProviderSortUnion): string;
|
|
10
|
-
//# sourceMappingURL=providersortunion.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: 7a2d23baab80
|
|
4
|
-
*/
|
|
5
|
-
import * as z from "zod/v4";
|
|
6
|
-
import { ProviderSort$outboundSchema } from "./providersort.js";
|
|
7
|
-
import { ProviderSortConfig$outboundSchema, } from "./providersortconfig.js";
|
|
8
|
-
/** @internal */
|
|
9
|
-
export const ProviderSortUnion$outboundSchema = z.union([ProviderSort$outboundSchema, ProviderSortConfig$outboundSchema]);
|
|
10
|
-
export function providerSortUnionToJSON(providerSortUnion) {
|
|
11
|
-
return JSON.stringify(ProviderSortUnion$outboundSchema.parse(providerSortUnion));
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=providersortunion.js.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
-
/**
|
|
5
|
-
* JSON object response format
|
|
6
|
-
*/
|
|
7
|
-
export type ResponsesFormatJSONObject = {
|
|
8
|
-
type: "json_object";
|
|
9
|
-
};
|
|
10
|
-
/** @internal */
|
|
11
|
-
export declare const ResponsesFormatJSONObject$inboundSchema: z.ZodType<ResponsesFormatJSONObject, unknown>;
|
|
12
|
-
/** @internal */
|
|
13
|
-
export type ResponsesFormatJSONObject$Outbound = {
|
|
14
|
-
type: "json_object";
|
|
15
|
-
};
|
|
16
|
-
/** @internal */
|
|
17
|
-
export declare const ResponsesFormatJSONObject$outboundSchema: z.ZodType<ResponsesFormatJSONObject$Outbound, ResponsesFormatJSONObject>;
|
|
18
|
-
export declare function responsesFormatJSONObjectToJSON(responsesFormatJSONObject: ResponsesFormatJSONObject): string;
|
|
19
|
-
export declare function responsesFormatJSONObjectFromJSON(jsonString: string): SafeParseResult<ResponsesFormatJSONObject, SDKValidationError>;
|
|
20
|
-
//# sourceMappingURL=responsesformatjsonobject.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: cd67052e598c
|
|
4
|
-
*/
|
|
5
|
-
import * as z from "zod/v4";
|
|
6
|
-
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export const ResponsesFormatJSONObject$inboundSchema = z.object({
|
|
9
|
-
type: z.literal("json_object"),
|
|
10
|
-
});
|
|
11
|
-
/** @internal */
|
|
12
|
-
export const ResponsesFormatJSONObject$outboundSchema = z.object({
|
|
13
|
-
type: z.literal("json_object"),
|
|
14
|
-
});
|
|
15
|
-
export function responsesFormatJSONObjectToJSON(responsesFormatJSONObject) {
|
|
16
|
-
return JSON.stringify(ResponsesFormatJSONObject$outboundSchema.parse(responsesFormatJSONObject));
|
|
17
|
-
}
|
|
18
|
-
export function responsesFormatJSONObjectFromJSON(jsonString) {
|
|
19
|
-
return safeParse(jsonString, (x) => ResponsesFormatJSONObject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesFormatJSONObject' from JSON`);
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=responsesformatjsonobject.js.map
|
package/esm/models/schema0.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { OpenEnum } from "../types/enums.js";
|
|
3
|
-
export declare const Schema0Enum: {
|
|
4
|
-
readonly Ai21: "AI21";
|
|
5
|
-
readonly AionLabs: "AionLabs";
|
|
6
|
-
readonly Alibaba: "Alibaba";
|
|
7
|
-
readonly AmazonBedrock: "Amazon Bedrock";
|
|
8
|
-
readonly AmazonNova: "Amazon Nova";
|
|
9
|
-
readonly Anthropic: "Anthropic";
|
|
10
|
-
readonly ArceeAI: "Arcee AI";
|
|
11
|
-
readonly AtlasCloud: "AtlasCloud";
|
|
12
|
-
readonly Avian: "Avian";
|
|
13
|
-
readonly Azure: "Azure";
|
|
14
|
-
readonly BaseTen: "BaseTen";
|
|
15
|
-
readonly BytePlus: "BytePlus";
|
|
16
|
-
readonly BlackForestLabs: "Black Forest Labs";
|
|
17
|
-
readonly Cerebras: "Cerebras";
|
|
18
|
-
readonly Chutes: "Chutes";
|
|
19
|
-
readonly Cirrascale: "Cirrascale";
|
|
20
|
-
readonly Clarifai: "Clarifai";
|
|
21
|
-
readonly Cloudflare: "Cloudflare";
|
|
22
|
-
readonly Cohere: "Cohere";
|
|
23
|
-
readonly Crusoe: "Crusoe";
|
|
24
|
-
readonly DeepInfra: "DeepInfra";
|
|
25
|
-
readonly DeepSeek: "DeepSeek";
|
|
26
|
-
readonly Featherless: "Featherless";
|
|
27
|
-
readonly Fireworks: "Fireworks";
|
|
28
|
-
readonly Friendli: "Friendli";
|
|
29
|
-
readonly GMICloud: "GMICloud";
|
|
30
|
-
readonly Google: "Google";
|
|
31
|
-
readonly GoogleAIStudio: "Google AI Studio";
|
|
32
|
-
readonly Groq: "Groq";
|
|
33
|
-
readonly Hyperbolic: "Hyperbolic";
|
|
34
|
-
readonly Inception: "Inception";
|
|
35
|
-
readonly Inceptron: "Inceptron";
|
|
36
|
-
readonly InferenceNet: "InferenceNet";
|
|
37
|
-
readonly Infermatic: "Infermatic";
|
|
38
|
-
readonly Inflection: "Inflection";
|
|
39
|
-
readonly Liquid: "Liquid";
|
|
40
|
-
readonly Mara: "Mara";
|
|
41
|
-
readonly Mancer2: "Mancer 2";
|
|
42
|
-
readonly Minimax: "Minimax";
|
|
43
|
-
readonly ModelRun: "ModelRun";
|
|
44
|
-
readonly Mistral: "Mistral";
|
|
45
|
-
readonly Modular: "Modular";
|
|
46
|
-
readonly MoonshotAI: "Moonshot AI";
|
|
47
|
-
readonly Morph: "Morph";
|
|
48
|
-
readonly NCompass: "NCompass";
|
|
49
|
-
readonly Nebius: "Nebius";
|
|
50
|
-
readonly NextBit: "NextBit";
|
|
51
|
-
readonly Novita: "Novita";
|
|
52
|
-
readonly Nvidia: "Nvidia";
|
|
53
|
-
readonly OpenAI: "OpenAI";
|
|
54
|
-
readonly OpenInference: "OpenInference";
|
|
55
|
-
readonly Parasail: "Parasail";
|
|
56
|
-
readonly Perplexity: "Perplexity";
|
|
57
|
-
readonly Phala: "Phala";
|
|
58
|
-
readonly Relace: "Relace";
|
|
59
|
-
readonly SambaNova: "SambaNova";
|
|
60
|
-
readonly Seed: "Seed";
|
|
61
|
-
readonly SiliconFlow: "SiliconFlow";
|
|
62
|
-
readonly Sourceful: "Sourceful";
|
|
63
|
-
readonly Stealth: "Stealth";
|
|
64
|
-
readonly StreamLake: "StreamLake";
|
|
65
|
-
readonly Switchpoint: "Switchpoint";
|
|
66
|
-
readonly Together: "Together";
|
|
67
|
-
readonly Upstage: "Upstage";
|
|
68
|
-
readonly Venice: "Venice";
|
|
69
|
-
readonly WandB: "WandB";
|
|
70
|
-
readonly Xiaomi: "Xiaomi";
|
|
71
|
-
readonly XAI: "xAI";
|
|
72
|
-
readonly ZAi: "Z.AI";
|
|
73
|
-
readonly FakeProvider: "FakeProvider";
|
|
74
|
-
};
|
|
75
|
-
export type Schema0Enum = OpenEnum<typeof Schema0Enum>;
|
|
76
|
-
export type Schema0 = Schema0Enum | string;
|
|
77
|
-
/** @internal */
|
|
78
|
-
export declare const Schema0Enum$outboundSchema: z.ZodType<string, Schema0Enum>;
|
|
79
|
-
/** @internal */
|
|
80
|
-
export type Schema0$Outbound = string | string;
|
|
81
|
-
/** @internal */
|
|
82
|
-
export declare const Schema0$outboundSchema: z.ZodType<Schema0$Outbound, Schema0>;
|
|
83
|
-
export declare function schema0ToJSON(schema0: Schema0): string;
|
|
84
|
-
//# sourceMappingURL=schema0.d.ts.map
|