@openrouter/sdk 0.12.79 → 0.13.7
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/README.md +40 -0
- package/esm/funcs/betaAnalyticsGetAnalyticsMeta.d.ts +18 -0
- package/esm/funcs/betaAnalyticsGetAnalyticsMeta.js +96 -0
- package/esm/funcs/betaAnalyticsQueryAnalytics.d.ts +18 -0
- package/esm/funcs/betaAnalyticsQueryAnalytics.js +97 -0
- package/esm/funcs/betaResponsesSend.js +1 -1
- package/esm/funcs/chatSend.js +1 -1
- package/esm/funcs/datasetsGetAppRankings.d.ts +43 -0
- package/esm/funcs/datasetsGetAppRankings.js +161 -0
- package/esm/funcs/datasetsGetBenchmarksArtificialAnalysis.d.ts +19 -0
- package/esm/funcs/datasetsGetBenchmarksArtificialAnalysis.js +102 -0
- package/esm/funcs/datasetsGetBenchmarksDesignArena.d.ts +19 -0
- package/esm/funcs/datasetsGetBenchmarksDesignArena.js +104 -0
- package/esm/funcs/filesDelete.d.ts +19 -0
- package/esm/funcs/filesDelete.js +107 -0
- package/esm/funcs/filesDownload.d.ts +18 -0
- package/esm/funcs/filesDownload.js +107 -0
- package/esm/funcs/filesList.d.ts +21 -0
- package/esm/funcs/filesList.js +131 -0
- package/esm/funcs/filesRetrieve.d.ts +19 -0
- package/esm/funcs/filesRetrieve.js +107 -0
- package/esm/funcs/filesUpload.d.ts +19 -0
- package/esm/funcs/filesUpload.js +121 -0
- package/esm/funcs/modelsGet.d.ts +19 -0
- package/esm/funcs/modelsGet.js +107 -0
- package/esm/funcs/modelsList.js +12 -0
- package/esm/funcs/oAuthCreateAuthCode.d.ts +1 -1
- package/esm/funcs/oAuthCreateAuthCode.js +1 -1
- package/esm/funcs/presetsGet.d.ts +21 -0
- package/esm/funcs/presetsGet.js +105 -0
- package/esm/funcs/presetsGetVersion.d.ts +21 -0
- package/esm/funcs/presetsGetVersion.js +109 -0
- package/esm/funcs/presetsList.d.ts +23 -0
- package/esm/funcs/presetsList.js +136 -0
- package/esm/funcs/presetsListVersions.d.ts +23 -0
- package/esm/funcs/presetsListVersions.js +142 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/aabenchmarkentry.d.ts +24 -0
- package/esm/models/aabenchmarkentry.js +23 -0
- package/esm/models/advisornestedtool.d.ts +25 -0
- package/esm/models/advisornestedtool.js +23 -0
- package/esm/models/advisorreasoning.d.ts +41 -0
- package/esm/models/advisorreasoning.js +33 -0
- package/esm/models/advisorservertoolconfig.d.ts +65 -0
- package/esm/models/advisorservertoolconfig.js +31 -0
- package/esm/models/advisorservertoolopenrouter.d.ts +28 -0
- package/esm/models/advisorservertoolopenrouter.js +20 -0
- package/esm/models/apprankingsitem.d.ts +29 -0
- package/esm/models/apprankingsitem.js +26 -0
- package/esm/models/apprankingsresponse.d.ts +16 -0
- package/esm/models/apprankingsresponse.js +17 -0
- package/esm/models/bashservertool.d.ts +28 -0
- package/esm/models/bashservertool.js +20 -0
- package/esm/models/bashservertoolconfig.d.ts +30 -0
- package/esm/models/bashservertoolconfig.js +22 -0
- package/esm/models/bashservertoolengine.d.ts +17 -0
- package/esm/models/bashservertoolengine.js +16 -0
- package/esm/models/bashservertoolenvironment.d.ts +13 -0
- package/esm/models/bashservertoolenvironment.js +16 -0
- package/esm/models/benchmarkpricing.d.ts +20 -0
- package/esm/models/benchmarkpricing.js +15 -0
- package/esm/models/benchmarksaaitem.d.ts +34 -0
- package/esm/models/benchmarksaaitem.js +29 -0
- package/esm/models/benchmarksaameta.d.ts +70 -0
- package/esm/models/benchmarksaameta.js +50 -0
- package/esm/models/benchmarksaaresponse.d.ts +13 -0
- package/esm/models/benchmarksaaresponse.js +17 -0
- package/esm/models/benchmarksdaitem.d.ts +59 -0
- package/esm/models/benchmarksdaitem.js +50 -0
- package/esm/models/benchmarksdameta.d.ts +98 -0
- package/esm/models/benchmarksdameta.js +62 -0
- package/esm/models/benchmarksdaresponse.d.ts +13 -0
- package/esm/models/benchmarksdaresponse.js +17 -0
- package/esm/models/byokproviderslug.d.ts +2 -1
- package/esm/models/byokproviderslug.js +2 -1
- package/esm/models/chatfunctiontool.d.ts +5 -2
- package/esm/models/chatfunctiontool.js +6 -0
- package/esm/models/chatrequest.d.ts +42 -0
- package/esm/models/chatrequest.js +24 -0
- package/esm/models/chatwebsearchshorthand.d.ts +10 -5
- package/esm/models/chatwebsearchshorthand.js +2 -0
- package/esm/models/containerautoenvironment.d.ts +15 -0
- package/esm/models/containerautoenvironment.js +13 -0
- package/esm/models/containerreferenceenvironment.d.ts +20 -0
- package/esm/models/containerreferenceenvironment.js +19 -0
- package/esm/models/contentfilterbuiltinentry.d.ts +5 -0
- package/esm/models/contentfilterbuiltinentry.js +7 -0
- package/esm/models/contentfilterbuiltinentryinput.d.ts +6 -0
- package/esm/models/contentfilterbuiltinentryinput.js +7 -0
- package/esm/models/contentpartaudio.d.ts +24 -0
- package/esm/models/contentpartaudio.js +27 -0
- package/esm/models/contentpartimage.d.ts +2 -9
- package/esm/models/contentpartimage.js +1 -6
- package/esm/models/contentpartvideo.d.ts +24 -0
- package/esm/models/contentpartvideo.js +27 -0
- package/esm/models/createobservabilitydestinationrequest.d.ts +1 -1
- package/esm/models/dabenchmarkentry.d.ts +32 -0
- package/esm/models/dabenchmarkentry.js +23 -0
- package/esm/models/filedeleteresponse.d.ts +21 -0
- package/esm/models/filedeleteresponse.js +20 -0
- package/esm/models/filelistresponse.d.ts +21 -0
- package/esm/models/filelistresponse.js +26 -0
- package/esm/models/filemetadata.d.ts +26 -0
- package/esm/models/filemetadata.js +33 -0
- package/esm/models/fusionanalysisresult.d.ts +88 -0
- package/esm/models/fusionanalysisresult.js +109 -0
- package/esm/models/fusioncallanalysiscompletedevent.d.ts +21 -0
- package/esm/models/fusioncallanalysiscompletedevent.js +26 -0
- package/esm/models/fusioncallanalysisinprogressevent.d.ts +17 -0
- package/esm/models/fusioncallanalysisinprogressevent.js +26 -0
- package/esm/models/fusioncallcompletedevent.d.ts +16 -0
- package/esm/models/fusioncallcompletedevent.js +24 -0
- package/esm/models/fusioncallinprogressevent.d.ts +16 -0
- package/esm/models/fusioncallinprogressevent.js +24 -0
- package/esm/models/fusioncallpaneladdedevent.d.ts +17 -0
- package/esm/models/fusioncallpaneladdedevent.js +25 -0
- package/esm/models/fusioncallpanelcompletedevent.d.ts +18 -0
- package/esm/models/fusioncallpanelcompletedevent.js +26 -0
- package/esm/models/fusioncallpaneldeltaevent.d.ts +18 -0
- package/esm/models/fusioncallpaneldeltaevent.js +26 -0
- package/esm/models/fusioncallpanelfailedevent.d.ts +19 -0
- package/esm/models/fusioncallpanelfailedevent.js +28 -0
- package/esm/models/fusioncallpanelreasoningdeltaevent.d.ts +18 -0
- package/esm/models/fusioncallpanelreasoningdeltaevent.js +26 -0
- package/esm/models/fusionplugin.d.ts +46 -0
- package/esm/models/fusionplugin.js +20 -0
- package/esm/models/fusionservertoolconfig.d.ts +27 -0
- package/esm/models/fusionservertoolconfig.js +10 -0
- package/esm/models/generationresponse.d.ts +22 -0
- package/esm/models/generationresponse.js +14 -0
- package/esm/models/getpresetresponse.d.ts +17 -0
- package/esm/models/getpresetresponse.js +15 -0
- package/esm/models/getpresetversionresponse.d.ts +17 -0
- package/esm/models/getpresetversionresponse.js +15 -0
- package/esm/models/index.d.ts +60 -0
- package/esm/models/index.js +60 -0
- package/esm/models/inputreference.d.ts +14 -0
- package/esm/models/inputreference.js +18 -0
- package/esm/models/inputsunion.d.ts +7 -4
- package/esm/models/inputsunion.js +11 -2
- package/esm/models/legacywebsearchservertool.d.ts +2 -2
- package/esm/models/listpresetsresponse.d.ts +15 -0
- package/esm/models/listpresetsresponse.js +21 -0
- package/esm/models/listpresetversionsresponse.d.ts +15 -0
- package/esm/models/listpresetversionsresponse.js +21 -0
- package/esm/models/messagesfallbackparam.d.ts +19 -0
- package/esm/models/messagesfallbackparam.js +22 -0
- package/esm/models/messagesrequest.d.ts +11 -4
- package/esm/models/messagesrequest.js +6 -0
- package/esm/models/model.d.ts +5 -0
- package/esm/models/model.js +2 -0
- package/esm/models/modelbenchmarks.d.ts +22 -0
- package/esm/models/modelbenchmarks.js +23 -0
- package/esm/models/modelresponse.d.ts +17 -0
- package/esm/models/modelresponse.js +16 -0
- package/esm/models/observabilityarizedestination.d.ts +1 -1
- package/esm/models/observabilitybraintrustdestination.d.ts +1 -1
- package/esm/models/observabilityclickhousedestination.d.ts +1 -1
- package/esm/models/observabilitydatadogdestination.d.ts +1 -1
- package/esm/models/observabilitygrafanadestination.d.ts +1 -1
- package/esm/models/observabilitylangfusedestination.d.ts +1 -1
- package/esm/models/observabilitylangsmithdestination.d.ts +1 -1
- package/esm/models/observabilitynewrelicdestination.d.ts +1 -1
- package/esm/models/observabilityopikdestination.d.ts +1 -1
- package/esm/models/observabilityotelcollectordestination.d.ts +1 -1
- package/esm/models/observabilityposthogdestination.d.ts +1 -1
- package/esm/models/observabilityrampdestination.d.ts +1 -1
- package/esm/models/observabilitys3destination.d.ts +1 -1
- package/esm/models/observabilitysentrydestination.d.ts +1 -1
- package/esm/models/observabilitysnowflakedestination.d.ts +1 -1
- package/esm/models/observabilityweavedestination.d.ts +1 -1
- package/esm/models/observabilitywebhookdestination.d.ts +1 -1
- package/esm/models/operations/createauthkeyscode.d.ts +6 -1
- package/esm/models/operations/createauthkeyscode.js +2 -0
- package/esm/models/operations/creatererank.d.ts +44 -10
- package/esm/models/operations/creatererank.js +21 -6
- package/esm/models/operations/createresponses.d.ts +3 -3
- package/esm/models/operations/createresponses.js +2 -3
- package/esm/models/operations/deletefile.d.ts +60 -0
- package/esm/models/operations/deletefile.js +24 -0
- package/esm/models/operations/downloadfilecontent.d.ts +60 -0
- package/esm/models/operations/downloadfilecontent.js +24 -0
- package/esm/models/operations/getanalyticsmeta.d.ts +198 -0
- package/esm/models/operations/getanalyticsmeta.js +141 -0
- package/esm/models/operations/getapprankings.d.ts +152 -0
- package/esm/models/operations/getapprankings.js +85 -0
- package/esm/models/operations/getbenchmarksartificialanalysis.d.ts +58 -0
- package/esm/models/operations/getbenchmarksartificialanalysis.js +22 -0
- package/esm/models/operations/getbenchmarksdesignarena.d.ts +83 -0
- package/esm/models/operations/getbenchmarksdesignarena.js +36 -0
- package/esm/models/operations/getfilemetadata.d.ts +60 -0
- package/esm/models/operations/getfilemetadata.js +24 -0
- package/esm/models/operations/getmodel.d.ts +63 -0
- package/esm/models/operations/getmodel.js +22 -0
- package/esm/models/operations/getmodels.d.ts +121 -5
- package/esm/models/operations/getmodels.js +59 -4
- package/esm/models/operations/getpreset.d.ts +58 -0
- package/esm/models/operations/getpreset.js +21 -0
- package/esm/models/operations/getpresetversion.d.ts +63 -0
- package/esm/models/operations/getpresetversion.js +22 -0
- package/esm/models/operations/index.d.ts +15 -0
- package/esm/models/operations/index.js +15 -0
- package/esm/models/operations/listbyokkeys.d.ts +2 -1
- package/esm/models/operations/listbyokkeys.js +2 -1
- package/esm/models/operations/listfiles.d.ts +77 -0
- package/esm/models/operations/listfiles.js +37 -0
- package/esm/models/operations/listpresets.d.ts +72 -0
- package/esm/models/operations/listpresets.js +35 -0
- package/esm/models/operations/listpresetversions.d.ts +77 -0
- package/esm/models/operations/listpresetversions.js +36 -0
- package/esm/models/operations/queryanalytics.d.ts +195 -0
- package/esm/models/operations/queryanalytics.js +129 -0
- package/esm/models/operations/sendchatcompletionrequest.d.ts +3 -3
- package/esm/models/operations/sendchatcompletionrequest.js +2 -3
- package/esm/models/operations/uploadfile.d.ts +82 -0
- package/esm/models/operations/uploadfile.js +45 -0
- package/esm/models/outputadvisorservertoolitem.d.ts +59 -0
- package/esm/models/outputadvisorservertoolitem.js +52 -0
- package/esm/models/outputfusionservertoolitem.d.ts +44 -43
- package/esm/models/outputfusionservertoolitem.js +49 -51
- package/esm/models/outputitems.d.ts +13 -3
- package/esm/models/outputitems.js +9 -1
- package/esm/models/outputshellcallitem.d.ts +29 -0
- package/esm/models/outputshellcallitem.js +38 -0
- package/esm/models/outputshellcalloutputitem.d.ts +48 -0
- package/esm/models/outputshellcalloutputitem.js +67 -0
- package/esm/models/outputsubagentservertoolitem.d.ts +59 -0
- package/esm/models/outputsubagentservertoolitem.js +54 -0
- package/esm/models/outputwebsearchcallitem.d.ts +2 -2
- package/esm/models/outputwebsearchcallitem.js +2 -2
- package/esm/models/preset.d.ts +27 -0
- package/esm/models/preset.js +35 -0
- package/esm/models/presetstatus.d.ts +17 -0
- package/esm/models/presetstatus.js +16 -0
- package/esm/models/presetwithdesignatedversion.d.ts +9 -14
- package/esm/models/presetwithdesignatedversion.js +4 -11
- package/esm/models/preview20250311websearchservertool.d.ts +2 -2
- package/esm/models/previewwebsearchservertool.d.ts +2 -2
- package/esm/models/promptinjectionscanscope.d.ts +18 -0
- package/esm/models/promptinjectionscanscope.js +17 -0
- package/esm/models/providername.d.ts +2 -1
- package/esm/models/providername.js +2 -1
- package/esm/models/provideroptions.d.ts +12 -0
- package/esm/models/provideroptions.js +2 -0
- package/esm/models/providerresponse.d.ts +3 -1
- package/esm/models/providerresponse.js +4 -2
- package/esm/models/rankingsdailymeta.d.ts +4 -4
- package/esm/models/rankingsdailymeta.js +3 -3
- package/esm/models/responsesrequest.d.ts +36 -8
- package/esm/models/responsesrequest.js +12 -0
- package/esm/models/searchqualitylevel.d.ts +2 -2
- package/esm/models/searchqualitylevel.js +1 -1
- package/esm/models/shellcallstatus.d.ts +17 -0
- package/esm/models/shellcallstatus.js +16 -0
- package/esm/models/shellservertoolconfig.d.ts +30 -0
- package/esm/models/shellservertoolconfig.js +22 -0
- package/esm/models/shellservertoolengine.d.ts +16 -0
- package/esm/models/shellservertoolengine.js +15 -0
- package/esm/models/shellservertoolenvironment.d.ts +13 -0
- package/esm/models/shellservertoolenvironment.js +16 -0
- package/esm/models/shellservertoolopenrouter.d.ts +21 -0
- package/esm/models/shellservertoolopenrouter.js +15 -0
- package/esm/models/streamevents.d.ts +10 -1
- package/esm/models/streamevents.js +18 -0
- package/esm/models/subagentnestedtool.d.ts +25 -0
- package/esm/models/subagentnestedtool.js +23 -0
- package/esm/models/subagentreasoning.d.ts +41 -0
- package/esm/models/subagentreasoning.js +33 -0
- package/esm/models/subagentservertoolconfig.d.ts +50 -0
- package/esm/models/subagentservertoolconfig.js +27 -0
- package/esm/models/subagentservertoolopenrouter.d.ts +28 -0
- package/esm/models/subagentservertoolopenrouter.js +20 -0
- package/esm/models/updateobservabilitydestinationrequest.d.ts +1 -1
- package/esm/models/urlcitation.d.ts +2 -0
- package/esm/models/urlcitation.js +2 -0
- package/esm/models/videogenerationrequest.d.ts +16 -4
- package/esm/models/videogenerationrequest.js +4 -2
- package/esm/models/websearchconfig.d.ts +10 -5
- package/esm/models/websearchconfig.js +2 -0
- package/esm/models/websearchengine.d.ts +1 -0
- package/esm/models/websearchengine.js +1 -0
- package/esm/models/websearchengineenum.d.ts +4 -3
- package/esm/models/websearchengineenum.js +3 -2
- package/esm/models/websearchservertool.d.ts +2 -2
- package/esm/models/websearchservertoolconfig.d.ts +10 -5
- package/esm/models/websearchservertoolconfig.js +2 -0
- package/esm/sdk/beta.d.ts +3 -0
- package/esm/sdk/beta.js +4 -0
- package/esm/sdk/betaanalytics.d.ts +19 -0
- package/esm/sdk/betaanalytics.js +29 -0
- package/esm/sdk/datasets.d.ts +46 -0
- package/esm/sdk/datasets.js +53 -0
- package/esm/sdk/files.d.ts +44 -0
- package/esm/sdk/files.js +60 -0
- package/esm/sdk/models.d.ts +7 -0
- package/esm/sdk/models.js +10 -0
- package/esm/sdk/presets.d.ts +33 -0
- package/esm/sdk/presets.js +41 -0
- package/esm/sdk/sdk.d.ts +5 -2
- package/esm/sdk/sdk.js +7 -3
- package/jsr.json +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* ELO range across all returned models for normalization.
|
|
7
|
+
*/
|
|
8
|
+
export type EloBounds = {
|
|
9
|
+
/**
|
|
10
|
+
* Maximum ELO in the result set.
|
|
11
|
+
*/
|
|
12
|
+
max: number;
|
|
13
|
+
/**
|
|
14
|
+
* Minimum ELO in the result set.
|
|
15
|
+
*/
|
|
16
|
+
min: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Data source identifier.
|
|
20
|
+
*/
|
|
21
|
+
export declare const BenchmarksDAMetaSource: {
|
|
22
|
+
readonly DesignArena: "design-arena";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Data source identifier.
|
|
26
|
+
*/
|
|
27
|
+
export type BenchmarksDAMetaSource = ClosedEnum<typeof BenchmarksDAMetaSource>;
|
|
28
|
+
/**
|
|
29
|
+
* URL of the upstream data source.
|
|
30
|
+
*/
|
|
31
|
+
export declare const BenchmarksDAMetaSourceUrl: {
|
|
32
|
+
readonly HttpsWwwDesignarenaAi: "https://www.designarena.ai";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* URL of the upstream data source.
|
|
36
|
+
*/
|
|
37
|
+
export type BenchmarksDAMetaSourceUrl = ClosedEnum<typeof BenchmarksDAMetaSourceUrl>;
|
|
38
|
+
/**
|
|
39
|
+
* Dataset version.
|
|
40
|
+
*/
|
|
41
|
+
export declare const BenchmarksDAMetaVersion: {
|
|
42
|
+
readonly V1: "v1";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Dataset version.
|
|
46
|
+
*/
|
|
47
|
+
export type BenchmarksDAMetaVersion = ClosedEnum<typeof BenchmarksDAMetaVersion>;
|
|
48
|
+
export type BenchmarksDAMeta = {
|
|
49
|
+
/**
|
|
50
|
+
* The arena filter applied.
|
|
51
|
+
*/
|
|
52
|
+
arena: string;
|
|
53
|
+
/**
|
|
54
|
+
* ISO-8601 timestamp of when this data was generated.
|
|
55
|
+
*/
|
|
56
|
+
asOf: string;
|
|
57
|
+
/**
|
|
58
|
+
* The category filter applied, or null if showing all.
|
|
59
|
+
*/
|
|
60
|
+
category: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* Required attribution when republishing this data.
|
|
63
|
+
*/
|
|
64
|
+
citation: string;
|
|
65
|
+
/**
|
|
66
|
+
* ELO range across all returned models for normalization.
|
|
67
|
+
*/
|
|
68
|
+
eloBounds: EloBounds;
|
|
69
|
+
/**
|
|
70
|
+
* Number of unique models in the response.
|
|
71
|
+
*/
|
|
72
|
+
modelCount: number;
|
|
73
|
+
/**
|
|
74
|
+
* Data source identifier.
|
|
75
|
+
*/
|
|
76
|
+
source: BenchmarksDAMetaSource;
|
|
77
|
+
/**
|
|
78
|
+
* URL of the upstream data source.
|
|
79
|
+
*/
|
|
80
|
+
sourceUrl: BenchmarksDAMetaSourceUrl;
|
|
81
|
+
/**
|
|
82
|
+
* Dataset version.
|
|
83
|
+
*/
|
|
84
|
+
version: BenchmarksDAMetaVersion;
|
|
85
|
+
};
|
|
86
|
+
/** @internal */
|
|
87
|
+
export declare const EloBounds$inboundSchema: z.ZodType<EloBounds, unknown>;
|
|
88
|
+
export declare function eloBoundsFromJSON(jsonString: string): SafeParseResult<EloBounds, SDKValidationError>;
|
|
89
|
+
/** @internal */
|
|
90
|
+
export declare const BenchmarksDAMetaSource$inboundSchema: z.ZodEnum<typeof BenchmarksDAMetaSource>;
|
|
91
|
+
/** @internal */
|
|
92
|
+
export declare const BenchmarksDAMetaSourceUrl$inboundSchema: z.ZodEnum<typeof BenchmarksDAMetaSourceUrl>;
|
|
93
|
+
/** @internal */
|
|
94
|
+
export declare const BenchmarksDAMetaVersion$inboundSchema: z.ZodEnum<typeof BenchmarksDAMetaVersion>;
|
|
95
|
+
/** @internal */
|
|
96
|
+
export declare const BenchmarksDAMeta$inboundSchema: z.ZodType<BenchmarksDAMeta, unknown>;
|
|
97
|
+
export declare function benchmarksDAMetaFromJSON(jsonString: string): SafeParseResult<BenchmarksDAMeta, SDKValidationError>;
|
|
98
|
+
//# sourceMappingURL=benchmarksdameta.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: caee78d8918e
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/**
|
|
9
|
+
* Data source identifier.
|
|
10
|
+
*/
|
|
11
|
+
export const BenchmarksDAMetaSource = {
|
|
12
|
+
DesignArena: "design-arena",
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* URL of the upstream data source.
|
|
16
|
+
*/
|
|
17
|
+
export const BenchmarksDAMetaSourceUrl = {
|
|
18
|
+
HttpsWwwDesignarenaAi: "https://www.designarena.ai",
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Dataset version.
|
|
22
|
+
*/
|
|
23
|
+
export const BenchmarksDAMetaVersion = {
|
|
24
|
+
V1: "v1",
|
|
25
|
+
};
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const EloBounds$inboundSchema = z.object({
|
|
28
|
+
max: z.number(),
|
|
29
|
+
min: z.number(),
|
|
30
|
+
});
|
|
31
|
+
export function eloBoundsFromJSON(jsonString) {
|
|
32
|
+
return safeParse(jsonString, (x) => EloBounds$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EloBounds' from JSON`);
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const BenchmarksDAMetaSource$inboundSchema = z.enum(BenchmarksDAMetaSource);
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const BenchmarksDAMetaSourceUrl$inboundSchema = z.enum(BenchmarksDAMetaSourceUrl);
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const BenchmarksDAMetaVersion$inboundSchema = z.enum(BenchmarksDAMetaVersion);
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const BenchmarksDAMeta$inboundSchema = z.object({
|
|
42
|
+
arena: z.string(),
|
|
43
|
+
as_of: z.string(),
|
|
44
|
+
category: z.nullable(z.string()),
|
|
45
|
+
citation: z.string(),
|
|
46
|
+
elo_bounds: z.lazy(() => EloBounds$inboundSchema),
|
|
47
|
+
model_count: z.int(),
|
|
48
|
+
source: BenchmarksDAMetaSource$inboundSchema,
|
|
49
|
+
source_url: BenchmarksDAMetaSourceUrl$inboundSchema,
|
|
50
|
+
version: BenchmarksDAMetaVersion$inboundSchema,
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
"as_of": "asOf",
|
|
54
|
+
"elo_bounds": "eloBounds",
|
|
55
|
+
"model_count": "modelCount",
|
|
56
|
+
"source_url": "sourceUrl",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
export function benchmarksDAMetaFromJSON(jsonString) {
|
|
60
|
+
return safeParse(jsonString, (x) => BenchmarksDAMeta$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BenchmarksDAMeta' from JSON`);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=benchmarksdameta.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { BenchmarksDAItem } from "./benchmarksdaitem.js";
|
|
4
|
+
import { BenchmarksDAMeta } from "./benchmarksdameta.js";
|
|
5
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
+
export type BenchmarksDAResponse = {
|
|
7
|
+
data: Array<BenchmarksDAItem>;
|
|
8
|
+
meta: BenchmarksDAMeta;
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const BenchmarksDAResponse$inboundSchema: z.ZodType<BenchmarksDAResponse, unknown>;
|
|
12
|
+
export declare function benchmarksDAResponseFromJSON(jsonString: string): SafeParseResult<BenchmarksDAResponse, SDKValidationError>;
|
|
13
|
+
//# sourceMappingURL=benchmarksdaresponse.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ea90fb0e8882
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { BenchmarksDAItem$inboundSchema, } from "./benchmarksdaitem.js";
|
|
8
|
+
import { BenchmarksDAMeta$inboundSchema, } from "./benchmarksdameta.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const BenchmarksDAResponse$inboundSchema = z.object({
|
|
11
|
+
data: z.array(BenchmarksDAItem$inboundSchema),
|
|
12
|
+
meta: BenchmarksDAMeta$inboundSchema,
|
|
13
|
+
});
|
|
14
|
+
export function benchmarksDAResponseFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => BenchmarksDAResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BenchmarksDAResponse' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=benchmarksdaresponse.js.map
|
|
@@ -28,6 +28,7 @@ export declare const BYOKProviderSlug: {
|
|
|
28
28
|
readonly Cohere: "cohere";
|
|
29
29
|
readonly Crusoe: "crusoe";
|
|
30
30
|
readonly Darkbloom: "darkbloom";
|
|
31
|
+
readonly Decart: "decart";
|
|
31
32
|
readonly Deepinfra: "deepinfra";
|
|
32
33
|
readonly Deepseek: "deepseek";
|
|
33
34
|
readonly Dekallm: "dekallm";
|
|
@@ -39,7 +40,6 @@ export declare const BYOKProviderSlug: {
|
|
|
39
40
|
readonly GoogleAiStudio: "google-ai-studio";
|
|
40
41
|
readonly GoogleVertex: "google-vertex";
|
|
41
42
|
readonly Groq: "groq";
|
|
42
|
-
readonly Hyperbolic: "hyperbolic";
|
|
43
43
|
readonly Inception: "inception";
|
|
44
44
|
readonly Inceptron: "inceptron";
|
|
45
45
|
readonly InferenceNet: "inference-net";
|
|
@@ -82,6 +82,7 @@ export declare const BYOKProviderSlug: {
|
|
|
82
82
|
readonly Together: "together";
|
|
83
83
|
readonly Upstage: "upstage";
|
|
84
84
|
readonly Venice: "venice";
|
|
85
|
+
readonly Wafer: "wafer";
|
|
85
86
|
readonly Wandb: "wandb";
|
|
86
87
|
readonly Xai: "xai";
|
|
87
88
|
readonly Xiaomi: "xiaomi";
|
|
@@ -31,6 +31,7 @@ export const BYOKProviderSlug = {
|
|
|
31
31
|
Cohere: "cohere",
|
|
32
32
|
Crusoe: "crusoe",
|
|
33
33
|
Darkbloom: "darkbloom",
|
|
34
|
+
Decart: "decart",
|
|
34
35
|
Deepinfra: "deepinfra",
|
|
35
36
|
Deepseek: "deepseek",
|
|
36
37
|
Dekallm: "dekallm",
|
|
@@ -42,7 +43,6 @@ export const BYOKProviderSlug = {
|
|
|
42
43
|
GoogleAiStudio: "google-ai-studio",
|
|
43
44
|
GoogleVertex: "google-vertex",
|
|
44
45
|
Groq: "groq",
|
|
45
|
-
Hyperbolic: "hyperbolic",
|
|
46
46
|
Inception: "inception",
|
|
47
47
|
Inceptron: "inceptron",
|
|
48
48
|
InferenceNet: "inference-net",
|
|
@@ -85,6 +85,7 @@ export const BYOKProviderSlug = {
|
|
|
85
85
|
Together: "together",
|
|
86
86
|
Upstage: "upstage",
|
|
87
87
|
Venice: "venice",
|
|
88
|
+
Wafer: "wafer",
|
|
88
89
|
Wandb: "wandb",
|
|
89
90
|
Xai: "xai",
|
|
90
91
|
Xiaomi: "xiaomi",
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { AdvisorServerToolOpenRouter, AdvisorServerToolOpenRouter$Outbound } from "./advisorservertoolopenrouter.js";
|
|
4
|
+
import { BashServerTool, BashServerTool$Outbound } from "./bashservertool.js";
|
|
3
5
|
import { ChatContentCacheControl, ChatContentCacheControl$Outbound } from "./chatcontentcachecontrol.js";
|
|
4
6
|
import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
|
|
5
7
|
import { ChatWebSearchShorthand, ChatWebSearchShorthand$Outbound } from "./chatwebsearchshorthand.js";
|
|
6
8
|
import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeservertool.js";
|
|
7
9
|
import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRouter$Outbound } from "./imagegenerationservertoolopenrouter.js";
|
|
8
10
|
import { OpenRouterWebSearchServerTool, OpenRouterWebSearchServerTool$Outbound } from "./openrouterwebsearchservertool.js";
|
|
11
|
+
import { SubagentServerToolOpenRouter, SubagentServerToolOpenRouter$Outbound } from "./subagentservertoolopenrouter.js";
|
|
9
12
|
import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchservertool.js";
|
|
10
13
|
/**
|
|
11
14
|
* Function definition for tool calling
|
|
@@ -48,7 +51,7 @@ export type ChatFunctionToolFunction = {
|
|
|
48
51
|
/**
|
|
49
52
|
* Tool definition for function calling (regular function or OpenRouter built-in server tool)
|
|
50
53
|
*/
|
|
51
|
-
export type ChatFunctionTool = ChatFunctionToolFunction | DatetimeServerTool | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | ChatWebSearchShorthand;
|
|
54
|
+
export type ChatFunctionTool = ChatFunctionToolFunction | AdvisorServerToolOpenRouter | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | SubagentServerToolOpenRouter | WebFetchServerTool | OpenRouterWebSearchServerTool | ChatWebSearchShorthand;
|
|
52
55
|
/** @internal */
|
|
53
56
|
export type ChatFunctionToolFunctionFunction$Outbound = {
|
|
54
57
|
description?: string | undefined;
|
|
@@ -73,7 +76,7 @@ export type ChatFunctionToolFunction$Outbound = {
|
|
|
73
76
|
export declare const ChatFunctionToolFunction$outboundSchema: z.ZodType<ChatFunctionToolFunction$Outbound, ChatFunctionToolFunction>;
|
|
74
77
|
export declare function chatFunctionToolFunctionToJSON(chatFunctionToolFunction: ChatFunctionToolFunction): string;
|
|
75
78
|
/** @internal */
|
|
76
|
-
export type ChatFunctionTool$Outbound = ChatFunctionToolFunction$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | ChatWebSearchShorthand$Outbound;
|
|
79
|
+
export type ChatFunctionTool$Outbound = ChatFunctionToolFunction$Outbound | AdvisorServerToolOpenRouter$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | SubagentServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | ChatWebSearchShorthand$Outbound;
|
|
77
80
|
/** @internal */
|
|
78
81
|
export declare const ChatFunctionTool$outboundSchema: z.ZodType<ChatFunctionTool$Outbound, ChatFunctionTool>;
|
|
79
82
|
export declare function chatFunctionToolToJSON(chatFunctionTool: ChatFunctionTool): string;
|
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { AdvisorServerToolOpenRouter$outboundSchema, } from "./advisorservertoolopenrouter.js";
|
|
8
|
+
import { BashServerTool$outboundSchema, } from "./bashservertool.js";
|
|
7
9
|
import { ChatContentCacheControl$outboundSchema, } from "./chatcontentcachecontrol.js";
|
|
8
10
|
import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
|
|
9
11
|
import { ChatWebSearchShorthand$outboundSchema, } from "./chatwebsearchshorthand.js";
|
|
10
12
|
import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
|
|
11
13
|
import { ImageGenerationServerToolOpenRouter$outboundSchema, } from "./imagegenerationservertoolopenrouter.js";
|
|
12
14
|
import { OpenRouterWebSearchServerTool$outboundSchema, } from "./openrouterwebsearchservertool.js";
|
|
15
|
+
import { SubagentServerToolOpenRouter$outboundSchema, } from "./subagentservertoolopenrouter.js";
|
|
13
16
|
import { WebFetchServerTool$outboundSchema, } from "./webfetchservertool.js";
|
|
14
17
|
export const ChatFunctionToolType = {
|
|
15
18
|
Function: "function",
|
|
@@ -42,9 +45,12 @@ export function chatFunctionToolFunctionToJSON(chatFunctionToolFunction) {
|
|
|
42
45
|
/** @internal */
|
|
43
46
|
export const ChatFunctionTool$outboundSchema = z.union([
|
|
44
47
|
z.lazy(() => ChatFunctionToolFunction$outboundSchema),
|
|
48
|
+
AdvisorServerToolOpenRouter$outboundSchema,
|
|
49
|
+
BashServerTool$outboundSchema,
|
|
45
50
|
DatetimeServerTool$outboundSchema,
|
|
46
51
|
ImageGenerationServerToolOpenRouter$outboundSchema,
|
|
47
52
|
ChatSearchModelsServerTool$outboundSchema,
|
|
53
|
+
SubagentServerToolOpenRouter$outboundSchema,
|
|
48
54
|
WebFetchServerTool$outboundSchema,
|
|
49
55
|
OpenRouterWebSearchServerTool$outboundSchema,
|
|
50
56
|
ChatWebSearchShorthand$outboundSchema,
|
|
@@ -57,6 +57,21 @@ export type ChatRequestReasoning = {
|
|
|
57
57
|
effort?: ChatRequestEffort | null | undefined;
|
|
58
58
|
summary?: ChatReasoningSummaryVerbosityEnum | null | undefined;
|
|
59
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
|
|
62
|
+
*/
|
|
63
|
+
export declare const ChatRequestReasoningEffort: {
|
|
64
|
+
readonly Xhigh: "xhigh";
|
|
65
|
+
readonly High: "high";
|
|
66
|
+
readonly Medium: "medium";
|
|
67
|
+
readonly Low: "low";
|
|
68
|
+
readonly Minimal: "minimal";
|
|
69
|
+
readonly None: "none";
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
|
|
73
|
+
*/
|
|
74
|
+
export type ChatRequestReasoningEffort = OpenEnum<typeof ChatRequestReasoningEffort>;
|
|
60
75
|
/**
|
|
61
76
|
* Response format configuration
|
|
62
77
|
*/
|
|
@@ -129,6 +144,10 @@ export type ChatRequest = {
|
|
|
129
144
|
metadata?: {
|
|
130
145
|
[k: string]: string;
|
|
131
146
|
} | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* Minimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter.
|
|
149
|
+
*/
|
|
150
|
+
minP?: number | null | undefined;
|
|
132
151
|
/**
|
|
133
152
|
* Output modalities for the response. Supported values are "text", "image", and "audio".
|
|
134
153
|
*/
|
|
@@ -161,6 +180,14 @@ export type ChatRequest = {
|
|
|
161
180
|
* Configuration options for reasoning models
|
|
162
181
|
*/
|
|
163
182
|
reasoning?: ChatRequestReasoning | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
|
|
185
|
+
*/
|
|
186
|
+
reasoningEffort?: ChatRequestReasoningEffort | null | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* Penalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter.
|
|
189
|
+
*/
|
|
190
|
+
repetitionPenalty?: number | null | undefined;
|
|
164
191
|
/**
|
|
165
192
|
* Response format configuration
|
|
166
193
|
*/
|
|
@@ -205,6 +232,14 @@ export type ChatRequest = {
|
|
|
205
232
|
* Available tools for function calling
|
|
206
233
|
*/
|
|
207
234
|
tools?: Array<ChatFunctionTool> | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* Consider only tokens with "sufficiently high" probabilities based on the probability of the most likely token. Not all providers support this parameter.
|
|
237
|
+
*/
|
|
238
|
+
topA?: number | null | undefined;
|
|
239
|
+
/**
|
|
240
|
+
* Limits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter.
|
|
241
|
+
*/
|
|
242
|
+
topK?: number | null | undefined;
|
|
208
243
|
/**
|
|
209
244
|
* Number of top log probabilities to return (0-20)
|
|
210
245
|
*/
|
|
@@ -240,6 +275,8 @@ export type ChatRequestReasoning$Outbound = {
|
|
|
240
275
|
export declare const ChatRequestReasoning$outboundSchema: z.ZodType<ChatRequestReasoning$Outbound, ChatRequestReasoning>;
|
|
241
276
|
export declare function chatRequestReasoningToJSON(chatRequestReasoning: ChatRequestReasoning): string;
|
|
242
277
|
/** @internal */
|
|
278
|
+
export declare const ChatRequestReasoningEffort$outboundSchema: z.ZodType<string, ChatRequestReasoningEffort>;
|
|
279
|
+
/** @internal */
|
|
243
280
|
export type ResponseFormat$Outbound = ChatFormatGrammarConfig$Outbound | FormatJsonObjectConfig$Outbound | ChatFormatJsonSchemaConfig$Outbound | ChatFormatPythonConfig$Outbound | ChatFormatTextConfig$Outbound;
|
|
244
281
|
/** @internal */
|
|
245
282
|
export declare const ResponseFormat$outboundSchema: z.ZodType<ResponseFormat$Outbound, ResponseFormat>;
|
|
@@ -269,6 +306,7 @@ export type ChatRequest$Outbound = {
|
|
|
269
306
|
metadata?: {
|
|
270
307
|
[k: string]: string;
|
|
271
308
|
} | undefined;
|
|
309
|
+
min_p?: number | null | undefined;
|
|
272
310
|
modalities?: Array<string> | undefined;
|
|
273
311
|
model?: string | undefined;
|
|
274
312
|
models?: Array<string> | undefined;
|
|
@@ -277,6 +315,8 @@ export type ChatRequest$Outbound = {
|
|
|
277
315
|
presence_penalty?: number | null | undefined;
|
|
278
316
|
provider?: ProviderPreferences$Outbound | null | undefined;
|
|
279
317
|
reasoning?: ChatRequestReasoning$Outbound | undefined;
|
|
318
|
+
reasoning_effort?: string | null | undefined;
|
|
319
|
+
repetition_penalty?: number | null | undefined;
|
|
280
320
|
response_format?: ChatFormatGrammarConfig$Outbound | FormatJsonObjectConfig$Outbound | ChatFormatJsonSchemaConfig$Outbound | ChatFormatPythonConfig$Outbound | ChatFormatTextConfig$Outbound | undefined;
|
|
281
321
|
seed?: number | null | undefined;
|
|
282
322
|
service_tier?: string | null | undefined;
|
|
@@ -288,6 +328,8 @@ export type ChatRequest$Outbound = {
|
|
|
288
328
|
temperature?: number | null | undefined;
|
|
289
329
|
tool_choice?: ChatToolChoice$Outbound | undefined;
|
|
290
330
|
tools?: Array<ChatFunctionTool$Outbound> | undefined;
|
|
331
|
+
top_a?: number | null | undefined;
|
|
332
|
+
top_k?: number | null | undefined;
|
|
291
333
|
top_logprobs?: number | null | undefined;
|
|
292
334
|
top_p?: number | null | undefined;
|
|
293
335
|
trace?: TraceConfig$Outbound | undefined;
|
|
@@ -46,6 +46,17 @@ export const ChatRequestEffort = {
|
|
|
46
46
|
Minimal: "minimal",
|
|
47
47
|
None: "none",
|
|
48
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.
|
|
51
|
+
*/
|
|
52
|
+
export const ChatRequestReasoningEffort = {
|
|
53
|
+
Xhigh: "xhigh",
|
|
54
|
+
High: "high",
|
|
55
|
+
Medium: "medium",
|
|
56
|
+
Low: "low",
|
|
57
|
+
Minimal: "minimal",
|
|
58
|
+
None: "none",
|
|
59
|
+
};
|
|
49
60
|
/**
|
|
50
61
|
* The service tier to use for processing this request.
|
|
51
62
|
*/
|
|
@@ -86,6 +97,8 @@ export function chatRequestReasoningToJSON(chatRequestReasoning) {
|
|
|
86
97
|
return JSON.stringify(ChatRequestReasoning$outboundSchema.parse(chatRequestReasoning));
|
|
87
98
|
}
|
|
88
99
|
/** @internal */
|
|
100
|
+
export const ChatRequestReasoningEffort$outboundSchema = openEnums.outboundSchema(ChatRequestReasoningEffort);
|
|
101
|
+
/** @internal */
|
|
89
102
|
export const ResponseFormat$outboundSchema = z.union([
|
|
90
103
|
ChatFormatGrammarConfig$outboundSchema,
|
|
91
104
|
FormatJsonObjectConfig$outboundSchema,
|
|
@@ -119,6 +132,7 @@ export const ChatRequest$outboundSchema = z.object({
|
|
|
119
132
|
maxTokens: z.nullable(z.int()).optional(),
|
|
120
133
|
messages: z.array(ChatMessages$outboundSchema),
|
|
121
134
|
metadata: z.record(z.string(), z.string()).optional(),
|
|
135
|
+
minP: z.nullable(z.number()).optional(),
|
|
122
136
|
modalities: z.array(Modality$outboundSchema).optional(),
|
|
123
137
|
model: z.string().optional(),
|
|
124
138
|
models: z.array(z.string()).optional(),
|
|
@@ -137,6 +151,9 @@ export const ChatRequest$outboundSchema = z.object({
|
|
|
137
151
|
presencePenalty: z.nullable(z.number()).optional(),
|
|
138
152
|
provider: z.nullable(ProviderPreferences$outboundSchema).optional(),
|
|
139
153
|
reasoning: z.lazy(() => ChatRequestReasoning$outboundSchema).optional(),
|
|
154
|
+
reasoningEffort: z.nullable(ChatRequestReasoningEffort$outboundSchema)
|
|
155
|
+
.optional(),
|
|
156
|
+
repetitionPenalty: z.nullable(z.number()).optional(),
|
|
140
157
|
responseFormat: z.union([
|
|
141
158
|
ChatFormatGrammarConfig$outboundSchema,
|
|
142
159
|
FormatJsonObjectConfig$outboundSchema,
|
|
@@ -156,6 +173,8 @@ export const ChatRequest$outboundSchema = z.object({
|
|
|
156
173
|
temperature: z.nullable(z.number()).optional(),
|
|
157
174
|
toolChoice: ChatToolChoice$outboundSchema.optional(),
|
|
158
175
|
tools: z.array(ChatFunctionTool$outboundSchema).optional(),
|
|
176
|
+
topA: z.nullable(z.number()).optional(),
|
|
177
|
+
topK: z.nullable(z.int()).optional(),
|
|
159
178
|
topLogprobs: z.nullable(z.int()).optional(),
|
|
160
179
|
topP: z.nullable(z.number()).optional(),
|
|
161
180
|
trace: TraceConfig$outboundSchema.optional(),
|
|
@@ -168,14 +187,19 @@ export const ChatRequest$outboundSchema = z.object({
|
|
|
168
187
|
logitBias: "logit_bias",
|
|
169
188
|
maxCompletionTokens: "max_completion_tokens",
|
|
170
189
|
maxTokens: "max_tokens",
|
|
190
|
+
minP: "min_p",
|
|
171
191
|
parallelToolCalls: "parallel_tool_calls",
|
|
172
192
|
presencePenalty: "presence_penalty",
|
|
193
|
+
reasoningEffort: "reasoning_effort",
|
|
194
|
+
repetitionPenalty: "repetition_penalty",
|
|
173
195
|
responseFormat: "response_format",
|
|
174
196
|
serviceTier: "service_tier",
|
|
175
197
|
sessionId: "session_id",
|
|
176
198
|
stopServerToolsWhen: "stop_server_tools_when",
|
|
177
199
|
streamOptions: "stream_options",
|
|
178
200
|
toolChoice: "tool_choice",
|
|
201
|
+
topA: "top_a",
|
|
202
|
+
topK: "top_k",
|
|
179
203
|
topLogprobs: "top_logprobs",
|
|
180
204
|
topP: "top_p",
|
|
181
205
|
});
|
|
@@ -16,19 +16,23 @@ export type ChatWebSearchShorthandType = OpenEnum<typeof ChatWebSearchShorthandT
|
|
|
16
16
|
*/
|
|
17
17
|
export type ChatWebSearchShorthand = {
|
|
18
18
|
/**
|
|
19
|
-
* Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI).
|
|
19
|
+
* Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, xAI). Cannot be used with excluded_domains.
|
|
20
20
|
*/
|
|
21
21
|
allowedDomains?: Array<string> | undefined;
|
|
22
22
|
/**
|
|
23
|
-
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API.
|
|
23
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results).
|
|
24
24
|
*/
|
|
25
25
|
engine?: WebSearchEngineEnum | undefined;
|
|
26
26
|
/**
|
|
27
|
-
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored)
|
|
27
|
+
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI. Not supported with OpenAI (silently ignored). Cannot be used with allowed_domains.
|
|
28
28
|
*/
|
|
29
29
|
excludedDomains?: Array<string> | undefined;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity).
|
|
32
|
+
*/
|
|
33
|
+
maxCharacters?: number | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search.
|
|
32
36
|
*/
|
|
33
37
|
maxResults?: number | undefined;
|
|
34
38
|
/**
|
|
@@ -37,7 +41,7 @@ export type ChatWebSearchShorthand = {
|
|
|
37
41
|
maxTotalResults?: number | undefined;
|
|
38
42
|
parameters?: WebSearchConfig | undefined;
|
|
39
43
|
/**
|
|
40
|
-
* How much context to retrieve per result. Applies to Exa and
|
|
44
|
+
* How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.
|
|
41
45
|
*/
|
|
42
46
|
searchContextSize?: SearchQualityLevel | undefined;
|
|
43
47
|
type: ChatWebSearchShorthandType;
|
|
@@ -53,6 +57,7 @@ export type ChatWebSearchShorthand$Outbound = {
|
|
|
53
57
|
allowed_domains?: Array<string> | undefined;
|
|
54
58
|
engine?: string | undefined;
|
|
55
59
|
excluded_domains?: Array<string> | undefined;
|
|
60
|
+
max_characters?: number | undefined;
|
|
56
61
|
max_results?: number | undefined;
|
|
57
62
|
max_total_results?: number | undefined;
|
|
58
63
|
parameters?: WebSearchConfig$Outbound | undefined;
|
|
@@ -22,6 +22,7 @@ export const ChatWebSearchShorthand$outboundSchema = z.object({
|
|
|
22
22
|
allowedDomains: z.array(z.string()).optional(),
|
|
23
23
|
engine: WebSearchEngineEnum$outboundSchema.optional(),
|
|
24
24
|
excludedDomains: z.array(z.string()).optional(),
|
|
25
|
+
maxCharacters: z.int().optional(),
|
|
25
26
|
maxResults: z.int().optional(),
|
|
26
27
|
maxTotalResults: z.int().optional(),
|
|
27
28
|
parameters: WebSearchConfig$outboundSchema.optional(),
|
|
@@ -32,6 +33,7 @@ export const ChatWebSearchShorthand$outboundSchema = z.object({
|
|
|
32
33
|
return remap$(v, {
|
|
33
34
|
allowedDomains: "allowed_domains",
|
|
34
35
|
excludedDomains: "excluded_domains",
|
|
36
|
+
maxCharacters: "max_characters",
|
|
35
37
|
maxResults: "max_results",
|
|
36
38
|
maxTotalResults: "max_total_results",
|
|
37
39
|
searchContextSize: "search_context_size",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
/**
|
|
3
|
+
* An OpenRouter-managed, auto-provisioned ephemeral container.
|
|
4
|
+
*/
|
|
5
|
+
export type ContainerAutoEnvironment = {
|
|
6
|
+
type: "container_auto";
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type ContainerAutoEnvironment$Outbound = {
|
|
10
|
+
type: "container_auto";
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const ContainerAutoEnvironment$outboundSchema: z.ZodType<ContainerAutoEnvironment$Outbound, ContainerAutoEnvironment>;
|
|
14
|
+
export declare function containerAutoEnvironmentToJSON(containerAutoEnvironment: ContainerAutoEnvironment): string;
|
|
15
|
+
//# sourceMappingURL=containerautoenvironment.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 49526688017e
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const ContainerAutoEnvironment$outboundSchema = z.object({
|
|
8
|
+
type: z.literal("container_auto"),
|
|
9
|
+
});
|
|
10
|
+
export function containerAutoEnvironmentToJSON(containerAutoEnvironment) {
|
|
11
|
+
return JSON.stringify(ContainerAutoEnvironment$outboundSchema.parse(containerAutoEnvironment));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=containerautoenvironment.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
/**
|
|
3
|
+
* Reference to a previously created container to reuse.
|
|
4
|
+
*/
|
|
5
|
+
export type ContainerReferenceEnvironment = {
|
|
6
|
+
/**
|
|
7
|
+
* Identifier of an existing container to reuse (max 20 characters).
|
|
8
|
+
*/
|
|
9
|
+
containerId: string;
|
|
10
|
+
type: "container_reference";
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type ContainerReferenceEnvironment$Outbound = {
|
|
14
|
+
container_id: string;
|
|
15
|
+
type: "container_reference";
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const ContainerReferenceEnvironment$outboundSchema: z.ZodType<ContainerReferenceEnvironment$Outbound, ContainerReferenceEnvironment>;
|
|
19
|
+
export declare function containerReferenceEnvironmentToJSON(containerReferenceEnvironment: ContainerReferenceEnvironment): string;
|
|
20
|
+
//# sourceMappingURL=containerreferenceenvironment.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 711d3c8b4418
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ContainerReferenceEnvironment$outboundSchema = z.object({
|
|
9
|
+
containerId: z.string(),
|
|
10
|
+
type: z.literal("container_reference"),
|
|
11
|
+
}).transform((v) => {
|
|
12
|
+
return remap$(v, {
|
|
13
|
+
containerId: "container_id",
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
export function containerReferenceEnvironmentToJSON(containerReferenceEnvironment) {
|
|
17
|
+
return JSON.stringify(ContainerReferenceEnvironment$outboundSchema.parse(containerReferenceEnvironment));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=containerreferenceenvironment.js.map
|
|
@@ -3,6 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { ContentFilterBuiltinAction } from "./contentfilterbuiltinaction.js";
|
|
4
4
|
import { ContentFilterBuiltinSlug } from "./contentfilterbuiltinslug.js";
|
|
5
5
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
+
import { PromptInjectionScanScope } from "./promptinjectionscanscope.js";
|
|
6
7
|
/**
|
|
7
8
|
* A builtin content filter entry. Builtin filters include PII detectors and the regex-based prompt injection detector.
|
|
8
9
|
*/
|
|
@@ -15,6 +16,10 @@ export type ContentFilterBuiltinEntry = {
|
|
|
15
16
|
* Read-only, system-assigned redaction placeholder derived from the slug (e.g. "[EMAIL]", "[PHONE]"). Not settable by the caller.
|
|
16
17
|
*/
|
|
17
18
|
label?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.
|
|
21
|
+
*/
|
|
22
|
+
scanScope?: PromptInjectionScanScope | undefined;
|
|
18
23
|
/**
|
|
19
24
|
* The builtin filter identifier
|
|
20
25
|
*/
|
|
@@ -3,14 +3,21 @@
|
|
|
3
3
|
* @generated-id: a4c9b1effbc1
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../lib/schemas.js";
|
|
7
8
|
import { ContentFilterBuiltinAction$inboundSchema, } from "./contentfilterbuiltinaction.js";
|
|
8
9
|
import { ContentFilterBuiltinSlug$inboundSchema, } from "./contentfilterbuiltinslug.js";
|
|
10
|
+
import { PromptInjectionScanScope$inboundSchema, } from "./promptinjectionscanscope.js";
|
|
9
11
|
/** @internal */
|
|
10
12
|
export const ContentFilterBuiltinEntry$inboundSchema = z.object({
|
|
11
13
|
action: ContentFilterBuiltinAction$inboundSchema,
|
|
12
14
|
label: z.string().optional(),
|
|
15
|
+
scan_scope: PromptInjectionScanScope$inboundSchema.optional(),
|
|
13
16
|
slug: ContentFilterBuiltinSlug$inboundSchema,
|
|
17
|
+
}).transform((v) => {
|
|
18
|
+
return remap$(v, {
|
|
19
|
+
"scan_scope": "scanScope",
|
|
20
|
+
});
|
|
14
21
|
});
|
|
15
22
|
export function contentFilterBuiltinEntryFromJSON(jsonString) {
|
|
16
23
|
return safeParse(jsonString, (x) => ContentFilterBuiltinEntry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ContentFilterBuiltinEntry' from JSON`);
|