@openrouter/sdk 0.0.0-beta.7 → 0.0.0-beta.8
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 +6 -6
- package/REACT_QUERY.md +30 -25
- package/README.md +95 -56
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts +2 -1
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts.map +1 -1
- package/dist/commonjs/funcs/analyticsGetActivity.js +8 -3
- package/dist/commonjs/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKey.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.js +8 -3
- package/dist/commonjs/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/commonjs/funcs/{chatGenerateResponse.d.ts → chatSend.d.ts} +6 -6
- package/dist/commonjs/funcs/chatSend.d.ts.map +1 -0
- package/dist/commonjs/funcs/{chatGenerateResponse.js → chatSend.js} +14 -13
- package/dist/commonjs/funcs/chatSend.js.map +1 -0
- package/dist/commonjs/funcs/completionsCreate.d.ts +25 -0
- package/dist/commonjs/funcs/completionsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/completionsCreate.js +128 -0
- package/dist/commonjs/funcs/completionsCreate.js.map +1 -0
- package/dist/{esm/funcs/getCredits.d.ts → commonjs/funcs/creditsGetCredits.d.ts} +3 -2
- package/dist/commonjs/funcs/creditsGetCredits.d.ts.map +1 -0
- package/dist/commonjs/funcs/{getCredits.js → creditsGetCredits.js} +11 -6
- package/dist/commonjs/funcs/creditsGetCredits.js.map +1 -0
- package/dist/commonjs/funcs/{postCreditsCoinbase.d.ts → creditsPostCreditsCoinbase.d.ts} +3 -2
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +19 -10
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/{esm/funcs/embeddingsPostEmbeddings.d.ts → commonjs/funcs/embeddingsGenerate.d.ts} +3 -2
- package/dist/commonjs/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +11 -6
- package/dist/commonjs/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts +2 -1
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -1
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js +8 -3
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +2 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js +8 -3
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts +2 -1
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts.map +1 -1
- package/dist/commonjs/funcs/generationsGetGeneration.js +8 -3
- package/dist/commonjs/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/commonjs/funcs/{parametersGetParametersAuthorSlug.d.ts → modelGetParametersAuthorSlug.d.ts} +3 -2
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +19 -10
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModels.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModels.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModels.js +8 -3
- package/dist/commonjs/funcs/modelsGetModels.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.js +8 -3
- package/dist/commonjs/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.js +17 -8
- package/dist/commonjs/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts +18 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js +120 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts +18 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js +120 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/{esm/funcs/getProviders.d.ts → commonjs/funcs/providersGetProviders.d.ts} +5 -2
- package/dist/commonjs/funcs/providersGetProviders.d.ts.map +1 -0
- package/dist/commonjs/funcs/{getProviders.js → providersGetProviders.js} +9 -5
- package/dist/commonjs/funcs/providersGetProviders.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -7
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/env.d.ts +1 -2
- package/dist/commonjs/lib/env.d.ts.map +1 -1
- package/dist/commonjs/lib/env.js +1 -2
- package/dist/commonjs/lib/env.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +1 -7
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/models/chaterror.d.ts +56 -0
- package/dist/commonjs/models/chaterror.d.ts.map +1 -0
- package/dist/commonjs/models/chaterror.js +98 -0
- package/dist/commonjs/models/chaterror.js.map +1 -0
- package/dist/commonjs/models/chatgenerationparams.d.ts +108 -108
- package/dist/commonjs/models/chatgenerationparams.d.ts.map +1 -1
- package/dist/commonjs/models/chatgenerationparams.js +143 -144
- package/dist/commonjs/models/chatgenerationparams.js.map +1 -1
- package/dist/commonjs/models/chatresponse.d.ts +43 -0
- package/dist/commonjs/models/chatresponse.d.ts.map +1 -0
- package/dist/commonjs/models/{chatcompletion.js → chatresponse.js} +22 -22
- package/dist/commonjs/models/chatresponse.js.map +1 -0
- package/dist/commonjs/models/chatresponsechoice.d.ts +72 -0
- package/dist/commonjs/models/chatresponsechoice.d.ts.map +1 -0
- package/dist/commonjs/models/chatresponsechoice.js +108 -0
- package/dist/commonjs/models/chatresponsechoice.js.map +1 -0
- package/dist/commonjs/models/chatstreamingchoice.d.ts +72 -0
- package/dist/commonjs/models/chatstreamingchoice.d.ts.map +1 -0
- package/dist/commonjs/models/{chatcompletionchoice.js → chatstreamingchoice.js} +32 -32
- package/dist/commonjs/models/chatstreamingchoice.js.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.d.ts +61 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.d.ts.map +1 -0
- package/dist/commonjs/models/{chatcompletionchunkchoicedelta.js → chatstreamingmessagechunk.js} +20 -22
- package/dist/commonjs/models/chatstreamingmessagechunk.js.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.d.ts +62 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.js +106 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.js.map +1 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts +97 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.js +162 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.js.map +1 -0
- package/dist/commonjs/models/completionchoice.d.ts +37 -0
- package/dist/commonjs/models/completionchoice.d.ts.map +1 -0
- package/dist/commonjs/models/completionchoice.js +86 -0
- package/dist/commonjs/models/completionchoice.js.map +1 -0
- package/dist/commonjs/models/completioncreateparams.d.ts +327 -0
- package/dist/commonjs/models/completioncreateparams.d.ts.map +1 -0
- package/dist/commonjs/models/completioncreateparams.js +461 -0
- package/dist/commonjs/models/completioncreateparams.js.map +1 -0
- package/dist/commonjs/models/completionerror.d.ts +56 -0
- package/dist/commonjs/models/completionerror.d.ts.map +1 -0
- package/dist/commonjs/models/completionerror.js +98 -0
- package/dist/commonjs/models/completionerror.js.map +1 -0
- package/dist/commonjs/models/completionfinishreason.d.ts +31 -0
- package/dist/commonjs/models/completionfinishreason.d.ts.map +1 -0
- package/dist/commonjs/models/completionfinishreason.js +61 -0
- package/dist/commonjs/models/completionfinishreason.js.map +1 -0
- package/dist/commonjs/models/completionlogprobs.d.ts +39 -0
- package/dist/commonjs/models/completionlogprobs.d.ts.map +1 -0
- package/dist/commonjs/models/completionlogprobs.js +88 -0
- package/dist/commonjs/models/completionlogprobs.js.map +1 -0
- package/dist/commonjs/models/completionresponse.d.ts +43 -0
- package/dist/commonjs/models/completionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/completionresponse.js +92 -0
- package/dist/commonjs/models/completionresponse.js.map +1 -0
- package/dist/commonjs/models/completionstreamingchoice.d.ts +37 -0
- package/dist/commonjs/models/completionstreamingchoice.d.ts.map +1 -0
- package/dist/commonjs/models/completionstreamingchoice.js +86 -0
- package/dist/commonjs/models/completionstreamingchoice.js.map +1 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.d.ts +68 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.d.ts.map +1 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.js +130 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.js.map +1 -0
- package/dist/commonjs/models/completionusage.d.ts +33 -0
- package/dist/commonjs/models/completionusage.d.ts.map +1 -0
- package/dist/commonjs/models/{chatcompletionerror.js → completionusage.js} +36 -25
- package/dist/commonjs/models/completionusage.js.map +1 -0
- package/dist/commonjs/models/errorresponse.d.ts +8 -38
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -1
- package/dist/commonjs/models/errorresponse.js +14 -51
- package/dist/commonjs/models/errorresponse.js.map +1 -1
- package/dist/commonjs/models/errors/chaterror.d.ts +37 -0
- package/dist/commonjs/models/errors/chaterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/{chatcompletionerror.js → chaterror.js} +17 -17
- package/dist/commonjs/models/errors/chaterror.js.map +1 -0
- package/dist/commonjs/models/errors/completionerror.d.ts +37 -0
- package/dist/commonjs/models/errors/completionerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/completionerror.js +85 -0
- package/dist/commonjs/models/errors/completionerror.js.map +1 -0
- package/dist/commonjs/models/errors/errorresponse.d.ts +46 -0
- package/dist/commonjs/models/errors/errorresponse.d.ts.map +1 -0
- package/dist/commonjs/models/errors/errorresponse.js +100 -0
- package/dist/commonjs/models/errors/errorresponse.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +3 -1
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +3 -1
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +17 -9
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +17 -9
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/message.d.ts +54 -19
- package/dist/commonjs/models/message.d.ts.map +1 -1
- package/dist/commonjs/models/message.js +73 -22
- package/dist/commonjs/models/message.js.map +1 -1
- package/dist/commonjs/models/operations/deletekeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/deletekeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletekeyshash.js +3 -33
- package/dist/commonjs/models/operations/deletekeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/getactivity.d.ts +3 -24
- package/dist/commonjs/models/operations/getactivity.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getactivity.js +3 -32
- package/dist/commonjs/models/operations/getactivity.js.map +1 -1
- package/dist/commonjs/models/operations/getauthkey.d.ts +3 -25
- package/dist/commonjs/models/operations/getauthkey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getauthkey.js +3 -33
- package/dist/commonjs/models/operations/getauthkey.js.map +1 -1
- package/dist/commonjs/models/operations/getcredits.d.ts +3 -25
- package/dist/commonjs/models/operations/getcredits.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcredits.js +3 -33
- package/dist/commonjs/models/operations/getcredits.js.map +1 -1
- package/dist/commonjs/models/operations/getendpointszdr.d.ts +3 -25
- package/dist/commonjs/models/operations/getendpointszdr.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getendpointszdr.js +3 -33
- package/dist/commonjs/models/operations/getendpointszdr.js.map +1 -1
- package/dist/commonjs/models/operations/getgeneration.d.ts +3 -25
- package/dist/commonjs/models/operations/getgeneration.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getgeneration.js +3 -33
- package/dist/commonjs/models/operations/getgeneration.js.map +1 -1
- package/dist/commonjs/models/operations/getkey.d.ts +3 -25
- package/dist/commonjs/models/operations/getkey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkey.js +3 -33
- package/dist/commonjs/models/operations/getkey.js.map +1 -1
- package/dist/commonjs/models/operations/getkeys.d.ts +3 -25
- package/dist/commonjs/models/operations/getkeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkeys.js +3 -33
- package/dist/commonjs/models/operations/getkeys.js.map +1 -1
- package/dist/commonjs/models/operations/getkeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/getkeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkeyshash.js +3 -33
- package/dist/commonjs/models/operations/getkeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/getmodels.d.ts +2 -3
- package/dist/commonjs/models/operations/getmodels.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodels.js +2 -11
- package/dist/commonjs/models/operations/getmodels.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts +3 -25
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js +3 -33
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelscount.d.ts +3 -25
- package/dist/commonjs/models/operations/getmodelscount.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelscount.js +3 -33
- package/dist/commonjs/models/operations/getmodelscount.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.d.ts +28 -25
- package/dist/commonjs/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.js +31 -34
- package/dist/commonjs/models/operations/getmodelsuser.js.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts +28 -25
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.js +30 -33
- package/dist/commonjs/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/patchkeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/patchkeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/patchkeyshash.js +3 -33
- package/dist/commonjs/models/operations/patchkeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/postauthkeys.d.ts +110 -0
- package/dist/commonjs/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeys.js +145 -0
- package/dist/commonjs/models/operations/postauthkeys.js.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts +145 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js +180 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/commonjs/models/operations/postchatcompletions.d.ts +3 -3
- package/dist/commonjs/models/operations/postchatcompletions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postchatcompletions.js +3 -3
- package/dist/commonjs/models/operations/postchatcompletions.js.map +1 -1
- package/dist/commonjs/models/operations/postcompletions.d.ts +27 -0
- package/dist/commonjs/models/operations/postcompletions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postcompletions.js +80 -0
- package/dist/commonjs/models/operations/postcompletions.js.map +1 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts +28 -25
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postcreditscoinbase.js +30 -33
- package/dist/commonjs/models/operations/postcreditscoinbase.js.map +1 -1
- package/dist/commonjs/models/operations/postembeddings.d.ts +3 -25
- package/dist/commonjs/models/operations/postembeddings.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postembeddings.js +3 -33
- package/dist/commonjs/models/operations/postembeddings.js.map +1 -1
- package/dist/commonjs/models/operations/postkeys.d.ts +3 -25
- package/dist/commonjs/models/operations/postkeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postkeys.js +3 -33
- package/dist/commonjs/models/operations/postkeys.js.map +1 -1
- package/dist/commonjs/models/security.d.ts +2 -4
- package/dist/commonjs/models/security.d.ts.map +1 -1
- package/dist/commonjs/models/security.js +2 -4
- package/dist/commonjs/models/security.js.map +1 -1
- package/dist/commonjs/models/toolresponsemessage.d.ts +55 -0
- package/dist/commonjs/models/toolresponsemessage.d.ts.map +1 -0
- package/dist/commonjs/models/{toolmessage.js → toolresponsemessage.js} +32 -32
- package/dist/commonjs/models/toolresponsemessage.js.map +1 -0
- package/dist/commonjs/react-query/chatSend.d.ts +28 -0
- package/dist/commonjs/react-query/chatSend.d.ts.map +1 -0
- package/dist/commonjs/react-query/chatSend.js +50 -0
- package/dist/commonjs/react-query/chatSend.js.map +1 -0
- package/dist/commonjs/react-query/completionsCreate.d.ts +28 -0
- package/dist/commonjs/react-query/completionsCreate.d.ts.map +1 -0
- package/dist/commonjs/react-query/completionsCreate.js +50 -0
- package/dist/commonjs/react-query/completionsCreate.js.map +1 -0
- package/dist/commonjs/react-query/creditsGetCredits.d.ts +23 -0
- package/dist/commonjs/react-query/creditsGetCredits.d.ts.map +1 -0
- package/dist/commonjs/react-query/creditsGetCredits.js +69 -0
- package/dist/commonjs/react-query/creditsGetCredits.js.map +1 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.d.ts +21 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.js +44 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/react-query/embeddingsGenerate.d.ts +23 -0
- package/dist/commonjs/react-query/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/react-query/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +13 -13
- package/dist/commonjs/react-query/embeddingsGenerate.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +9 -6
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +9 -6
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.d.ts +38 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.js +88 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts +4 -4
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/react-query/modelsGetModelsUser.js +8 -8
- package/dist/commonjs/react-query/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/react-query/oAuthPostAuthKeys.d.ts +23 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.js +47 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.d.ts +23 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.js +47 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/commonjs/react-query/providersGetProviders.d.ts +23 -0
- package/dist/commonjs/react-query/providersGetProviders.d.ts.map +1 -0
- package/dist/commonjs/react-query/providersGetProviders.js +69 -0
- package/dist/commonjs/react-query/providersGetProviders.js.map +1 -0
- package/dist/commonjs/sdk/chat.d.ts +5 -5
- package/dist/commonjs/sdk/chat.d.ts.map +1 -1
- package/dist/commonjs/sdk/chat.js +7 -7
- package/dist/commonjs/sdk/chat.js.map +1 -1
- package/dist/commonjs/sdk/completions.d.ts +17 -0
- package/dist/commonjs/sdk/completions.d.ts.map +1 -0
- package/dist/commonjs/sdk/completions.js +24 -0
- package/dist/commonjs/sdk/completions.js.map +1 -0
- package/dist/commonjs/sdk/credits.d.ts +13 -0
- package/dist/commonjs/sdk/credits.d.ts.map +1 -0
- package/dist/commonjs/sdk/credits.js +26 -0
- package/dist/commonjs/sdk/credits.js.map +1 -0
- package/dist/commonjs/sdk/embeddings.d.ts +1 -1
- package/dist/commonjs/sdk/embeddings.d.ts.map +1 -1
- package/dist/commonjs/sdk/embeddings.js +3 -3
- package/dist/commonjs/sdk/embeddings.js.map +1 -1
- package/dist/commonjs/sdk/model.d.ts +9 -0
- package/dist/commonjs/sdk/model.d.ts.map +1 -0
- package/dist/commonjs/sdk/model.js +19 -0
- package/dist/commonjs/sdk/model.js.map +1 -0
- package/dist/commonjs/sdk/models.d.ts +1 -1
- package/dist/commonjs/sdk/models.d.ts.map +1 -1
- package/dist/commonjs/sdk/models.js +2 -2
- package/dist/commonjs/sdk/models.js.map +1 -1
- package/dist/commonjs/sdk/oauth.d.ts +19 -0
- package/dist/commonjs/sdk/oauth.d.ts.map +1 -0
- package/dist/commonjs/sdk/oauth.js +32 -0
- package/dist/commonjs/sdk/oauth.js.map +1 -0
- package/dist/commonjs/sdk/providers.d.ts +9 -0
- package/dist/commonjs/sdk/providers.d.ts.map +1 -0
- package/dist/commonjs/sdk/providers.js +19 -0
- package/dist/commonjs/sdk/providers.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +16 -14
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +18 -21
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/analyticsGetActivity.d.ts +2 -1
- package/dist/esm/funcs/analyticsGetActivity.d.ts.map +1 -1
- package/dist/esm/funcs/analyticsGetActivity.js +8 -3
- package/dist/esm/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.js +8 -3
- package/dist/esm/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKey.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKey.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKey.js +8 -3
- package/dist/esm/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeys.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKeys.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeys.js +8 -3
- package/dist/esm/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPostKeys.d.ts +2 -1
- package/dist/esm/funcs/apiKeysPostKeys.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysPostKeys.js +8 -3
- package/dist/esm/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/esm/funcs/{chatGenerateResponse.d.ts → chatSend.d.ts} +6 -6
- package/dist/esm/funcs/chatSend.d.ts.map +1 -0
- package/dist/esm/funcs/{chatGenerateResponse.js → chatSend.js} +12 -11
- package/dist/esm/funcs/chatSend.js.map +1 -0
- package/dist/esm/funcs/completionsCreate.d.ts +25 -0
- package/dist/esm/funcs/completionsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/completionsCreate.js +91 -0
- package/dist/esm/funcs/completionsCreate.js.map +1 -0
- package/dist/{commonjs/funcs/getCredits.d.ts → esm/funcs/creditsGetCredits.d.ts} +3 -2
- package/dist/esm/funcs/creditsGetCredits.d.ts.map +1 -0
- package/dist/esm/funcs/{getCredits.js → creditsGetCredits.js} +10 -5
- package/dist/esm/funcs/creditsGetCredits.js.map +1 -0
- package/dist/esm/funcs/{postCreditsCoinbase.d.ts → creditsPostCreditsCoinbase.d.ts} +3 -2
- package/dist/esm/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +19 -10
- package/dist/esm/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/{commonjs/funcs/embeddingsPostEmbeddings.d.ts → esm/funcs/embeddingsGenerate.d.ts} +3 -2
- package/dist/esm/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +10 -5
- package/dist/esm/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts +2 -1
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -1
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js +8 -3
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +2 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js +8 -3
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/esm/funcs/generationsGetGeneration.d.ts +2 -1
- package/dist/esm/funcs/generationsGetGeneration.d.ts.map +1 -1
- package/dist/esm/funcs/generationsGetGeneration.js +8 -3
- package/dist/esm/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/esm/funcs/{parametersGetParametersAuthorSlug.d.ts → modelGetParametersAuthorSlug.d.ts} +3 -2
- package/dist/esm/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +19 -10
- package/dist/esm/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/funcs/modelsGetModels.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModels.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModels.js +8 -3
- package/dist/esm/funcs/modelsGetModels.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsCount.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModelsCount.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModelsCount.js +8 -3
- package/dist/esm/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.js +18 -9
- package/dist/esm/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts +18 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js +84 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts +18 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js +84 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/{commonjs/funcs/getProviders.d.ts → esm/funcs/providersGetProviders.d.ts} +5 -2
- package/dist/esm/funcs/providersGetProviders.d.ts.map +1 -0
- package/dist/esm/funcs/{getProviders.js → providersGetProviders.js} +8 -4
- package/dist/esm/funcs/providersGetProviders.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -7
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/env.d.ts +1 -2
- package/dist/esm/lib/env.d.ts.map +1 -1
- package/dist/esm/lib/env.js +1 -2
- package/dist/esm/lib/env.js.map +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +1 -7
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/models/chaterror.d.ts +56 -0
- package/dist/esm/models/chaterror.d.ts.map +1 -0
- package/dist/esm/models/chaterror.js +58 -0
- package/dist/esm/models/chaterror.js.map +1 -0
- package/dist/esm/models/chatgenerationparams.d.ts +108 -108
- package/dist/esm/models/chatgenerationparams.d.ts.map +1 -1
- package/dist/esm/models/chatgenerationparams.js +126 -127
- package/dist/esm/models/chatgenerationparams.js.map +1 -1
- package/dist/esm/models/chatresponse.d.ts +43 -0
- package/dist/esm/models/chatresponse.d.ts.map +1 -0
- package/dist/esm/models/chatresponse.js +54 -0
- package/dist/esm/models/chatresponse.js.map +1 -0
- package/dist/esm/models/chatresponsechoice.d.ts +72 -0
- package/dist/esm/models/chatresponsechoice.d.ts.map +1 -0
- package/dist/esm/models/chatresponsechoice.js +70 -0
- package/dist/esm/models/chatresponsechoice.js.map +1 -0
- package/dist/esm/models/chatstreamingchoice.d.ts +72 -0
- package/dist/esm/models/chatstreamingchoice.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingchoice.js +70 -0
- package/dist/esm/models/chatstreamingchoice.js.map +1 -0
- package/dist/esm/models/chatstreamingmessagechunk.d.ts +61 -0
- package/dist/esm/models/chatstreamingmessagechunk.d.ts.map +1 -0
- package/dist/esm/models/{chatcompletionchunkchoicedelta.js → chatstreamingmessagechunk.js} +17 -19
- package/dist/esm/models/chatstreamingmessagechunk.js.map +1 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.d.ts +62 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.js +66 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.js.map +1 -0
- package/dist/esm/models/chatstreamingresponsechunk.d.ts +97 -0
- package/dist/esm/models/chatstreamingresponsechunk.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingresponsechunk.js +120 -0
- package/dist/esm/models/chatstreamingresponsechunk.js.map +1 -0
- package/dist/esm/models/completionchoice.d.ts +37 -0
- package/dist/esm/models/completionchoice.d.ts.map +1 -0
- package/dist/esm/models/completionchoice.js +48 -0
- package/dist/esm/models/completionchoice.js.map +1 -0
- package/dist/esm/models/completioncreateparams.d.ts +327 -0
- package/dist/esm/models/completioncreateparams.d.ts.map +1 -0
- package/dist/esm/models/completioncreateparams.js +403 -0
- package/dist/esm/models/completioncreateparams.js.map +1 -0
- package/dist/esm/models/completionerror.d.ts +56 -0
- package/dist/esm/models/completionerror.d.ts.map +1 -0
- package/dist/esm/models/completionerror.js +58 -0
- package/dist/esm/models/completionerror.js.map +1 -0
- package/dist/esm/models/completionfinishreason.d.ts +31 -0
- package/dist/esm/models/completionfinishreason.d.ts.map +1 -0
- package/dist/esm/models/completionfinishreason.js +25 -0
- package/dist/esm/models/completionfinishreason.js.map +1 -0
- package/dist/esm/models/completionlogprobs.d.ts +39 -0
- package/dist/esm/models/completionlogprobs.d.ts.map +1 -0
- package/dist/esm/models/completionlogprobs.js +50 -0
- package/dist/esm/models/completionlogprobs.js.map +1 -0
- package/dist/esm/models/completionresponse.d.ts +43 -0
- package/dist/esm/models/completionresponse.d.ts.map +1 -0
- package/dist/esm/models/completionresponse.js +54 -0
- package/dist/esm/models/completionresponse.js.map +1 -0
- package/dist/esm/models/completionstreamingchoice.d.ts +37 -0
- package/dist/esm/models/completionstreamingchoice.d.ts.map +1 -0
- package/dist/esm/models/completionstreamingchoice.js +48 -0
- package/dist/esm/models/completionstreamingchoice.js.map +1 -0
- package/dist/esm/models/completionstreamingresponsechunk.d.ts +68 -0
- package/dist/esm/models/completionstreamingresponsechunk.d.ts.map +1 -0
- package/dist/esm/models/completionstreamingresponsechunk.js +90 -0
- package/dist/esm/models/completionstreamingresponsechunk.js.map +1 -0
- package/dist/esm/models/completionusage.d.ts +33 -0
- package/dist/esm/models/completionusage.d.ts.map +1 -0
- package/dist/esm/models/completionusage.js +48 -0
- package/dist/esm/models/completionusage.js.map +1 -0
- package/dist/esm/models/errorresponse.d.ts +8 -38
- package/dist/esm/models/errorresponse.d.ts.map +1 -1
- package/dist/esm/models/errorresponse.js +13 -48
- package/dist/esm/models/errorresponse.js.map +1 -1
- package/dist/esm/models/errors/chaterror.d.ts +37 -0
- package/dist/esm/models/errors/chaterror.d.ts.map +1 -0
- package/dist/esm/models/errors/chaterror.js +48 -0
- package/dist/esm/models/errors/chaterror.js.map +1 -0
- package/dist/esm/models/errors/completionerror.d.ts +37 -0
- package/dist/esm/models/errors/completionerror.d.ts.map +1 -0
- package/dist/esm/models/errors/completionerror.js +48 -0
- package/dist/esm/models/errors/completionerror.js.map +1 -0
- package/dist/esm/models/errors/errorresponse.d.ts +46 -0
- package/dist/esm/models/errors/errorresponse.d.ts.map +1 -0
- package/dist/esm/models/errors/errorresponse.js +63 -0
- package/dist/esm/models/errors/errorresponse.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +3 -1
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +3 -1
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +17 -9
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +17 -9
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/message.d.ts +54 -19
- package/dist/esm/models/message.d.ts.map +1 -1
- package/dist/esm/models/message.js +68 -21
- package/dist/esm/models/message.js.map +1 -1
- package/dist/esm/models/operations/deletekeyshash.d.ts +3 -25
- package/dist/esm/models/operations/deletekeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/deletekeyshash.js +2 -30
- package/dist/esm/models/operations/deletekeyshash.js.map +1 -1
- package/dist/esm/models/operations/getactivity.d.ts +3 -24
- package/dist/esm/models/operations/getactivity.d.ts.map +1 -1
- package/dist/esm/models/operations/getactivity.js +2 -29
- package/dist/esm/models/operations/getactivity.js.map +1 -1
- package/dist/esm/models/operations/getauthkey.d.ts +3 -25
- package/dist/esm/models/operations/getauthkey.d.ts.map +1 -1
- package/dist/esm/models/operations/getauthkey.js +2 -30
- package/dist/esm/models/operations/getauthkey.js.map +1 -1
- package/dist/esm/models/operations/getcredits.d.ts +3 -25
- package/dist/esm/models/operations/getcredits.d.ts.map +1 -1
- package/dist/esm/models/operations/getcredits.js +2 -30
- package/dist/esm/models/operations/getcredits.js.map +1 -1
- package/dist/esm/models/operations/getendpointszdr.d.ts +3 -25
- package/dist/esm/models/operations/getendpointszdr.d.ts.map +1 -1
- package/dist/esm/models/operations/getendpointszdr.js +2 -30
- package/dist/esm/models/operations/getendpointszdr.js.map +1 -1
- package/dist/esm/models/operations/getgeneration.d.ts +3 -25
- package/dist/esm/models/operations/getgeneration.d.ts.map +1 -1
- package/dist/esm/models/operations/getgeneration.js +2 -30
- package/dist/esm/models/operations/getgeneration.js.map +1 -1
- package/dist/esm/models/operations/getkey.d.ts +3 -25
- package/dist/esm/models/operations/getkey.d.ts.map +1 -1
- package/dist/esm/models/operations/getkey.js +2 -30
- package/dist/esm/models/operations/getkey.js.map +1 -1
- package/dist/esm/models/operations/getkeys.d.ts +3 -25
- package/dist/esm/models/operations/getkeys.d.ts.map +1 -1
- package/dist/esm/models/operations/getkeys.js +2 -30
- package/dist/esm/models/operations/getkeys.js.map +1 -1
- package/dist/esm/models/operations/getkeyshash.d.ts +3 -25
- package/dist/esm/models/operations/getkeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/getkeyshash.js +2 -30
- package/dist/esm/models/operations/getkeyshash.js.map +1 -1
- package/dist/esm/models/operations/getmodels.d.ts +2 -3
- package/dist/esm/models/operations/getmodels.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodels.js +2 -11
- package/dist/esm/models/operations/getmodels.js.map +1 -1
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts +3 -25
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js +2 -30
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js.map +1 -1
- package/dist/esm/models/operations/getmodelscount.d.ts +3 -25
- package/dist/esm/models/operations/getmodelscount.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelscount.js +2 -30
- package/dist/esm/models/operations/getmodelscount.js.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.d.ts +28 -25
- package/dist/esm/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.js +27 -30
- package/dist/esm/models/operations/getmodelsuser.js.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.d.ts +28 -25
- package/dist/esm/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.js +27 -30
- package/dist/esm/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/patchkeyshash.d.ts +3 -25
- package/dist/esm/models/operations/patchkeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/patchkeyshash.js +2 -30
- package/dist/esm/models/operations/patchkeyshash.js.map +1 -1
- package/dist/esm/models/operations/postauthkeys.d.ts +110 -0
- package/dist/esm/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeys.js +105 -0
- package/dist/esm/models/operations/postauthkeys.js.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts +145 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.js +138 -0
- package/dist/esm/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/esm/models/operations/postchatcompletions.d.ts +3 -3
- package/dist/esm/models/operations/postchatcompletions.d.ts.map +1 -1
- package/dist/esm/models/operations/postchatcompletions.js +3 -3
- package/dist/esm/models/operations/postchatcompletions.js.map +1 -1
- package/dist/esm/models/operations/postcompletions.d.ts +27 -0
- package/dist/esm/models/operations/postcompletions.d.ts.map +1 -0
- package/dist/esm/models/operations/postcompletions.js +42 -0
- package/dist/esm/models/operations/postcompletions.js.map +1 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts +28 -25
- package/dist/esm/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/esm/models/operations/postcreditscoinbase.js +27 -30
- package/dist/esm/models/operations/postcreditscoinbase.js.map +1 -1
- package/dist/esm/models/operations/postembeddings.d.ts +3 -25
- package/dist/esm/models/operations/postembeddings.d.ts.map +1 -1
- package/dist/esm/models/operations/postembeddings.js +2 -30
- package/dist/esm/models/operations/postembeddings.js.map +1 -1
- package/dist/esm/models/operations/postkeys.d.ts +3 -25
- package/dist/esm/models/operations/postkeys.d.ts.map +1 -1
- package/dist/esm/models/operations/postkeys.js +2 -30
- package/dist/esm/models/operations/postkeys.js.map +1 -1
- package/dist/esm/models/security.d.ts +2 -4
- package/dist/esm/models/security.d.ts.map +1 -1
- package/dist/esm/models/security.js +2 -4
- package/dist/esm/models/security.js.map +1 -1
- package/dist/esm/models/toolresponsemessage.d.ts +55 -0
- package/dist/esm/models/toolresponsemessage.d.ts.map +1 -0
- package/dist/esm/models/toolresponsemessage.js +69 -0
- package/dist/esm/models/toolresponsemessage.js.map +1 -0
- package/dist/esm/react-query/chatSend.d.ts +28 -0
- package/dist/esm/react-query/chatSend.d.ts.map +1 -0
- package/dist/esm/react-query/chatSend.js +43 -0
- package/dist/esm/react-query/chatSend.js.map +1 -0
- package/dist/esm/react-query/completionsCreate.d.ts +28 -0
- package/dist/esm/react-query/completionsCreate.d.ts.map +1 -0
- package/dist/esm/react-query/completionsCreate.js +43 -0
- package/dist/esm/react-query/completionsCreate.js.map +1 -0
- package/dist/esm/react-query/creditsGetCredits.d.ts +23 -0
- package/dist/esm/react-query/creditsGetCredits.d.ts.map +1 -0
- package/dist/esm/react-query/{getCredits.js → creditsGetCredits.js} +18 -18
- package/dist/esm/react-query/creditsGetCredits.js.map +1 -0
- package/dist/esm/react-query/creditsPostCreditsCoinbase.d.ts +21 -0
- package/dist/esm/react-query/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/react-query/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +10 -10
- package/dist/esm/react-query/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/esm/react-query/embeddingsGenerate.d.ts +23 -0
- package/dist/esm/react-query/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/react-query/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +10 -10
- package/dist/esm/react-query/embeddingsGenerate.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +9 -6
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +9 -6
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/modelGetParametersAuthorSlug.d.ts +38 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.js +78 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/react-query/modelsGetModelsUser.d.ts +4 -4
- package/dist/esm/react-query/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/react-query/modelsGetModelsUser.js +8 -8
- package/dist/esm/react-query/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/react-query/oAuthPostAuthKeys.d.ts +23 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.js +42 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.d.ts +23 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.js +42 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/esm/react-query/providersGetProviders.d.ts +23 -0
- package/dist/esm/react-query/providersGetProviders.d.ts.map +1 -0
- package/dist/esm/react-query/providersGetProviders.js +60 -0
- package/dist/esm/react-query/providersGetProviders.js.map +1 -0
- package/dist/esm/sdk/chat.d.ts +5 -5
- package/dist/esm/sdk/chat.d.ts.map +1 -1
- package/dist/esm/sdk/chat.js +5 -5
- package/dist/esm/sdk/chat.js.map +1 -1
- package/dist/esm/sdk/completions.d.ts +17 -0
- package/dist/esm/sdk/completions.d.ts.map +1 -0
- package/dist/esm/sdk/completions.js +19 -0
- package/dist/esm/sdk/completions.js.map +1 -0
- package/dist/esm/sdk/credits.d.ts +13 -0
- package/dist/esm/sdk/credits.d.ts.map +1 -0
- package/dist/esm/sdk/credits.js +22 -0
- package/dist/esm/sdk/credits.js.map +1 -0
- package/dist/esm/sdk/embeddings.d.ts +1 -1
- package/dist/esm/sdk/embeddings.d.ts.map +1 -1
- package/dist/esm/sdk/embeddings.js +3 -3
- package/dist/esm/sdk/embeddings.js.map +1 -1
- package/dist/esm/sdk/model.d.ts +9 -0
- package/dist/esm/sdk/model.d.ts.map +1 -0
- package/dist/esm/sdk/model.js +15 -0
- package/dist/esm/sdk/model.js.map +1 -0
- package/dist/esm/sdk/models.d.ts +1 -1
- package/dist/esm/sdk/models.d.ts.map +1 -1
- package/dist/esm/sdk/models.js +2 -2
- package/dist/esm/sdk/models.js.map +1 -1
- package/dist/esm/sdk/oauth.d.ts +19 -0
- package/dist/esm/sdk/oauth.d.ts.map +1 -0
- package/dist/esm/sdk/oauth.js +28 -0
- package/dist/esm/sdk/oauth.js.map +1 -0
- package/dist/esm/sdk/providers.d.ts +9 -0
- package/dist/esm/sdk/providers.d.ts.map +1 -0
- package/dist/esm/sdk/providers.js +15 -0
- package/dist/esm/sdk/providers.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +16 -14
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +18 -21
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/analytics/README.md +6 -9
- package/docs/sdks/apikeys/README.md +42 -63
- package/docs/sdks/chat/README.md +13 -17
- package/docs/sdks/completions/README.md +96 -0
- package/docs/sdks/credits/README.md +193 -0
- package/docs/sdks/embeddings/README.md +14 -17
- package/docs/sdks/endpoints/README.md +12 -18
- package/docs/sdks/generations/README.md +6 -9
- package/docs/sdks/{parameters → model}/README.md +23 -25
- package/docs/sdks/models/README.md +25 -33
- package/docs/sdks/oauth/README.md +201 -0
- package/docs/sdks/openrouter/README.md +1 -292
- package/docs/sdks/providers/README.md +104 -0
- package/examples/{getCredits.example.ts → analyticsGetActivity.example.ts} +5 -5
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analyticsGetActivity.ts +14 -6
- package/src/funcs/apiKeysDeleteKeysHash.ts +14 -6
- package/src/funcs/apiKeysGetAuthKey.ts +14 -6
- package/src/funcs/apiKeysGetKey.ts +14 -6
- package/src/funcs/apiKeysGetKeys.ts +14 -6
- package/src/funcs/apiKeysGetKeysHash.ts +14 -6
- package/src/funcs/apiKeysPatchKeysHash.ts +14 -6
- package/src/funcs/apiKeysPostKeys.ts +14 -6
- package/src/funcs/{chatGenerateResponse.ts → chatSend.ts} +13 -16
- package/src/funcs/completionsCreate.ts +181 -0
- package/src/funcs/{getCredits.ts → creditsGetCredits.ts} +14 -6
- package/src/funcs/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +27 -10
- package/src/funcs/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +15 -7
- package/src/funcs/endpointsGetEndpointsZdr.ts +14 -6
- package/src/funcs/endpointsGetModelsAuthorSlugEndpoints.ts +14 -9
- package/src/funcs/generationsGetGeneration.ts +14 -6
- package/src/funcs/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +27 -10
- package/src/funcs/modelsGetModels.ts +14 -6
- package/src/funcs/modelsGetModelsCount.ts +14 -6
- package/src/funcs/modelsGetModelsUser.ts +26 -9
- package/src/funcs/oAuthPostAuthKeys.ts +171 -0
- package/src/funcs/oAuthPostAuthKeysCode.ts +171 -0
- package/src/funcs/{getProviders.ts → providersGetProviders.ts} +7 -3
- package/src/lib/config.ts +3 -7
- package/src/lib/env.ts +2 -4
- package/src/lib/security.ts +1 -8
- package/src/models/chaterror.ts +120 -0
- package/src/models/chatgenerationparams.ts +335 -249
- package/src/models/{chatcompletion.ts → chatresponse.ts} +34 -34
- package/src/models/chatresponsechoice.ts +132 -0
- package/src/models/chatstreamingchoice.ts +132 -0
- package/src/models/{chatcompletionchunkchoicedelta.ts → chatstreamingmessagechunk.ts} +30 -36
- package/src/models/chatstreamingmessagetoolcall.ts +149 -0
- package/src/models/chatstreamingresponsechunk.ts +250 -0
- package/src/models/completionchoice.ts +98 -0
- package/src/models/completioncreateparams.ts +912 -0
- package/src/models/completionerror.ts +128 -0
- package/src/models/completionfinishreason.ts +34 -0
- package/src/models/completionlogprobs.ts +91 -0
- package/src/models/completionresponse.ts +111 -0
- package/src/models/completionstreamingchoice.ts +98 -0
- package/src/models/completionstreamingresponsechunk.ts +186 -0
- package/src/models/completionusage.ts +85 -0
- package/src/models/errorresponse.ts +14 -85
- package/src/models/errors/chaterror.ts +79 -0
- package/src/models/errors/completionerror.ts +79 -0
- package/src/models/errors/errorresponse.ts +102 -0
- package/src/models/errors/index.ts +3 -1
- package/src/models/index.ts +17 -9
- package/src/models/message.ts +151 -49
- package/src/models/operations/deletekeyshash.ts +7 -68
- package/src/models/operations/getactivity.ts +7 -67
- package/src/models/operations/getauthkey.ts +7 -66
- package/src/models/operations/getcredits.ts +7 -66
- package/src/models/operations/getendpointszdr.ts +7 -70
- package/src/models/operations/getgeneration.ts +7 -68
- package/src/models/operations/getkey.ts +7 -66
- package/src/models/operations/getkeys.ts +7 -66
- package/src/models/operations/getkeyshash.ts +7 -68
- package/src/models/operations/getmodels.ts +3 -16
- package/src/models/operations/getmodelsauthorslugendpoints.ts +7 -79
- package/src/models/operations/getmodelscount.ts +7 -68
- package/src/models/operations/getmodelsuser.ts +64 -67
- package/src/models/operations/getparametersauthorslug.ts +66 -72
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/patchkeyshash.ts +7 -68
- package/src/models/operations/postauthkeys.ts +211 -0
- package/src/models/operations/postauthkeyscode.ts +289 -0
- package/src/models/operations/postchatcompletions.ts +8 -6
- package/src/models/operations/postcompletions.ts +78 -0
- package/src/models/operations/postcreditscoinbase.ts +66 -69
- package/src/models/operations/postembeddings.ts +7 -68
- package/src/models/operations/postkeys.ts +7 -66
- package/src/models/security.ts +4 -8
- package/src/models/toolresponsemessage.ts +144 -0
- package/src/react-query/{chatGenerateResponse.ts → chatSend.ts} +20 -30
- package/src/react-query/completionsCreate.ts +94 -0
- package/src/react-query/{getCredits.ts → creditsGetCredits.ts} +29 -27
- package/src/react-query/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +21 -18
- package/src/react-query/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +18 -19
- package/src/react-query/index.ts +9 -6
- package/src/react-query/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +37 -34
- package/src/react-query/modelsGetModelsUser.ts +8 -0
- package/src/react-query/oAuthPostAuthKeys.ts +88 -0
- package/src/react-query/oAuthPostAuthKeysCode.ts +89 -0
- package/src/react-query/{getProviders.ts → providersGetProviders.ts} +35 -27
- package/src/sdk/chat.ts +6 -11
- package/src/sdk/completions.ts +33 -0
- package/src/sdk/credits.ts +39 -0
- package/src/sdk/embeddings.ts +3 -3
- package/src/sdk/{parameters.ts → model.ts} +5 -3
- package/src/sdk/models.ts +2 -0
- package/src/sdk/oauth.ts +45 -0
- package/src/sdk/providers.ts +22 -0
- package/src/sdk/sdk.ts +27 -43
- package/dist/commonjs/funcs/chatGenerateResponse.d.ts.map +0 -1
- package/dist/commonjs/funcs/chatGenerateResponse.js.map +0 -1
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/commonjs/funcs/getCredits.d.ts.map +0 -1
- package/dist/commonjs/funcs/getCredits.js.map +0 -1
- package/dist/commonjs/funcs/getProviders.d.ts.map +0 -1
- package/dist/commonjs/funcs/getProviders.js.map +0 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.js.map +0 -1
- package/dist/commonjs/models/chatcompletion.d.ts +0 -43
- package/dist/commonjs/models/chatcompletion.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletion.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchoice.d.ts +0 -72
- package/dist/commonjs/models/chatcompletionchoice.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchoice.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchunk.d.ts +0 -68
- package/dist/commonjs/models/chatcompletionchunk.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchunk.js +0 -131
- package/dist/commonjs/models/chatcompletionchunk.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoice.d.ts +0 -72
- package/dist/commonjs/models/chatcompletionchunkchoice.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoice.js +0 -108
- package/dist/commonjs/models/chatcompletionchunkchoice.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.d.ts +0 -61
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoicedelta.js.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.d.ts +0 -62
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.js +0 -104
- package/dist/commonjs/models/chatcompletionchunkchoicedeltatoolcall.js.map +0 -1
- package/dist/commonjs/models/chatcompletionerror.d.ts +0 -35
- package/dist/commonjs/models/chatcompletionerror.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionerror.js.map +0 -1
- package/dist/commonjs/models/chatcompletionmessage.d.ts +0 -62
- package/dist/commonjs/models/chatcompletionmessage.d.ts.map +0 -1
- package/dist/commonjs/models/chatcompletionmessage.js +0 -113
- package/dist/commonjs/models/chatcompletionmessage.js.map +0 -1
- package/dist/commonjs/models/errors/chatcompletionerror.d.ts +0 -37
- package/dist/commonjs/models/errors/chatcompletionerror.d.ts.map +0 -1
- package/dist/commonjs/models/errors/chatcompletionerror.js.map +0 -1
- package/dist/commonjs/models/toolmessage.d.ts +0 -55
- package/dist/commonjs/models/toolmessage.d.ts.map +0 -1
- package/dist/commonjs/models/toolmessage.js.map +0 -1
- package/dist/commonjs/react-query/chatGenerateResponse.d.ts +0 -28
- package/dist/commonjs/react-query/chatGenerateResponse.d.ts.map +0 -1
- package/dist/commonjs/react-query/chatGenerateResponse.js +0 -50
- package/dist/commonjs/react-query/chatGenerateResponse.js.map +0 -1
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts +0 -23
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/commonjs/react-query/getCredits.d.ts +0 -23
- package/dist/commonjs/react-query/getCredits.d.ts.map +0 -1
- package/dist/commonjs/react-query/getCredits.js +0 -69
- package/dist/commonjs/react-query/getCredits.js.map +0 -1
- package/dist/commonjs/react-query/getProviders.d.ts +0 -17
- package/dist/commonjs/react-query/getProviders.d.ts.map +0 -1
- package/dist/commonjs/react-query/getProviders.js +0 -63
- package/dist/commonjs/react-query/getProviders.js.map +0 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts +0 -38
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js +0 -88
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts +0 -20
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.js +0 -44
- package/dist/commonjs/react-query/postCreditsCoinbase.js.map +0 -1
- package/dist/commonjs/sdk/parameters.d.ts +0 -9
- package/dist/commonjs/sdk/parameters.d.ts.map +0 -1
- package/dist/commonjs/sdk/parameters.js +0 -19
- package/dist/commonjs/sdk/parameters.js.map +0 -1
- package/dist/esm/funcs/chatGenerateResponse.d.ts.map +0 -1
- package/dist/esm/funcs/chatGenerateResponse.js.map +0 -1
- package/dist/esm/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/esm/funcs/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/esm/funcs/getCredits.d.ts.map +0 -1
- package/dist/esm/funcs/getCredits.js.map +0 -1
- package/dist/esm/funcs/getProviders.d.ts.map +0 -1
- package/dist/esm/funcs/getProviders.js.map +0 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/esm/funcs/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/esm/funcs/postCreditsCoinbase.js.map +0 -1
- package/dist/esm/models/chatcompletion.d.ts +0 -43
- package/dist/esm/models/chatcompletion.d.ts.map +0 -1
- package/dist/esm/models/chatcompletion.js +0 -54
- package/dist/esm/models/chatcompletion.js.map +0 -1
- package/dist/esm/models/chatcompletionchoice.d.ts +0 -72
- package/dist/esm/models/chatcompletionchoice.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchoice.js +0 -70
- package/dist/esm/models/chatcompletionchoice.js.map +0 -1
- package/dist/esm/models/chatcompletionchunk.d.ts +0 -68
- package/dist/esm/models/chatcompletionchunk.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchunk.js +0 -91
- package/dist/esm/models/chatcompletionchunk.js.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoice.d.ts +0 -72
- package/dist/esm/models/chatcompletionchunkchoice.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoice.js +0 -70
- package/dist/esm/models/chatcompletionchunkchoice.js.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoicedelta.d.ts +0 -61
- package/dist/esm/models/chatcompletionchunkchoicedelta.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoicedelta.js.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.d.ts +0 -62
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.js +0 -64
- package/dist/esm/models/chatcompletionchunkchoicedeltatoolcall.js.map +0 -1
- package/dist/esm/models/chatcompletionerror.d.ts +0 -35
- package/dist/esm/models/chatcompletionerror.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionerror.js +0 -37
- package/dist/esm/models/chatcompletionerror.js.map +0 -1
- package/dist/esm/models/chatcompletionmessage.d.ts +0 -62
- package/dist/esm/models/chatcompletionmessage.d.ts.map +0 -1
- package/dist/esm/models/chatcompletionmessage.js +0 -73
- package/dist/esm/models/chatcompletionmessage.js.map +0 -1
- package/dist/esm/models/errors/chatcompletionerror.d.ts +0 -37
- package/dist/esm/models/errors/chatcompletionerror.d.ts.map +0 -1
- package/dist/esm/models/errors/chatcompletionerror.js +0 -48
- package/dist/esm/models/errors/chatcompletionerror.js.map +0 -1
- package/dist/esm/models/toolmessage.d.ts +0 -55
- package/dist/esm/models/toolmessage.d.ts.map +0 -1
- package/dist/esm/models/toolmessage.js +0 -69
- package/dist/esm/models/toolmessage.js.map +0 -1
- package/dist/esm/react-query/chatGenerateResponse.d.ts +0 -28
- package/dist/esm/react-query/chatGenerateResponse.d.ts.map +0 -1
- package/dist/esm/react-query/chatGenerateResponse.js +0 -43
- package/dist/esm/react-query/chatGenerateResponse.js.map +0 -1
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts +0 -23
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/esm/react-query/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/esm/react-query/getCredits.d.ts +0 -23
- package/dist/esm/react-query/getCredits.d.ts.map +0 -1
- package/dist/esm/react-query/getCredits.js.map +0 -1
- package/dist/esm/react-query/getProviders.d.ts +0 -17
- package/dist/esm/react-query/getProviders.d.ts.map +0 -1
- package/dist/esm/react-query/getProviders.js +0 -54
- package/dist/esm/react-query/getProviders.js.map +0 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts +0 -38
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js +0 -78
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.d.ts +0 -20
- package/dist/esm/react-query/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.js.map +0 -1
- package/dist/esm/sdk/parameters.d.ts +0 -9
- package/dist/esm/sdk/parameters.d.ts.map +0 -1
- package/dist/esm/sdk/parameters.js +0 -15
- package/dist/esm/sdk/parameters.js.map +0 -1
- package/src/models/chatcompletionchoice.ts +0 -132
- package/src/models/chatcompletionchunk.ts +0 -169
- package/src/models/chatcompletionchunkchoice.ts +0 -139
- package/src/models/chatcompletionchunkchoicedeltatoolcall.ts +0 -166
- package/src/models/chatcompletionerror.ts +0 -78
- package/src/models/chatcompletionmessage.ts +0 -167
- package/src/models/errors/chatcompletionerror.ts +0 -79
- package/src/models/toolmessage.ts +0 -140
|
@@ -6,7 +6,7 @@ import { OpenRouterCore } from "../core.js";
|
|
|
6
6
|
import * as M from "../lib/matchers.js";
|
|
7
7
|
import { compactMap } from "../lib/primitives.js";
|
|
8
8
|
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
-
import {
|
|
9
|
+
import { resolveSecurity } from "../lib/security.js";
|
|
10
10
|
import { pathToFunc } from "../lib/url.js";
|
|
11
11
|
import {
|
|
12
12
|
ConnectionError,
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
RequestTimeoutError,
|
|
16
16
|
UnexpectedClientError,
|
|
17
17
|
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import * as errors from "../models/errors/index.js";
|
|
18
19
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
19
20
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -27,10 +28,12 @@ import { Result } from "../types/fp.js";
|
|
|
27
28
|
*/
|
|
28
29
|
export function modelsGetModelsUser(
|
|
29
30
|
client: OpenRouterCore,
|
|
31
|
+
security: operations.GetModelsUserSecurity,
|
|
30
32
|
options?: RequestOptions,
|
|
31
33
|
): APIPromise<
|
|
32
34
|
Result<
|
|
33
35
|
operations.GetModelsUserResponse,
|
|
36
|
+
| errors.ErrorResponse
|
|
34
37
|
| OpenRouterError
|
|
35
38
|
| ResponseValidationError
|
|
36
39
|
| ConnectionError
|
|
@@ -43,17 +46,20 @@ export function modelsGetModelsUser(
|
|
|
43
46
|
> {
|
|
44
47
|
return new APIPromise($do(
|
|
45
48
|
client,
|
|
49
|
+
security,
|
|
46
50
|
options,
|
|
47
51
|
));
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
async function $do(
|
|
51
55
|
client: OpenRouterCore,
|
|
56
|
+
security: operations.GetModelsUserSecurity,
|
|
52
57
|
options?: RequestOptions,
|
|
53
58
|
): Promise<
|
|
54
59
|
[
|
|
55
60
|
Result<
|
|
56
61
|
operations.GetModelsUserResponse,
|
|
62
|
+
| errors.ErrorResponse
|
|
57
63
|
| OpenRouterError
|
|
58
64
|
| ResponseValidationError
|
|
59
65
|
| ConnectionError
|
|
@@ -72,18 +78,25 @@ async function $do(
|
|
|
72
78
|
Accept: "application/json",
|
|
73
79
|
}));
|
|
74
80
|
|
|
75
|
-
const
|
|
76
|
-
|
|
81
|
+
const requestSecurity = resolveSecurity(
|
|
82
|
+
[
|
|
83
|
+
{
|
|
84
|
+
fieldName: "Authorization",
|
|
85
|
+
type: "apiKey:header",
|
|
86
|
+
value: security?.bearer,
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
);
|
|
77
90
|
|
|
78
91
|
const context = {
|
|
79
92
|
options: client._options,
|
|
80
93
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
81
94
|
operationID: "get_/models/user",
|
|
82
|
-
oAuth2Scopes:
|
|
95
|
+
oAuth2Scopes: null,
|
|
83
96
|
|
|
84
97
|
resolvedSecurity: requestSecurity,
|
|
85
98
|
|
|
86
|
-
securitySource:
|
|
99
|
+
securitySource: security,
|
|
87
100
|
retryConfig: options?.retries
|
|
88
101
|
|| client._options.retryConfig
|
|
89
102
|
|| { strategy: "none" },
|
|
@@ -115,8 +128,13 @@ async function $do(
|
|
|
115
128
|
}
|
|
116
129
|
const response = doResult.value;
|
|
117
130
|
|
|
131
|
+
const responseFields = {
|
|
132
|
+
HttpMeta: { Response: response, Request: req },
|
|
133
|
+
};
|
|
134
|
+
|
|
118
135
|
const [result] = await M.match<
|
|
119
136
|
operations.GetModelsUserResponse,
|
|
137
|
+
| errors.ErrorResponse
|
|
120
138
|
| OpenRouterError
|
|
121
139
|
| ResponseValidationError
|
|
122
140
|
| ConnectionError
|
|
@@ -127,10 +145,9 @@ async function $do(
|
|
|
127
145
|
| SDKValidationError
|
|
128
146
|
>(
|
|
129
147
|
M.json(200, operations.GetModelsUserResponse$inboundSchema),
|
|
130
|
-
M.
|
|
131
|
-
M.
|
|
132
|
-
|
|
133
|
-
)(response, req);
|
|
148
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
149
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
150
|
+
)(response, req, { extraFields: responseFields });
|
|
134
151
|
if (!result.ok) {
|
|
135
152
|
return [result, { status: "complete", request: req, response }];
|
|
136
153
|
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OpenRouterCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.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 { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Exchange authorization code for API key
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Exchange an authorization code from the PKCE flow for a user-controlled API key
|
|
33
|
+
*/
|
|
34
|
+
export function oAuthPostAuthKeys(
|
|
35
|
+
client: OpenRouterCore,
|
|
36
|
+
request?: operations.PostAuthKeysRequest | undefined,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.PostAuthKeysResponse,
|
|
41
|
+
| errors.ErrorResponse
|
|
42
|
+
| OpenRouterError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: OpenRouterCore,
|
|
61
|
+
request?: operations.PostAuthKeysRequest | undefined,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.PostAuthKeysResponse,
|
|
67
|
+
| errors.ErrorResponse
|
|
68
|
+
| OpenRouterError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.PostAuthKeysRequest$outboundSchema.optional().parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = payload === undefined
|
|
91
|
+
? null
|
|
92
|
+
: encodeJSON("body", payload, { explode: true });
|
|
93
|
+
|
|
94
|
+
const path = pathToFunc("/auth/keys")();
|
|
95
|
+
|
|
96
|
+
const headers = new Headers(compactMap({
|
|
97
|
+
"Content-Type": "application/json",
|
|
98
|
+
Accept: "application/json",
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
|
+
|
|
105
|
+
const context = {
|
|
106
|
+
options: client._options,
|
|
107
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
108
|
+
operationID: "post_/auth/keys",
|
|
109
|
+
oAuth2Scopes: [],
|
|
110
|
+
|
|
111
|
+
resolvedSecurity: requestSecurity,
|
|
112
|
+
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
|
+
retryConfig: options?.retries
|
|
115
|
+
|| client._options.retryConfig
|
|
116
|
+
|| { strategy: "none" },
|
|
117
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const requestRes = client._createRequest(context, {
|
|
121
|
+
security: requestSecurity,
|
|
122
|
+
method: "POST",
|
|
123
|
+
baseURL: options?.serverURL,
|
|
124
|
+
path: path,
|
|
125
|
+
headers: headers,
|
|
126
|
+
body: body,
|
|
127
|
+
userAgent: client._options.userAgent,
|
|
128
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
129
|
+
}, options);
|
|
130
|
+
if (!requestRes.ok) {
|
|
131
|
+
return [requestRes, { status: "invalid" }];
|
|
132
|
+
}
|
|
133
|
+
const req = requestRes.value;
|
|
134
|
+
|
|
135
|
+
const doResult = await client._do(req, {
|
|
136
|
+
context,
|
|
137
|
+
errorCodes: ["4XX", "5XX"],
|
|
138
|
+
retryConfig: context.retryConfig,
|
|
139
|
+
retryCodes: context.retryCodes,
|
|
140
|
+
});
|
|
141
|
+
if (!doResult.ok) {
|
|
142
|
+
return [doResult, { status: "request-error", request: req }];
|
|
143
|
+
}
|
|
144
|
+
const response = doResult.value;
|
|
145
|
+
|
|
146
|
+
const responseFields = {
|
|
147
|
+
HttpMeta: { Response: response, Request: req },
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const [result] = await M.match<
|
|
151
|
+
operations.PostAuthKeysResponse,
|
|
152
|
+
| errors.ErrorResponse
|
|
153
|
+
| OpenRouterError
|
|
154
|
+
| ResponseValidationError
|
|
155
|
+
| ConnectionError
|
|
156
|
+
| RequestAbortedError
|
|
157
|
+
| RequestTimeoutError
|
|
158
|
+
| InvalidRequestError
|
|
159
|
+
| UnexpectedClientError
|
|
160
|
+
| SDKValidationError
|
|
161
|
+
>(
|
|
162
|
+
M.json(200, operations.PostAuthKeysResponse$inboundSchema),
|
|
163
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
164
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
165
|
+
)(response, req, { extraFields: responseFields });
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OpenRouterCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.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 { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Create authorization code
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Create an authorization code for the PKCE flow to generate a user-controlled API key
|
|
33
|
+
*/
|
|
34
|
+
export function oAuthPostAuthKeysCode(
|
|
35
|
+
client: OpenRouterCore,
|
|
36
|
+
request?: operations.PostAuthKeysCodeRequest | undefined,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.PostAuthKeysCodeResponse,
|
|
41
|
+
| errors.ErrorResponse
|
|
42
|
+
| OpenRouterError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: OpenRouterCore,
|
|
61
|
+
request?: operations.PostAuthKeysCodeRequest | undefined,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.PostAuthKeysCodeResponse,
|
|
67
|
+
| errors.ErrorResponse
|
|
68
|
+
| OpenRouterError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.PostAuthKeysCodeRequest$outboundSchema.optional().parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = payload === undefined
|
|
91
|
+
? null
|
|
92
|
+
: encodeJSON("body", payload, { explode: true });
|
|
93
|
+
|
|
94
|
+
const path = pathToFunc("/auth/keys/code")();
|
|
95
|
+
|
|
96
|
+
const headers = new Headers(compactMap({
|
|
97
|
+
"Content-Type": "application/json",
|
|
98
|
+
Accept: "application/json",
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
|
+
|
|
105
|
+
const context = {
|
|
106
|
+
options: client._options,
|
|
107
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
108
|
+
operationID: "post_/auth/keys/code",
|
|
109
|
+
oAuth2Scopes: [],
|
|
110
|
+
|
|
111
|
+
resolvedSecurity: requestSecurity,
|
|
112
|
+
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
|
+
retryConfig: options?.retries
|
|
115
|
+
|| client._options.retryConfig
|
|
116
|
+
|| { strategy: "none" },
|
|
117
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const requestRes = client._createRequest(context, {
|
|
121
|
+
security: requestSecurity,
|
|
122
|
+
method: "POST",
|
|
123
|
+
baseURL: options?.serverURL,
|
|
124
|
+
path: path,
|
|
125
|
+
headers: headers,
|
|
126
|
+
body: body,
|
|
127
|
+
userAgent: client._options.userAgent,
|
|
128
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
129
|
+
}, options);
|
|
130
|
+
if (!requestRes.ok) {
|
|
131
|
+
return [requestRes, { status: "invalid" }];
|
|
132
|
+
}
|
|
133
|
+
const req = requestRes.value;
|
|
134
|
+
|
|
135
|
+
const doResult = await client._do(req, {
|
|
136
|
+
context,
|
|
137
|
+
errorCodes: ["4XX", "5XX"],
|
|
138
|
+
retryConfig: context.retryConfig,
|
|
139
|
+
retryCodes: context.retryCodes,
|
|
140
|
+
});
|
|
141
|
+
if (!doResult.ok) {
|
|
142
|
+
return [doResult, { status: "request-error", request: req }];
|
|
143
|
+
}
|
|
144
|
+
const response = doResult.value;
|
|
145
|
+
|
|
146
|
+
const responseFields = {
|
|
147
|
+
HttpMeta: { Response: response, Request: req },
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const [result] = await M.match<
|
|
151
|
+
operations.PostAuthKeysCodeResponse,
|
|
152
|
+
| errors.ErrorResponse
|
|
153
|
+
| OpenRouterError
|
|
154
|
+
| ResponseValidationError
|
|
155
|
+
| ConnectionError
|
|
156
|
+
| RequestAbortedError
|
|
157
|
+
| RequestTimeoutError
|
|
158
|
+
| InvalidRequestError
|
|
159
|
+
| UnexpectedClientError
|
|
160
|
+
| SDKValidationError
|
|
161
|
+
>(
|
|
162
|
+
M.json(200, operations.PostAuthKeysCodeResponse$inboundSchema),
|
|
163
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
164
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
165
|
+
)(response, req, { extraFields: responseFields });
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
|
@@ -23,7 +23,10 @@ import * as operations from "../models/operations/index.js";
|
|
|
23
23
|
import { APICall, APIPromise } from "../types/async.js";
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* List all available model providers
|
|
28
|
+
*/
|
|
29
|
+
export function providersGetProviders(
|
|
27
30
|
client: OpenRouterCore,
|
|
28
31
|
options?: RequestOptions,
|
|
29
32
|
): APIPromise<
|
|
@@ -72,7 +75,8 @@ async function $do(
|
|
|
72
75
|
Accept: "application/json",
|
|
73
76
|
}));
|
|
74
77
|
|
|
75
|
-
const
|
|
78
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
79
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
76
80
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
81
|
|
|
78
82
|
const context = {
|
|
@@ -83,7 +87,7 @@ async function $do(
|
|
|
83
87
|
|
|
84
88
|
resolvedSecurity: requestSecurity,
|
|
85
89
|
|
|
86
|
-
securitySource: client._options.
|
|
90
|
+
securitySource: client._options.apiKey,
|
|
87
91
|
retryConfig: options?.retries
|
|
88
92
|
|| client._options.retryConfig
|
|
89
93
|
|| { strategy: "none" },
|
package/src/lib/config.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as models from "../models/index.js";
|
|
6
5
|
import { HTTPClient } from "./http.js";
|
|
7
6
|
import { Logger } from "./logger.js";
|
|
8
7
|
import { RetryConfig } from "./retries.js";
|
|
@@ -20,10 +19,7 @@ export const ServerList = {
|
|
|
20
19
|
} as const;
|
|
21
20
|
|
|
22
21
|
export type SDKOptions = {
|
|
23
|
-
|
|
24
|
-
* The security details required to authenticate the SDK
|
|
25
|
-
*/
|
|
26
|
-
security?: models.Security | (() => Promise<models.Security>) | undefined;
|
|
22
|
+
apiKey?: string | (() => Promise<string>) | undefined;
|
|
27
23
|
|
|
28
24
|
httpClient?: HTTPClient;
|
|
29
25
|
/**
|
|
@@ -63,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
63
59
|
export const SDK_METADATA = {
|
|
64
60
|
language: "typescript",
|
|
65
61
|
openapiDocVersion: "1.0.0",
|
|
66
|
-
sdkVersion: "0.0.0-beta.
|
|
62
|
+
sdkVersion: "0.0.0-beta.8",
|
|
67
63
|
genVersion: "2.715.0",
|
|
68
64
|
userAgent:
|
|
69
|
-
"speakeasy-sdk/typescript 0.0.0-beta.
|
|
65
|
+
"speakeasy-sdk/typescript 0.0.0-beta.8 2.715.0 1.0.0 @openrouter/sdk",
|
|
70
66
|
} as const;
|
package/src/lib/env.ts
CHANGED
|
@@ -7,15 +7,13 @@ import { dlv } from "./dlv.js";
|
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
|
|
9
9
|
export interface Env {
|
|
10
|
-
|
|
11
|
-
OPENROUTER_BEARER_AUTH?: string | undefined;
|
|
10
|
+
OPENROUTER_API_KEY?: string | undefined;
|
|
12
11
|
|
|
13
12
|
OPENROUTER_DEBUG?: boolean | undefined;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
export const envSchema: z.ZodType<Env, z.ZodTypeDef, unknown> = z.object({
|
|
17
|
-
|
|
18
|
-
OPENROUTER_BEARER_AUTH: z.string().optional(),
|
|
16
|
+
OPENROUTER_API_KEY: z.string().optional(),
|
|
19
17
|
|
|
20
18
|
OPENROUTER_DEBUG: z.coerce.boolean().optional(),
|
|
21
19
|
});
|
package/src/lib/security.ts
CHANGED
|
@@ -243,18 +243,11 @@ export function resolveGlobalSecurity(
|
|
|
243
243
|
security: Partial<models.Security> | null | undefined,
|
|
244
244
|
): SecurityState | null {
|
|
245
245
|
return resolveSecurity(
|
|
246
|
-
[
|
|
247
|
-
{
|
|
248
|
-
fieldName: "Authorization",
|
|
249
|
-
type: "apiKey:header",
|
|
250
|
-
value: security?.apiKeyAuth ?? env().OPENROUTER_API_KEY_AUTH,
|
|
251
|
-
},
|
|
252
|
-
],
|
|
253
246
|
[
|
|
254
247
|
{
|
|
255
248
|
fieldName: "Authorization",
|
|
256
249
|
type: "http:bearer",
|
|
257
|
-
value: security?.
|
|
250
|
+
value: security?.apiKey ?? env().OPENROUTER_API_KEY,
|
|
258
251
|
},
|
|
259
252
|
],
|
|
260
253
|
);
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type ChatErrorCode = string | number;
|
|
11
|
+
|
|
12
|
+
export type ChatErrorError = {
|
|
13
|
+
code: string | number | null;
|
|
14
|
+
message: string;
|
|
15
|
+
param: string | null;
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const ChatErrorCode$inboundSchema: z.ZodType<
|
|
21
|
+
ChatErrorCode,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.union([z.string(), z.number()]);
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type ChatErrorCode$Outbound = string | number;
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const ChatErrorCode$outboundSchema: z.ZodType<
|
|
31
|
+
ChatErrorCode$Outbound,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
ChatErrorCode
|
|
34
|
+
> = z.union([z.string(), z.number()]);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
39
|
+
*/
|
|
40
|
+
export namespace ChatErrorCode$ {
|
|
41
|
+
/** @deprecated use `ChatErrorCode$inboundSchema` instead. */
|
|
42
|
+
export const inboundSchema = ChatErrorCode$inboundSchema;
|
|
43
|
+
/** @deprecated use `ChatErrorCode$outboundSchema` instead. */
|
|
44
|
+
export const outboundSchema = ChatErrorCode$outboundSchema;
|
|
45
|
+
/** @deprecated use `ChatErrorCode$Outbound` instead. */
|
|
46
|
+
export type Outbound = ChatErrorCode$Outbound;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function chatErrorCodeToJSON(chatErrorCode: ChatErrorCode): string {
|
|
50
|
+
return JSON.stringify(ChatErrorCode$outboundSchema.parse(chatErrorCode));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function chatErrorCodeFromJSON(
|
|
54
|
+
jsonString: string,
|
|
55
|
+
): SafeParseResult<ChatErrorCode, SDKValidationError> {
|
|
56
|
+
return safeParse(
|
|
57
|
+
jsonString,
|
|
58
|
+
(x) => ChatErrorCode$inboundSchema.parse(JSON.parse(x)),
|
|
59
|
+
`Failed to parse 'ChatErrorCode' from JSON`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const ChatErrorError$inboundSchema: z.ZodType<
|
|
65
|
+
ChatErrorError,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
unknown
|
|
68
|
+
> = z.object({
|
|
69
|
+
code: z.nullable(z.union([z.string(), z.number()])),
|
|
70
|
+
message: z.string(),
|
|
71
|
+
param: z.nullable(z.string()),
|
|
72
|
+
type: z.string(),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export type ChatErrorError$Outbound = {
|
|
77
|
+
code: string | number | null;
|
|
78
|
+
message: string;
|
|
79
|
+
param: string | null;
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const ChatErrorError$outboundSchema: z.ZodType<
|
|
85
|
+
ChatErrorError$Outbound,
|
|
86
|
+
z.ZodTypeDef,
|
|
87
|
+
ChatErrorError
|
|
88
|
+
> = z.object({
|
|
89
|
+
code: z.nullable(z.union([z.string(), z.number()])),
|
|
90
|
+
message: z.string(),
|
|
91
|
+
param: z.nullable(z.string()),
|
|
92
|
+
type: z.string(),
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
|
+
*/
|
|
99
|
+
export namespace ChatErrorError$ {
|
|
100
|
+
/** @deprecated use `ChatErrorError$inboundSchema` instead. */
|
|
101
|
+
export const inboundSchema = ChatErrorError$inboundSchema;
|
|
102
|
+
/** @deprecated use `ChatErrorError$outboundSchema` instead. */
|
|
103
|
+
export const outboundSchema = ChatErrorError$outboundSchema;
|
|
104
|
+
/** @deprecated use `ChatErrorError$Outbound` instead. */
|
|
105
|
+
export type Outbound = ChatErrorError$Outbound;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function chatErrorErrorToJSON(chatErrorError: ChatErrorError): string {
|
|
109
|
+
return JSON.stringify(ChatErrorError$outboundSchema.parse(chatErrorError));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function chatErrorErrorFromJSON(
|
|
113
|
+
jsonString: string,
|
|
114
|
+
): SafeParseResult<ChatErrorError, SDKValidationError> {
|
|
115
|
+
return safeParse(
|
|
116
|
+
jsonString,
|
|
117
|
+
(x) => ChatErrorError$inboundSchema.parse(JSON.parse(x)),
|
|
118
|
+
`Failed to parse 'ChatErrorError' from JSON`,
|
|
119
|
+
);
|
|
120
|
+
}
|