@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
|
@@ -1,54 +1,103 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import { OpenEnum } from "../types/enums.js";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { ChatStreamOptions, ChatStreamOptions$Outbound } from "./chatstreamoptions.js";
|
|
4
|
+
import { DataCollection } from "./datacollection.js";
|
|
5
|
+
import { DebugOptions, DebugOptions$Outbound } from "./debugoptions.js";
|
|
4
6
|
import { Message, Message$Outbound } from "./message.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
+
import { PDFParserOptions, PDFParserOptions$Outbound } from "./pdfparseroptions.js";
|
|
8
|
+
import { PreferredMaxLatency, PreferredMaxLatency$Outbound } from "./preferredmaxlatency.js";
|
|
9
|
+
import { PreferredMinThroughput, PreferredMinThroughput$Outbound } from "./preferredminthroughput.js";
|
|
10
|
+
import { ProviderName } from "./providername.js";
|
|
11
|
+
import { Quantization } from "./quantization.js";
|
|
12
|
+
import { ResponseFormatJSONObject, ResponseFormatJSONObject$Outbound } from "./responseformatjsonobject.js";
|
|
7
13
|
import { ResponseFormatJSONSchema, ResponseFormatJSONSchema$Outbound } from "./responseformatjsonschema.js";
|
|
14
|
+
import { ResponseFormatText, ResponseFormatText$Outbound } from "./responseformattext.js";
|
|
8
15
|
import { ResponseFormatTextGrammar, ResponseFormatTextGrammar$Outbound } from "./responseformattextgrammar.js";
|
|
9
|
-
import {
|
|
16
|
+
import { ResponseFormatTextPython, ResponseFormatTextPython$Outbound } from "./responseformattextpython.js";
|
|
17
|
+
import { ToolChoiceOption, ToolChoiceOption$Outbound } from "./toolchoiceoption.js";
|
|
10
18
|
import { ToolDefinitionJson, ToolDefinitionJson$Outbound } from "./tooldefinitionjson.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
import { WebSearchEngine } from "./websearchengine.js";
|
|
20
|
+
export type ChatGenerationParamsOrder = ProviderName | string;
|
|
21
|
+
export type ChatGenerationParamsOnly = ProviderName | string;
|
|
22
|
+
export type ChatGenerationParamsIgnore = ProviderName | string;
|
|
23
|
+
export declare const ChatGenerationParamsSortEnum: {
|
|
24
|
+
readonly Price: "price";
|
|
25
|
+
readonly Throughput: "throughput";
|
|
26
|
+
readonly Latency: "latency";
|
|
27
|
+
};
|
|
28
|
+
export type ChatGenerationParamsSortEnum = OpenEnum<typeof ChatGenerationParamsSortEnum>;
|
|
29
|
+
export declare const ChatGenerationParamsProviderSortConfigEnum: {
|
|
30
|
+
readonly Price: "price";
|
|
31
|
+
readonly Throughput: "throughput";
|
|
32
|
+
readonly Latency: "latency";
|
|
33
|
+
};
|
|
34
|
+
export type ChatGenerationParamsProviderSortConfigEnum = ClosedEnum<typeof ChatGenerationParamsProviderSortConfigEnum>;
|
|
35
|
+
/**
|
|
36
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
37
|
+
*/
|
|
38
|
+
export declare const ChatGenerationParamsBy: {
|
|
39
|
+
readonly Price: "price";
|
|
40
|
+
readonly Throughput: "throughput";
|
|
41
|
+
readonly Latency: "latency";
|
|
14
42
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly Unknown: "unknown";
|
|
43
|
+
/**
|
|
44
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
45
|
+
*/
|
|
46
|
+
export type ChatGenerationParamsBy = OpenEnum<typeof ChatGenerationParamsBy>;
|
|
47
|
+
/**
|
|
48
|
+
* Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ChatGenerationParamsPartition: {
|
|
51
|
+
readonly Model: "model";
|
|
52
|
+
readonly None: "none";
|
|
26
53
|
};
|
|
27
|
-
export type Quantizations = OpenEnum<typeof Quantizations>;
|
|
28
54
|
/**
|
|
29
|
-
*
|
|
55
|
+
* Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
|
|
30
56
|
*/
|
|
31
|
-
export type
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
57
|
+
export type ChatGenerationParamsPartition = OpenEnum<typeof ChatGenerationParamsPartition>;
|
|
58
|
+
export type ChatGenerationParamsProviderSortConfig = {
|
|
59
|
+
/**
|
|
60
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
61
|
+
*/
|
|
62
|
+
by?: ChatGenerationParamsBy | null | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
|
|
65
|
+
*/
|
|
66
|
+
partition?: ChatGenerationParamsPartition | null | undefined;
|
|
37
67
|
};
|
|
38
|
-
export type
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
68
|
+
export type ChatGenerationParamsProviderSortConfigUnion = ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum;
|
|
69
|
+
/**
|
|
70
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
71
|
+
*/
|
|
72
|
+
export declare const ChatGenerationParamsProviderSort: {
|
|
73
|
+
readonly Price: "price";
|
|
74
|
+
readonly Throughput: "throughput";
|
|
75
|
+
readonly Latency: "latency";
|
|
43
76
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
77
|
+
/**
|
|
78
|
+
* The provider sorting strategy (price, throughput, latency)
|
|
79
|
+
*/
|
|
80
|
+
export type ChatGenerationParamsProviderSort = OpenEnum<typeof ChatGenerationParamsProviderSort>;
|
|
81
|
+
/**
|
|
82
|
+
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
83
|
+
*/
|
|
84
|
+
export type ChatGenerationParamsSortUnion = ChatGenerationParamsProviderSort | ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum | ChatGenerationParamsSortEnum;
|
|
85
|
+
/**
|
|
86
|
+
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
87
|
+
*/
|
|
88
|
+
export type ChatGenerationParamsMaxPrice = {
|
|
89
|
+
/**
|
|
90
|
+
* Price per million prompt tokens
|
|
91
|
+
*/
|
|
92
|
+
prompt?: string | undefined;
|
|
93
|
+
completion?: string | undefined;
|
|
94
|
+
image?: string | undefined;
|
|
95
|
+
audio?: string | undefined;
|
|
96
|
+
request?: string | undefined;
|
|
50
97
|
};
|
|
51
|
-
|
|
98
|
+
/**
|
|
99
|
+
* When multiple model providers are available, optionally indicate your routing preference.
|
|
100
|
+
*/
|
|
52
101
|
export type ChatGenerationParamsProvider = {
|
|
53
102
|
/**
|
|
54
103
|
* Whether to allow backup providers to serve requests
|
|
@@ -70,29 +119,32 @@ export type ChatGenerationParamsProvider = {
|
|
|
70
119
|
*
|
|
71
120
|
* - deny: use only providers which do not collect user data.
|
|
72
121
|
*/
|
|
73
|
-
dataCollection?:
|
|
122
|
+
dataCollection?: DataCollection | null | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
|
|
125
|
+
*/
|
|
74
126
|
zdr?: boolean | null | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
|
|
129
|
+
*/
|
|
75
130
|
enforceDistillableText?: boolean | null | undefined;
|
|
76
131
|
/**
|
|
77
132
|
* An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
|
|
78
133
|
*/
|
|
79
|
-
order?: Array<
|
|
134
|
+
order?: Array<ProviderName | string> | null | undefined;
|
|
80
135
|
/**
|
|
81
136
|
* List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
|
|
82
137
|
*/
|
|
83
|
-
only?: Array<
|
|
138
|
+
only?: Array<ProviderName | string> | null | undefined;
|
|
84
139
|
/**
|
|
85
140
|
* List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
|
|
86
141
|
*/
|
|
87
|
-
ignore?: Array<
|
|
142
|
+
ignore?: Array<ProviderName | string> | null | undefined;
|
|
88
143
|
/**
|
|
89
144
|
* A list of quantization levels to filter the provider by.
|
|
90
145
|
*/
|
|
91
|
-
quantizations?: Array<
|
|
92
|
-
|
|
93
|
-
* The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
|
|
94
|
-
*/
|
|
95
|
-
sort?: ProviderSortUnion | null | undefined;
|
|
146
|
+
quantizations?: Array<Quantization> | null | undefined;
|
|
147
|
+
sort?: ChatGenerationParamsProviderSort | ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum | ChatGenerationParamsSortEnum | null | undefined;
|
|
96
148
|
/**
|
|
97
149
|
* The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
|
|
98
150
|
*/
|
|
@@ -100,56 +152,74 @@ export type ChatGenerationParamsProvider = {
|
|
|
100
152
|
/**
|
|
101
153
|
* Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
|
102
154
|
*/
|
|
103
|
-
preferredMinThroughput?:
|
|
155
|
+
preferredMinThroughput?: PreferredMinThroughput | null | undefined;
|
|
104
156
|
/**
|
|
105
157
|
* Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
|
|
106
158
|
*/
|
|
107
|
-
preferredMaxLatency?:
|
|
159
|
+
preferredMaxLatency?: PreferredMaxLatency | null | undefined;
|
|
108
160
|
};
|
|
109
161
|
export type ChatGenerationParamsPluginResponseHealing = {
|
|
110
162
|
id: "response-healing";
|
|
163
|
+
/**
|
|
164
|
+
* Set to false to disable the response-healing plugin for this request. Defaults to true.
|
|
165
|
+
*/
|
|
111
166
|
enabled?: boolean | undefined;
|
|
112
167
|
};
|
|
113
|
-
export declare const PdfEngine: {
|
|
114
|
-
readonly MistralOcr: "mistral-ocr";
|
|
115
|
-
readonly PdfText: "pdf-text";
|
|
116
|
-
readonly Native: "native";
|
|
117
|
-
};
|
|
118
|
-
export type PdfEngine = OpenEnum<typeof PdfEngine>;
|
|
119
|
-
export type Pdf = {
|
|
120
|
-
engine?: PdfEngine | undefined;
|
|
121
|
-
};
|
|
122
168
|
export type ChatGenerationParamsPluginFileParser = {
|
|
123
169
|
id: "file-parser";
|
|
170
|
+
/**
|
|
171
|
+
* Set to false to disable the file-parser plugin for this request. Defaults to true.
|
|
172
|
+
*/
|
|
124
173
|
enabled?: boolean | undefined;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
readonly Exa: "exa";
|
|
174
|
+
/**
|
|
175
|
+
* Options for PDF parsing.
|
|
176
|
+
*/
|
|
177
|
+
pdf?: PDFParserOptions | undefined;
|
|
130
178
|
};
|
|
131
|
-
export type Engine = OpenEnum<typeof Engine>;
|
|
132
179
|
export type ChatGenerationParamsPluginWeb = {
|
|
133
180
|
id: "web";
|
|
181
|
+
/**
|
|
182
|
+
* Set to false to disable the web-search plugin for this request. Defaults to true.
|
|
183
|
+
*/
|
|
134
184
|
enabled?: boolean | undefined;
|
|
135
185
|
maxResults?: number | undefined;
|
|
136
186
|
searchPrompt?: string | undefined;
|
|
137
|
-
|
|
187
|
+
/**
|
|
188
|
+
* The search engine to use for web search.
|
|
189
|
+
*/
|
|
190
|
+
engine?: WebSearchEngine | undefined;
|
|
138
191
|
};
|
|
139
192
|
export type ChatGenerationParamsPluginModeration = {
|
|
140
193
|
id: "moderation";
|
|
141
194
|
};
|
|
142
195
|
export type ChatGenerationParamsPluginAutoRouter = {
|
|
143
196
|
id: "auto-router";
|
|
197
|
+
/**
|
|
198
|
+
* Set to false to disable the auto-router plugin for this request. Defaults to true.
|
|
199
|
+
*/
|
|
144
200
|
enabled?: boolean | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
|
|
203
|
+
*/
|
|
145
204
|
allowedModels?: Array<string> | undefined;
|
|
146
205
|
};
|
|
147
206
|
export type ChatGenerationParamsPluginUnion = ChatGenerationParamsPluginAutoRouter | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
207
|
+
/**
|
|
208
|
+
* Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
|
209
|
+
*/
|
|
210
|
+
export type ChatGenerationParamsTrace = {
|
|
211
|
+
traceId?: string | undefined;
|
|
212
|
+
traceName?: string | undefined;
|
|
213
|
+
spanName?: string | undefined;
|
|
214
|
+
generationName?: string | undefined;
|
|
215
|
+
parentSpanId?: string | undefined;
|
|
216
|
+
additionalProperties?: {
|
|
217
|
+
[k: string]: any | null;
|
|
218
|
+
} | undefined;
|
|
151
219
|
};
|
|
152
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Constrains effort on reasoning for reasoning models
|
|
222
|
+
*/
|
|
153
223
|
export declare const Effort: {
|
|
154
224
|
readonly Xhigh: "xhigh";
|
|
155
225
|
readonly High: "high";
|
|
@@ -158,31 +228,37 @@ export declare const Effort: {
|
|
|
158
228
|
readonly Minimal: "minimal";
|
|
159
229
|
readonly None: "none";
|
|
160
230
|
};
|
|
231
|
+
/**
|
|
232
|
+
* Constrains effort on reasoning for reasoning models
|
|
233
|
+
*/
|
|
161
234
|
export type Effort = OpenEnum<typeof Effort>;
|
|
235
|
+
/**
|
|
236
|
+
* Configuration options for reasoning models
|
|
237
|
+
*/
|
|
162
238
|
export type Reasoning = {
|
|
239
|
+
/**
|
|
240
|
+
* Constrains effort on reasoning for reasoning models
|
|
241
|
+
*/
|
|
163
242
|
effort?: Effort | null | undefined;
|
|
164
|
-
summary?:
|
|
165
|
-
};
|
|
166
|
-
export type ResponseFormatPython = {
|
|
167
|
-
type: "python";
|
|
168
|
-
};
|
|
169
|
-
export type ResponseFormatJSONObject = {
|
|
170
|
-
type: "json_object";
|
|
171
|
-
};
|
|
172
|
-
export type ResponseFormatText = {
|
|
173
|
-
type: "text";
|
|
174
|
-
};
|
|
175
|
-
export type ResponseFormat = ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatPython;
|
|
176
|
-
export type Stop = string | Array<string>;
|
|
177
|
-
export type Debug = {
|
|
178
|
-
echoUpstreamBody?: boolean | undefined;
|
|
243
|
+
summary?: any | null | undefined;
|
|
179
244
|
};
|
|
180
|
-
|
|
245
|
+
/**
|
|
246
|
+
* Response format configuration
|
|
247
|
+
*/
|
|
248
|
+
export type ResponseFormat = ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatTextPython;
|
|
249
|
+
/**
|
|
250
|
+
* Stop sequences (up to 4)
|
|
251
|
+
*/
|
|
252
|
+
export type Stop = string | Array<string> | any;
|
|
253
|
+
export type ChatGenerationParamsImageConfig = string | number | Array<any | null>;
|
|
181
254
|
export declare const Modality: {
|
|
182
255
|
readonly Text: "text";
|
|
183
256
|
readonly Image: "image";
|
|
184
257
|
};
|
|
185
258
|
export type Modality = OpenEnum<typeof Modality>;
|
|
259
|
+
/**
|
|
260
|
+
* Chat completion request parameters
|
|
261
|
+
*/
|
|
186
262
|
export type ChatGenerationParams = {
|
|
187
263
|
/**
|
|
188
264
|
* When multiple model providers are available, optionally indicate your routing preference.
|
|
@@ -192,88 +268,176 @@ export type ChatGenerationParams = {
|
|
|
192
268
|
* Plugins you want to enable for this request, including their settings.
|
|
193
269
|
*/
|
|
194
270
|
plugins?: Array<ChatGenerationParamsPluginAutoRouter | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing> | undefined;
|
|
195
|
-
|
|
271
|
+
/**
|
|
272
|
+
* Unique user identifier
|
|
273
|
+
*/
|
|
196
274
|
user?: string | undefined;
|
|
197
275
|
/**
|
|
198
276
|
* A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
|
|
199
277
|
*/
|
|
200
278
|
sessionId?: string | undefined;
|
|
279
|
+
/**
|
|
280
|
+
* Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
|
|
281
|
+
*/
|
|
282
|
+
trace?: ChatGenerationParamsTrace | undefined;
|
|
283
|
+
/**
|
|
284
|
+
* List of messages for the conversation
|
|
285
|
+
*/
|
|
201
286
|
messages: Array<Message>;
|
|
287
|
+
/**
|
|
288
|
+
* Model to use for completion
|
|
289
|
+
*/
|
|
202
290
|
model?: string | undefined;
|
|
291
|
+
/**
|
|
292
|
+
* Models to use for completion
|
|
293
|
+
*/
|
|
203
294
|
models?: Array<string> | undefined;
|
|
295
|
+
/**
|
|
296
|
+
* Frequency penalty (-2.0 to 2.0)
|
|
297
|
+
*/
|
|
204
298
|
frequencyPenalty?: number | null | undefined;
|
|
299
|
+
/**
|
|
300
|
+
* Token logit bias adjustments
|
|
301
|
+
*/
|
|
205
302
|
logitBias?: {
|
|
206
303
|
[k: string]: number;
|
|
207
304
|
} | null | undefined;
|
|
305
|
+
/**
|
|
306
|
+
* Return log probabilities
|
|
307
|
+
*/
|
|
208
308
|
logprobs?: boolean | null | undefined;
|
|
309
|
+
/**
|
|
310
|
+
* Number of top log probabilities to return (0-20)
|
|
311
|
+
*/
|
|
209
312
|
topLogprobs?: number | null | undefined;
|
|
313
|
+
/**
|
|
314
|
+
* Maximum tokens in completion
|
|
315
|
+
*/
|
|
210
316
|
maxCompletionTokens?: number | null | undefined;
|
|
317
|
+
/**
|
|
318
|
+
* Maximum tokens (deprecated, use max_completion_tokens)
|
|
319
|
+
*/
|
|
211
320
|
maxTokens?: number | null | undefined;
|
|
321
|
+
/**
|
|
322
|
+
* Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
|
|
323
|
+
*/
|
|
212
324
|
metadata?: {
|
|
213
325
|
[k: string]: string;
|
|
214
326
|
} | undefined;
|
|
327
|
+
/**
|
|
328
|
+
* Presence penalty (-2.0 to 2.0)
|
|
329
|
+
*/
|
|
215
330
|
presencePenalty?: number | null | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* Configuration options for reasoning models
|
|
333
|
+
*/
|
|
216
334
|
reasoning?: Reasoning | undefined;
|
|
217
|
-
|
|
335
|
+
/**
|
|
336
|
+
* Response format configuration
|
|
337
|
+
*/
|
|
338
|
+
responseFormat?: ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatTextPython | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* Random seed for deterministic outputs
|
|
341
|
+
*/
|
|
218
342
|
seed?: number | null | undefined;
|
|
219
|
-
|
|
343
|
+
/**
|
|
344
|
+
* Stop sequences (up to 4)
|
|
345
|
+
*/
|
|
346
|
+
stop?: string | Array<string> | any | null | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* Enable streaming response
|
|
349
|
+
*/
|
|
220
350
|
stream?: boolean | undefined;
|
|
351
|
+
/**
|
|
352
|
+
* Streaming configuration options
|
|
353
|
+
*/
|
|
221
354
|
streamOptions?: ChatStreamOptions | null | undefined;
|
|
355
|
+
/**
|
|
356
|
+
* Sampling temperature (0-2)
|
|
357
|
+
*/
|
|
222
358
|
temperature?: number | null | undefined;
|
|
223
|
-
|
|
359
|
+
parallelToolCalls?: boolean | null | undefined;
|
|
360
|
+
/**
|
|
361
|
+
* Tool choice configuration
|
|
362
|
+
*/
|
|
363
|
+
toolChoice?: ToolChoiceOption | undefined;
|
|
364
|
+
/**
|
|
365
|
+
* Available tools for function calling
|
|
366
|
+
*/
|
|
224
367
|
tools?: Array<ToolDefinitionJson> | undefined;
|
|
368
|
+
/**
|
|
369
|
+
* Nucleus sampling parameter (0-1)
|
|
370
|
+
*/
|
|
225
371
|
topP?: number | null | undefined;
|
|
226
|
-
|
|
372
|
+
/**
|
|
373
|
+
* Debug options for inspecting request transformations (streaming only)
|
|
374
|
+
*/
|
|
375
|
+
debug?: DebugOptions | undefined;
|
|
376
|
+
/**
|
|
377
|
+
* Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
|
|
378
|
+
*/
|
|
227
379
|
imageConfig?: {
|
|
228
|
-
[k: string]: string | number
|
|
380
|
+
[k: string]: string | number | Array<any | null>;
|
|
229
381
|
} | undefined;
|
|
382
|
+
/**
|
|
383
|
+
* Output modalities for the response. Supported values are "text" and "image".
|
|
384
|
+
*/
|
|
230
385
|
modalities?: Array<Modality> | undefined;
|
|
231
386
|
};
|
|
232
387
|
/** @internal */
|
|
233
|
-
export
|
|
388
|
+
export type ChatGenerationParamsOrder$Outbound = string | string;
|
|
234
389
|
/** @internal */
|
|
235
|
-
export declare const
|
|
390
|
+
export declare const ChatGenerationParamsOrder$outboundSchema: z.ZodType<ChatGenerationParamsOrder$Outbound, ChatGenerationParamsOrder>;
|
|
391
|
+
export declare function chatGenerationParamsOrderToJSON(chatGenerationParamsOrder: ChatGenerationParamsOrder): string;
|
|
236
392
|
/** @internal */
|
|
237
|
-
export type
|
|
238
|
-
prompt?: any | undefined;
|
|
239
|
-
completion?: any | undefined;
|
|
240
|
-
image?: any | undefined;
|
|
241
|
-
audio?: any | undefined;
|
|
242
|
-
request?: any | undefined;
|
|
243
|
-
};
|
|
393
|
+
export type ChatGenerationParamsOnly$Outbound = string | string;
|
|
244
394
|
/** @internal */
|
|
245
|
-
export declare const
|
|
246
|
-
export declare function
|
|
395
|
+
export declare const ChatGenerationParamsOnly$outboundSchema: z.ZodType<ChatGenerationParamsOnly$Outbound, ChatGenerationParamsOnly>;
|
|
396
|
+
export declare function chatGenerationParamsOnlyToJSON(chatGenerationParamsOnly: ChatGenerationParamsOnly): string;
|
|
247
397
|
/** @internal */
|
|
248
|
-
export type
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
398
|
+
export type ChatGenerationParamsIgnore$Outbound = string | string;
|
|
399
|
+
/** @internal */
|
|
400
|
+
export declare const ChatGenerationParamsIgnore$outboundSchema: z.ZodType<ChatGenerationParamsIgnore$Outbound, ChatGenerationParamsIgnore>;
|
|
401
|
+
export declare function chatGenerationParamsIgnoreToJSON(chatGenerationParamsIgnore: ChatGenerationParamsIgnore): string;
|
|
402
|
+
/** @internal */
|
|
403
|
+
export declare const ChatGenerationParamsSortEnum$outboundSchema: z.ZodType<string, ChatGenerationParamsSortEnum>;
|
|
254
404
|
/** @internal */
|
|
255
|
-
export declare const
|
|
256
|
-
export declare function chatGenerationParamsPreferredMinThroughputToJSON(chatGenerationParamsPreferredMinThroughput: ChatGenerationParamsPreferredMinThroughput): string;
|
|
405
|
+
export declare const ChatGenerationParamsProviderSortConfigEnum$outboundSchema: z.ZodEnum<typeof ChatGenerationParamsProviderSortConfigEnum>;
|
|
257
406
|
/** @internal */
|
|
258
|
-
export
|
|
407
|
+
export declare const ChatGenerationParamsBy$outboundSchema: z.ZodType<string, ChatGenerationParamsBy>;
|
|
259
408
|
/** @internal */
|
|
260
|
-
export declare const
|
|
261
|
-
export declare function chatGenerationParamsPreferredMinThroughputUnionToJSON(chatGenerationParamsPreferredMinThroughputUnion: ChatGenerationParamsPreferredMinThroughputUnion): string;
|
|
409
|
+
export declare const ChatGenerationParamsPartition$outboundSchema: z.ZodType<string, ChatGenerationParamsPartition>;
|
|
262
410
|
/** @internal */
|
|
263
|
-
export type
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
p90?: number | null | undefined;
|
|
267
|
-
p99?: number | null | undefined;
|
|
411
|
+
export type ChatGenerationParamsProviderSortConfig$Outbound = {
|
|
412
|
+
by?: string | null | undefined;
|
|
413
|
+
partition?: string | null | undefined;
|
|
268
414
|
};
|
|
269
415
|
/** @internal */
|
|
270
|
-
export declare const
|
|
271
|
-
export declare function
|
|
416
|
+
export declare const ChatGenerationParamsProviderSortConfig$outboundSchema: z.ZodType<ChatGenerationParamsProviderSortConfig$Outbound, ChatGenerationParamsProviderSortConfig>;
|
|
417
|
+
export declare function chatGenerationParamsProviderSortConfigToJSON(chatGenerationParamsProviderSortConfig: ChatGenerationParamsProviderSortConfig): string;
|
|
272
418
|
/** @internal */
|
|
273
|
-
export type
|
|
419
|
+
export type ChatGenerationParamsProviderSortConfigUnion$Outbound = ChatGenerationParamsProviderSortConfig$Outbound | string;
|
|
274
420
|
/** @internal */
|
|
275
|
-
export declare const
|
|
276
|
-
export declare function
|
|
421
|
+
export declare const ChatGenerationParamsProviderSortConfigUnion$outboundSchema: z.ZodType<ChatGenerationParamsProviderSortConfigUnion$Outbound, ChatGenerationParamsProviderSortConfigUnion>;
|
|
422
|
+
export declare function chatGenerationParamsProviderSortConfigUnionToJSON(chatGenerationParamsProviderSortConfigUnion: ChatGenerationParamsProviderSortConfigUnion): string;
|
|
423
|
+
/** @internal */
|
|
424
|
+
export declare const ChatGenerationParamsProviderSort$outboundSchema: z.ZodType<string, ChatGenerationParamsProviderSort>;
|
|
425
|
+
/** @internal */
|
|
426
|
+
export type ChatGenerationParamsSortUnion$Outbound = string | ChatGenerationParamsProviderSortConfig$Outbound | string | string;
|
|
427
|
+
/** @internal */
|
|
428
|
+
export declare const ChatGenerationParamsSortUnion$outboundSchema: z.ZodType<ChatGenerationParamsSortUnion$Outbound, ChatGenerationParamsSortUnion>;
|
|
429
|
+
export declare function chatGenerationParamsSortUnionToJSON(chatGenerationParamsSortUnion: ChatGenerationParamsSortUnion): string;
|
|
430
|
+
/** @internal */
|
|
431
|
+
export type ChatGenerationParamsMaxPrice$Outbound = {
|
|
432
|
+
prompt?: string | undefined;
|
|
433
|
+
completion?: string | undefined;
|
|
434
|
+
image?: string | undefined;
|
|
435
|
+
audio?: string | undefined;
|
|
436
|
+
request?: string | undefined;
|
|
437
|
+
};
|
|
438
|
+
/** @internal */
|
|
439
|
+
export declare const ChatGenerationParamsMaxPrice$outboundSchema: z.ZodType<ChatGenerationParamsMaxPrice$Outbound, ChatGenerationParamsMaxPrice>;
|
|
440
|
+
export declare function chatGenerationParamsMaxPriceToJSON(chatGenerationParamsMaxPrice: ChatGenerationParamsMaxPrice): string;
|
|
277
441
|
/** @internal */
|
|
278
442
|
export type ChatGenerationParamsProvider$Outbound = {
|
|
279
443
|
allow_fallbacks?: boolean | null | undefined;
|
|
@@ -281,14 +445,14 @@ export type ChatGenerationParamsProvider$Outbound = {
|
|
|
281
445
|
data_collection?: string | null | undefined;
|
|
282
446
|
zdr?: boolean | null | undefined;
|
|
283
447
|
enforce_distillable_text?: boolean | null | undefined;
|
|
284
|
-
order?: Array<
|
|
285
|
-
only?: Array<
|
|
286
|
-
ignore?: Array<
|
|
448
|
+
order?: Array<string | string> | null | undefined;
|
|
449
|
+
only?: Array<string | string> | null | undefined;
|
|
450
|
+
ignore?: Array<string | string> | null | undefined;
|
|
287
451
|
quantizations?: Array<string> | null | undefined;
|
|
288
|
-
sort?:
|
|
452
|
+
sort?: string | ChatGenerationParamsProviderSortConfig$Outbound | string | string | null | undefined;
|
|
289
453
|
max_price?: ChatGenerationParamsMaxPrice$Outbound | undefined;
|
|
290
|
-
preferred_min_throughput?:
|
|
291
|
-
preferred_max_latency?:
|
|
454
|
+
preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined;
|
|
455
|
+
preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined;
|
|
292
456
|
};
|
|
293
457
|
/** @internal */
|
|
294
458
|
export declare const ChatGenerationParamsProvider$outboundSchema: z.ZodType<ChatGenerationParamsProvider$Outbound, ChatGenerationParamsProvider>;
|
|
@@ -302,26 +466,15 @@ export type ChatGenerationParamsPluginResponseHealing$Outbound = {
|
|
|
302
466
|
export declare const ChatGenerationParamsPluginResponseHealing$outboundSchema: z.ZodType<ChatGenerationParamsPluginResponseHealing$Outbound, ChatGenerationParamsPluginResponseHealing>;
|
|
303
467
|
export declare function chatGenerationParamsPluginResponseHealingToJSON(chatGenerationParamsPluginResponseHealing: ChatGenerationParamsPluginResponseHealing): string;
|
|
304
468
|
/** @internal */
|
|
305
|
-
export declare const PdfEngine$outboundSchema: z.ZodType<string, PdfEngine>;
|
|
306
|
-
/** @internal */
|
|
307
|
-
export type Pdf$Outbound = {
|
|
308
|
-
engine?: string | undefined;
|
|
309
|
-
};
|
|
310
|
-
/** @internal */
|
|
311
|
-
export declare const Pdf$outboundSchema: z.ZodType<Pdf$Outbound, Pdf>;
|
|
312
|
-
export declare function pdfToJSON(pdf: Pdf): string;
|
|
313
|
-
/** @internal */
|
|
314
469
|
export type ChatGenerationParamsPluginFileParser$Outbound = {
|
|
315
470
|
id: "file-parser";
|
|
316
471
|
enabled?: boolean | undefined;
|
|
317
|
-
pdf?:
|
|
472
|
+
pdf?: PDFParserOptions$Outbound | undefined;
|
|
318
473
|
};
|
|
319
474
|
/** @internal */
|
|
320
475
|
export declare const ChatGenerationParamsPluginFileParser$outboundSchema: z.ZodType<ChatGenerationParamsPluginFileParser$Outbound, ChatGenerationParamsPluginFileParser>;
|
|
321
476
|
export declare function chatGenerationParamsPluginFileParserToJSON(chatGenerationParamsPluginFileParser: ChatGenerationParamsPluginFileParser): string;
|
|
322
477
|
/** @internal */
|
|
323
|
-
export declare const Engine$outboundSchema: z.ZodType<string, Engine>;
|
|
324
|
-
/** @internal */
|
|
325
478
|
export type ChatGenerationParamsPluginWeb$Outbound = {
|
|
326
479
|
id: "web";
|
|
327
480
|
enabled?: boolean | undefined;
|
|
@@ -354,57 +507,39 @@ export type ChatGenerationParamsPluginUnion$Outbound = ChatGenerationParamsPlugi
|
|
|
354
507
|
export declare const ChatGenerationParamsPluginUnion$outboundSchema: z.ZodType<ChatGenerationParamsPluginUnion$Outbound, ChatGenerationParamsPluginUnion>;
|
|
355
508
|
export declare function chatGenerationParamsPluginUnionToJSON(chatGenerationParamsPluginUnion: ChatGenerationParamsPluginUnion): string;
|
|
356
509
|
/** @internal */
|
|
357
|
-
export
|
|
510
|
+
export type ChatGenerationParamsTrace$Outbound = {
|
|
511
|
+
trace_id?: string | undefined;
|
|
512
|
+
trace_name?: string | undefined;
|
|
513
|
+
span_name?: string | undefined;
|
|
514
|
+
generation_name?: string | undefined;
|
|
515
|
+
parent_span_id?: string | undefined;
|
|
516
|
+
[additionalProperties: string]: unknown;
|
|
517
|
+
};
|
|
518
|
+
/** @internal */
|
|
519
|
+
export declare const ChatGenerationParamsTrace$outboundSchema: z.ZodType<ChatGenerationParamsTrace$Outbound, ChatGenerationParamsTrace>;
|
|
520
|
+
export declare function chatGenerationParamsTraceToJSON(chatGenerationParamsTrace: ChatGenerationParamsTrace): string;
|
|
358
521
|
/** @internal */
|
|
359
522
|
export declare const Effort$outboundSchema: z.ZodType<string, Effort>;
|
|
360
523
|
/** @internal */
|
|
361
524
|
export type Reasoning$Outbound = {
|
|
362
525
|
effort?: string | null | undefined;
|
|
363
|
-
summary?:
|
|
526
|
+
summary?: any | null | undefined;
|
|
364
527
|
};
|
|
365
528
|
/** @internal */
|
|
366
529
|
export declare const Reasoning$outboundSchema: z.ZodType<Reasoning$Outbound, Reasoning>;
|
|
367
530
|
export declare function reasoningToJSON(reasoning: Reasoning): string;
|
|
368
531
|
/** @internal */
|
|
369
|
-
export type
|
|
370
|
-
type: "python";
|
|
371
|
-
};
|
|
372
|
-
/** @internal */
|
|
373
|
-
export declare const ResponseFormatPython$outboundSchema: z.ZodType<ResponseFormatPython$Outbound, ResponseFormatPython>;
|
|
374
|
-
export declare function responseFormatPythonToJSON(responseFormatPython: ResponseFormatPython): string;
|
|
375
|
-
/** @internal */
|
|
376
|
-
export type ResponseFormatJSONObject$Outbound = {
|
|
377
|
-
type: "json_object";
|
|
378
|
-
};
|
|
379
|
-
/** @internal */
|
|
380
|
-
export declare const ResponseFormatJSONObject$outboundSchema: z.ZodType<ResponseFormatJSONObject$Outbound, ResponseFormatJSONObject>;
|
|
381
|
-
export declare function responseFormatJSONObjectToJSON(responseFormatJSONObject: ResponseFormatJSONObject): string;
|
|
382
|
-
/** @internal */
|
|
383
|
-
export type ResponseFormatText$Outbound = {
|
|
384
|
-
type: "text";
|
|
385
|
-
};
|
|
386
|
-
/** @internal */
|
|
387
|
-
export declare const ResponseFormatText$outboundSchema: z.ZodType<ResponseFormatText$Outbound, ResponseFormatText>;
|
|
388
|
-
export declare function responseFormatTextToJSON(responseFormatText: ResponseFormatText): string;
|
|
389
|
-
/** @internal */
|
|
390
|
-
export type ResponseFormat$Outbound = ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatPython$Outbound;
|
|
532
|
+
export type ResponseFormat$Outbound = ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatTextPython$Outbound;
|
|
391
533
|
/** @internal */
|
|
392
534
|
export declare const ResponseFormat$outboundSchema: z.ZodType<ResponseFormat$Outbound, ResponseFormat>;
|
|
393
535
|
export declare function responseFormatToJSON(responseFormat: ResponseFormat): string;
|
|
394
536
|
/** @internal */
|
|
395
|
-
export type Stop$Outbound = string | Array<string
|
|
537
|
+
export type Stop$Outbound = string | Array<string> | any;
|
|
396
538
|
/** @internal */
|
|
397
539
|
export declare const Stop$outboundSchema: z.ZodType<Stop$Outbound, Stop>;
|
|
398
540
|
export declare function stopToJSON(stop: Stop): string;
|
|
399
541
|
/** @internal */
|
|
400
|
-
export type
|
|
401
|
-
echo_upstream_body?: boolean | undefined;
|
|
402
|
-
};
|
|
403
|
-
/** @internal */
|
|
404
|
-
export declare const Debug$outboundSchema: z.ZodType<Debug$Outbound, Debug>;
|
|
405
|
-
export declare function debugToJSON(debug: Debug): string;
|
|
406
|
-
/** @internal */
|
|
407
|
-
export type ChatGenerationParamsImageConfig$Outbound = string | number;
|
|
542
|
+
export type ChatGenerationParamsImageConfig$Outbound = string | number | Array<any | null>;
|
|
408
543
|
/** @internal */
|
|
409
544
|
export declare const ChatGenerationParamsImageConfig$outboundSchema: z.ZodType<ChatGenerationParamsImageConfig$Outbound, ChatGenerationParamsImageConfig>;
|
|
410
545
|
export declare function chatGenerationParamsImageConfigToJSON(chatGenerationParamsImageConfig: ChatGenerationParamsImageConfig): string;
|
|
@@ -414,9 +549,9 @@ export declare const Modality$outboundSchema: z.ZodType<string, Modality>;
|
|
|
414
549
|
export type ChatGenerationParams$Outbound = {
|
|
415
550
|
provider?: ChatGenerationParamsProvider$Outbound | null | undefined;
|
|
416
551
|
plugins?: Array<ChatGenerationParamsPluginAutoRouter$Outbound | ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound | ChatGenerationParamsPluginResponseHealing$Outbound> | undefined;
|
|
417
|
-
route?: string | null | undefined;
|
|
418
552
|
user?: string | undefined;
|
|
419
553
|
session_id?: string | undefined;
|
|
554
|
+
trace?: ChatGenerationParamsTrace$Outbound | undefined;
|
|
420
555
|
messages: Array<Message$Outbound>;
|
|
421
556
|
model?: string | undefined;
|
|
422
557
|
models?: Array<string> | undefined;
|
|
@@ -433,18 +568,19 @@ export type ChatGenerationParams$Outbound = {
|
|
|
433
568
|
} | undefined;
|
|
434
569
|
presence_penalty?: number | null | undefined;
|
|
435
570
|
reasoning?: Reasoning$Outbound | undefined;
|
|
436
|
-
response_format?: ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound |
|
|
571
|
+
response_format?: ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatTextPython$Outbound | undefined;
|
|
437
572
|
seed?: number | null | undefined;
|
|
438
|
-
stop?: string | Array<string> | null | undefined;
|
|
573
|
+
stop?: string | Array<string> | any | null | undefined;
|
|
439
574
|
stream: boolean;
|
|
440
575
|
stream_options?: ChatStreamOptions$Outbound | null | undefined;
|
|
441
|
-
temperature
|
|
442
|
-
|
|
576
|
+
temperature: number | null;
|
|
577
|
+
parallel_tool_calls?: boolean | null | undefined;
|
|
578
|
+
tool_choice?: ToolChoiceOption$Outbound | undefined;
|
|
443
579
|
tools?: Array<ToolDefinitionJson$Outbound> | undefined;
|
|
444
|
-
top_p
|
|
445
|
-
debug?:
|
|
580
|
+
top_p: number | null;
|
|
581
|
+
debug?: DebugOptions$Outbound | undefined;
|
|
446
582
|
image_config?: {
|
|
447
|
-
[k: string]: string | number
|
|
583
|
+
[k: string]: string | number | Array<any | null>;
|
|
448
584
|
} | undefined;
|
|
449
585
|
modalities?: Array<string> | undefined;
|
|
450
586
|
};
|