@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,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0df2084e1a56
|
|
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
|
+
import { FusionAnalysisResult$inboundSchema, } from "./fusionanalysisresult.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const FusionCallAnalysisCompletedEvent$inboundSchema = z.object({
|
|
11
|
+
analysis: FusionAnalysisResult$inboundSchema,
|
|
12
|
+
item_id: z.string(),
|
|
13
|
+
output_index: z.int(),
|
|
14
|
+
sequence_number: z.int(),
|
|
15
|
+
type: z.literal("response.fusion_call.analysis.completed"),
|
|
16
|
+
}).transform((v) => {
|
|
17
|
+
return remap$(v, {
|
|
18
|
+
"item_id": "itemId",
|
|
19
|
+
"output_index": "outputIndex",
|
|
20
|
+
"sequence_number": "sequenceNumber",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
export function fusionCallAnalysisCompletedEventFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => FusionCallAnalysisCompletedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallAnalysisCompletedEvent' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=fusioncallanalysiscompletedevent.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Emitted when the fusion judge starts producing the structured analysis.
|
|
6
|
+
*/
|
|
7
|
+
export type FusionCallAnalysisInProgressEvent = {
|
|
8
|
+
itemId: string;
|
|
9
|
+
judgeModel: string;
|
|
10
|
+
outputIndex: number;
|
|
11
|
+
sequenceNumber: number;
|
|
12
|
+
type: "response.fusion_call.analysis.in_progress";
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const FusionCallAnalysisInProgressEvent$inboundSchema: z.ZodType<FusionCallAnalysisInProgressEvent, unknown>;
|
|
16
|
+
export declare function fusionCallAnalysisInProgressEventFromJSON(jsonString: string): SafeParseResult<FusionCallAnalysisInProgressEvent, SDKValidationError>;
|
|
17
|
+
//# sourceMappingURL=fusioncallanalysisinprogressevent.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 13da94fa473e
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const FusionCallAnalysisInProgressEvent$inboundSchema = z.object({
|
|
10
|
+
item_id: z.string(),
|
|
11
|
+
judge_model: z.string(),
|
|
12
|
+
output_index: z.int(),
|
|
13
|
+
sequence_number: z.int(),
|
|
14
|
+
type: z.literal("response.fusion_call.analysis.in_progress"),
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
"item_id": "itemId",
|
|
18
|
+
"judge_model": "judgeModel",
|
|
19
|
+
"output_index": "outputIndex",
|
|
20
|
+
"sequence_number": "sequenceNumber",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
export function fusionCallAnalysisInProgressEventFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => FusionCallAnalysisInProgressEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallAnalysisInProgressEvent' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=fusioncallanalysisinprogressevent.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Emitted when the openrouter:fusion tool call finishes.
|
|
6
|
+
*/
|
|
7
|
+
export type FusionCallCompletedEvent = {
|
|
8
|
+
itemId: string;
|
|
9
|
+
outputIndex: number;
|
|
10
|
+
sequenceNumber: number;
|
|
11
|
+
type: "response.fusion_call.completed";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const FusionCallCompletedEvent$inboundSchema: z.ZodType<FusionCallCompletedEvent, unknown>;
|
|
15
|
+
export declare function fusionCallCompletedEventFromJSON(jsonString: string): SafeParseResult<FusionCallCompletedEvent, SDKValidationError>;
|
|
16
|
+
//# sourceMappingURL=fusioncallcompletedevent.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 54f2c88f75f7
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const FusionCallCompletedEvent$inboundSchema = z.object({
|
|
10
|
+
item_id: z.string(),
|
|
11
|
+
output_index: z.int(),
|
|
12
|
+
sequence_number: z.int(),
|
|
13
|
+
type: z.literal("response.fusion_call.completed"),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"item_id": "itemId",
|
|
17
|
+
"output_index": "outputIndex",
|
|
18
|
+
"sequence_number": "sequenceNumber",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function fusionCallCompletedEventFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => FusionCallCompletedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallCompletedEvent' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=fusioncallcompletedevent.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Emitted when an openrouter:fusion tool call begins executing.
|
|
6
|
+
*/
|
|
7
|
+
export type FusionCallInProgressEvent = {
|
|
8
|
+
itemId: string;
|
|
9
|
+
outputIndex: number;
|
|
10
|
+
sequenceNumber: number;
|
|
11
|
+
type: "response.fusion_call.in_progress";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const FusionCallInProgressEvent$inboundSchema: z.ZodType<FusionCallInProgressEvent, unknown>;
|
|
15
|
+
export declare function fusionCallInProgressEventFromJSON(jsonString: string): SafeParseResult<FusionCallInProgressEvent, SDKValidationError>;
|
|
16
|
+
//# sourceMappingURL=fusioncallinprogressevent.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 623b79a90448
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const FusionCallInProgressEvent$inboundSchema = z.object({
|
|
10
|
+
item_id: z.string(),
|
|
11
|
+
output_index: z.int(),
|
|
12
|
+
sequence_number: z.int(),
|
|
13
|
+
type: z.literal("response.fusion_call.in_progress"),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"item_id": "itemId",
|
|
17
|
+
"output_index": "outputIndex",
|
|
18
|
+
"sequence_number": "sequenceNumber",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
export function fusionCallInProgressEventFromJSON(jsonString) {
|
|
22
|
+
return safeParse(jsonString, (x) => FusionCallInProgressEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallInProgressEvent' from JSON`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=fusioncallinprogressevent.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Emitted when a fusion analysis-panel model starts.
|
|
6
|
+
*/
|
|
7
|
+
export type FusionCallPanelAddedEvent = {
|
|
8
|
+
itemId: string;
|
|
9
|
+
model: string;
|
|
10
|
+
outputIndex: number;
|
|
11
|
+
sequenceNumber: number;
|
|
12
|
+
type: "response.fusion_call.panel.added";
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const FusionCallPanelAddedEvent$inboundSchema: z.ZodType<FusionCallPanelAddedEvent, unknown>;
|
|
16
|
+
export declare function fusionCallPanelAddedEventFromJSON(jsonString: string): SafeParseResult<FusionCallPanelAddedEvent, SDKValidationError>;
|
|
17
|
+
//# sourceMappingURL=fusioncallpaneladdedevent.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 58f0673347e7
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const FusionCallPanelAddedEvent$inboundSchema = z.object({
|
|
10
|
+
item_id: z.string(),
|
|
11
|
+
model: z.string(),
|
|
12
|
+
output_index: z.int(),
|
|
13
|
+
sequence_number: z.int(),
|
|
14
|
+
type: z.literal("response.fusion_call.panel.added"),
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
"item_id": "itemId",
|
|
18
|
+
"output_index": "outputIndex",
|
|
19
|
+
"sequence_number": "sequenceNumber",
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
export function fusionCallPanelAddedEventFromJSON(jsonString) {
|
|
23
|
+
return safeParse(jsonString, (x) => FusionCallPanelAddedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallPanelAddedEvent' from JSON`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=fusioncallpaneladdedevent.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Emitted when a fusion panel model finishes with its full content.
|
|
6
|
+
*/
|
|
7
|
+
export type FusionCallPanelCompletedEvent = {
|
|
8
|
+
content: string;
|
|
9
|
+
itemId: string;
|
|
10
|
+
model: string;
|
|
11
|
+
outputIndex: number;
|
|
12
|
+
sequenceNumber: number;
|
|
13
|
+
type: "response.fusion_call.panel.completed";
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const FusionCallPanelCompletedEvent$inboundSchema: z.ZodType<FusionCallPanelCompletedEvent, unknown>;
|
|
17
|
+
export declare function fusionCallPanelCompletedEventFromJSON(jsonString: string): SafeParseResult<FusionCallPanelCompletedEvent, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=fusioncallpanelcompletedevent.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3578a5986185
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const FusionCallPanelCompletedEvent$inboundSchema = z.object({
|
|
10
|
+
content: z.string(),
|
|
11
|
+
item_id: z.string(),
|
|
12
|
+
model: z.string(),
|
|
13
|
+
output_index: z.int(),
|
|
14
|
+
sequence_number: z.int(),
|
|
15
|
+
type: z.literal("response.fusion_call.panel.completed"),
|
|
16
|
+
}).transform((v) => {
|
|
17
|
+
return remap$(v, {
|
|
18
|
+
"item_id": "itemId",
|
|
19
|
+
"output_index": "outputIndex",
|
|
20
|
+
"sequence_number": "sequenceNumber",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
export function fusionCallPanelCompletedEventFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => FusionCallPanelCompletedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallPanelCompletedEvent' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=fusioncallpanelcompletedevent.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Incremental content token from a fusion panel model.
|
|
6
|
+
*/
|
|
7
|
+
export type FusionCallPanelDeltaEvent = {
|
|
8
|
+
delta: string;
|
|
9
|
+
itemId: string;
|
|
10
|
+
model: string;
|
|
11
|
+
outputIndex: number;
|
|
12
|
+
sequenceNumber: number;
|
|
13
|
+
type: "response.fusion_call.panel.delta";
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const FusionCallPanelDeltaEvent$inboundSchema: z.ZodType<FusionCallPanelDeltaEvent, unknown>;
|
|
17
|
+
export declare function fusionCallPanelDeltaEventFromJSON(jsonString: string): SafeParseResult<FusionCallPanelDeltaEvent, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=fusioncallpaneldeltaevent.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 055e9ca60301
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const FusionCallPanelDeltaEvent$inboundSchema = z.object({
|
|
10
|
+
delta: z.string(),
|
|
11
|
+
item_id: z.string(),
|
|
12
|
+
model: z.string(),
|
|
13
|
+
output_index: z.int(),
|
|
14
|
+
sequence_number: z.int(),
|
|
15
|
+
type: z.literal("response.fusion_call.panel.delta"),
|
|
16
|
+
}).transform((v) => {
|
|
17
|
+
return remap$(v, {
|
|
18
|
+
"item_id": "itemId",
|
|
19
|
+
"output_index": "outputIndex",
|
|
20
|
+
"sequence_number": "sequenceNumber",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
export function fusionCallPanelDeltaEventFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => FusionCallPanelDeltaEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallPanelDeltaEvent' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=fusioncallpaneldeltaevent.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Emitted when a fusion panel model fails.
|
|
6
|
+
*/
|
|
7
|
+
export type FusionCallPanelFailedEvent = {
|
|
8
|
+
error: string;
|
|
9
|
+
itemId: string;
|
|
10
|
+
model: string;
|
|
11
|
+
outputIndex: number;
|
|
12
|
+
sequenceNumber: number;
|
|
13
|
+
statusCode?: number | undefined;
|
|
14
|
+
type: "response.fusion_call.panel.failed";
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const FusionCallPanelFailedEvent$inboundSchema: z.ZodType<FusionCallPanelFailedEvent, unknown>;
|
|
18
|
+
export declare function fusionCallPanelFailedEventFromJSON(jsonString: string): SafeParseResult<FusionCallPanelFailedEvent, SDKValidationError>;
|
|
19
|
+
//# sourceMappingURL=fusioncallpanelfailedevent.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 44d86c32e741
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const FusionCallPanelFailedEvent$inboundSchema = z.object({
|
|
10
|
+
error: z.string(),
|
|
11
|
+
item_id: z.string(),
|
|
12
|
+
model: z.string(),
|
|
13
|
+
output_index: z.int(),
|
|
14
|
+
sequence_number: z.int(),
|
|
15
|
+
status_code: z.int().optional(),
|
|
16
|
+
type: z.literal("response.fusion_call.panel.failed"),
|
|
17
|
+
}).transform((v) => {
|
|
18
|
+
return remap$(v, {
|
|
19
|
+
"item_id": "itemId",
|
|
20
|
+
"output_index": "outputIndex",
|
|
21
|
+
"sequence_number": "sequenceNumber",
|
|
22
|
+
"status_code": "statusCode",
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
export function fusionCallPanelFailedEventFromJSON(jsonString) {
|
|
26
|
+
return safeParse(jsonString, (x) => FusionCallPanelFailedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallPanelFailedEvent' from JSON`);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=fusioncallpanelfailedevent.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Incremental reasoning token from a fusion panel model.
|
|
6
|
+
*/
|
|
7
|
+
export type FusionCallPanelReasoningDeltaEvent = {
|
|
8
|
+
delta: string;
|
|
9
|
+
itemId: string;
|
|
10
|
+
model: string;
|
|
11
|
+
outputIndex: number;
|
|
12
|
+
sequenceNumber: number;
|
|
13
|
+
type: "response.fusion_call.panel.reasoning.delta";
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const FusionCallPanelReasoningDeltaEvent$inboundSchema: z.ZodType<FusionCallPanelReasoningDeltaEvent, unknown>;
|
|
17
|
+
export declare function fusionCallPanelReasoningDeltaEventFromJSON(jsonString: string): SafeParseResult<FusionCallPanelReasoningDeltaEvent, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=fusioncallpanelreasoningdeltaevent.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 9c7b9ba8a22c
|
|
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
|
+
/** @internal */
|
|
9
|
+
export const FusionCallPanelReasoningDeltaEvent$inboundSchema = z.object({
|
|
10
|
+
delta: z.string(),
|
|
11
|
+
item_id: z.string(),
|
|
12
|
+
model: z.string(),
|
|
13
|
+
output_index: z.int(),
|
|
14
|
+
sequence_number: z.int(),
|
|
15
|
+
type: z.literal("response.fusion_call.panel.reasoning.delta"),
|
|
16
|
+
}).transform((v) => {
|
|
17
|
+
return remap$(v, {
|
|
18
|
+
"item_id": "itemId",
|
|
19
|
+
"output_index": "outputIndex",
|
|
20
|
+
"sequence_number": "sequenceNumber",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
export function fusionCallPanelReasoningDeltaEventFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => FusionCallPanelReasoningDeltaEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FusionCallPanelReasoningDeltaEvent' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=fusioncallpanelreasoningdeltaevent.js.map
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PresetEnum: {
|
|
7
|
+
readonly GeneralHigh: "general-high";
|
|
8
|
+
readonly GeneralBudget: "general-budget";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
12
|
+
*/
|
|
13
|
+
export type PresetEnum = OpenEnum<typeof PresetEnum>;
|
|
14
|
+
export type FusionPluginTool = {
|
|
15
|
+
/**
|
|
16
|
+
* Optional configuration forwarded as the tool's `parameters` object.
|
|
17
|
+
*/
|
|
18
|
+
parameters?: {
|
|
19
|
+
[k: string]: any | null;
|
|
20
|
+
} | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch").
|
|
23
|
+
*/
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
2
26
|
export type FusionPlugin = {
|
|
3
27
|
/**
|
|
4
28
|
* Slugs of models to run in parallel as the "expert panel" the judge analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).
|
|
@@ -17,14 +41,36 @@ export type FusionPlugin = {
|
|
|
17
41
|
* Slug of the model that performs both the judge step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.
|
|
18
42
|
*/
|
|
19
43
|
model?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
46
|
+
*/
|
|
47
|
+
preset?: PresetEnum | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).
|
|
50
|
+
*/
|
|
51
|
+
tools?: Array<FusionPluginTool> | undefined;
|
|
20
52
|
};
|
|
21
53
|
/** @internal */
|
|
54
|
+
export declare const PresetEnum$outboundSchema: z.ZodType<string, PresetEnum>;
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type FusionPluginTool$Outbound = {
|
|
57
|
+
parameters?: {
|
|
58
|
+
[k: string]: any | null;
|
|
59
|
+
} | undefined;
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
/** @internal */
|
|
63
|
+
export declare const FusionPluginTool$outboundSchema: z.ZodType<FusionPluginTool$Outbound, FusionPluginTool>;
|
|
64
|
+
export declare function fusionPluginToolToJSON(fusionPluginTool: FusionPluginTool): string;
|
|
65
|
+
/** @internal */
|
|
22
66
|
export type FusionPlugin$Outbound = {
|
|
23
67
|
analysis_models?: Array<string> | undefined;
|
|
24
68
|
enabled?: boolean | undefined;
|
|
25
69
|
id: "fusion";
|
|
26
70
|
max_tool_calls?: number | undefined;
|
|
27
71
|
model?: string | undefined;
|
|
72
|
+
preset?: string | undefined;
|
|
73
|
+
tools?: Array<FusionPluginTool$Outbound> | undefined;
|
|
28
74
|
};
|
|
29
75
|
/** @internal */
|
|
30
76
|
export declare const FusionPlugin$outboundSchema: z.ZodType<FusionPlugin$Outbound, FusionPlugin>;
|
|
@@ -4,6 +4,24 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
/**
|
|
9
|
+
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
10
|
+
*/
|
|
11
|
+
export const PresetEnum = {
|
|
12
|
+
GeneralHigh: "general-high",
|
|
13
|
+
GeneralBudget: "general-budget",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const PresetEnum$outboundSchema = openEnums.outboundSchema(PresetEnum);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const FusionPluginTool$outboundSchema = z.object({
|
|
19
|
+
parameters: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
20
|
+
type: z.string(),
|
|
21
|
+
});
|
|
22
|
+
export function fusionPluginToolToJSON(fusionPluginTool) {
|
|
23
|
+
return JSON.stringify(FusionPluginTool$outboundSchema.parse(fusionPluginTool));
|
|
24
|
+
}
|
|
7
25
|
/** @internal */
|
|
8
26
|
export const FusionPlugin$outboundSchema = z.object({
|
|
9
27
|
analysisModels: z.array(z.string()).optional(),
|
|
@@ -11,6 +29,8 @@ export const FusionPlugin$outboundSchema = z.object({
|
|
|
11
29
|
id: z.literal("fusion"),
|
|
12
30
|
maxToolCalls: z.int().optional(),
|
|
13
31
|
model: z.string().optional(),
|
|
32
|
+
preset: PresetEnum$outboundSchema.optional(),
|
|
33
|
+
tools: z.array(z.lazy(() => FusionPluginTool$outboundSchema)).optional(),
|
|
14
34
|
}).transform((v) => {
|
|
15
35
|
return remap$(v, {
|
|
16
36
|
analysisModels: "analysis_models",
|
|
@@ -28,6 +28,18 @@ export type FusionServerToolConfigReasoning = {
|
|
|
28
28
|
*/
|
|
29
29
|
maxTokens?: number | undefined;
|
|
30
30
|
};
|
|
31
|
+
export type FusionServerToolConfigTool = {
|
|
32
|
+
/**
|
|
33
|
+
* Optional configuration forwarded as the tool's `parameters` object.
|
|
34
|
+
*/
|
|
35
|
+
parameters?: {
|
|
36
|
+
[k: string]: any | null;
|
|
37
|
+
} | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch").
|
|
40
|
+
*/
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
31
43
|
/**
|
|
32
44
|
* Configuration for the openrouter:fusion server tool.
|
|
33
45
|
*/
|
|
@@ -56,6 +68,10 @@ export type FusionServerToolConfig = {
|
|
|
56
68
|
* Sampling temperature forwarded to panelist and judge inner calls. When omitted, the provider's default applies.
|
|
57
69
|
*/
|
|
58
70
|
temperature?: number | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Server tools available to panelist and judge inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).
|
|
73
|
+
*/
|
|
74
|
+
tools?: Array<FusionServerToolConfigTool> | undefined;
|
|
59
75
|
};
|
|
60
76
|
/** @internal */
|
|
61
77
|
export declare const FusionServerToolConfigEffort$outboundSchema: z.ZodType<string, FusionServerToolConfigEffort>;
|
|
@@ -68,6 +84,16 @@ export type FusionServerToolConfigReasoning$Outbound = {
|
|
|
68
84
|
export declare const FusionServerToolConfigReasoning$outboundSchema: z.ZodType<FusionServerToolConfigReasoning$Outbound, FusionServerToolConfigReasoning>;
|
|
69
85
|
export declare function fusionServerToolConfigReasoningToJSON(fusionServerToolConfigReasoning: FusionServerToolConfigReasoning): string;
|
|
70
86
|
/** @internal */
|
|
87
|
+
export type FusionServerToolConfigTool$Outbound = {
|
|
88
|
+
parameters?: {
|
|
89
|
+
[k: string]: any | null;
|
|
90
|
+
} | undefined;
|
|
91
|
+
type: string;
|
|
92
|
+
};
|
|
93
|
+
/** @internal */
|
|
94
|
+
export declare const FusionServerToolConfigTool$outboundSchema: z.ZodType<FusionServerToolConfigTool$Outbound, FusionServerToolConfigTool>;
|
|
95
|
+
export declare function fusionServerToolConfigToolToJSON(fusionServerToolConfigTool: FusionServerToolConfigTool): string;
|
|
96
|
+
/** @internal */
|
|
71
97
|
export type FusionServerToolConfig$Outbound = {
|
|
72
98
|
analysis_models?: Array<string> | undefined;
|
|
73
99
|
max_completion_tokens?: number | undefined;
|
|
@@ -75,6 +101,7 @@ export type FusionServerToolConfig$Outbound = {
|
|
|
75
101
|
model?: string | undefined;
|
|
76
102
|
reasoning?: FusionServerToolConfigReasoning$Outbound | undefined;
|
|
77
103
|
temperature?: number | undefined;
|
|
104
|
+
tools?: Array<FusionServerToolConfigTool$Outbound> | undefined;
|
|
78
105
|
};
|
|
79
106
|
/** @internal */
|
|
80
107
|
export declare const FusionServerToolConfig$outboundSchema: z.ZodType<FusionServerToolConfig$Outbound, FusionServerToolConfig>;
|
|
@@ -31,6 +31,14 @@ export function fusionServerToolConfigReasoningToJSON(fusionServerToolConfigReas
|
|
|
31
31
|
return JSON.stringify(FusionServerToolConfigReasoning$outboundSchema.parse(fusionServerToolConfigReasoning));
|
|
32
32
|
}
|
|
33
33
|
/** @internal */
|
|
34
|
+
export const FusionServerToolConfigTool$outboundSchema = z.object({
|
|
35
|
+
parameters: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
36
|
+
type: z.string(),
|
|
37
|
+
});
|
|
38
|
+
export function fusionServerToolConfigToolToJSON(fusionServerToolConfigTool) {
|
|
39
|
+
return JSON.stringify(FusionServerToolConfigTool$outboundSchema.parse(fusionServerToolConfigTool));
|
|
40
|
+
}
|
|
41
|
+
/** @internal */
|
|
34
42
|
export const FusionServerToolConfig$outboundSchema = z.object({
|
|
35
43
|
analysisModels: z.array(z.string()).optional(),
|
|
36
44
|
maxCompletionTokens: z.int().optional(),
|
|
@@ -39,6 +47,8 @@ export const FusionServerToolConfig$outboundSchema = z.object({
|
|
|
39
47
|
reasoning: z.lazy(() => FusionServerToolConfigReasoning$outboundSchema)
|
|
40
48
|
.optional(),
|
|
41
49
|
temperature: z.number().optional(),
|
|
50
|
+
tools: z.array(z.lazy(() => FusionServerToolConfigTool$outboundSchema))
|
|
51
|
+
.optional(),
|
|
42
52
|
}).transform((v) => {
|
|
43
53
|
return remap$(v, {
|
|
44
54
|
analysisModels: "analysis_models",
|
|
@@ -13,11 +13,23 @@ export declare const ApiType: {
|
|
|
13
13
|
readonly Tts: "tts";
|
|
14
14
|
readonly Stt: "stt";
|
|
15
15
|
readonly Video: "video";
|
|
16
|
+
readonly Image: "image";
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
18
19
|
* Type of API used for the generation
|
|
19
20
|
*/
|
|
20
21
|
export type ApiType = OpenEnum<typeof ApiType>;
|
|
22
|
+
/**
|
|
23
|
+
* The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DataRegion: {
|
|
26
|
+
readonly Global: "global";
|
|
27
|
+
readonly Europe: "europe";
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise.
|
|
31
|
+
*/
|
|
32
|
+
export type DataRegion = OpenEnum<typeof DataRegion>;
|
|
21
33
|
/**
|
|
22
34
|
* Generation data
|
|
23
35
|
*/
|
|
@@ -42,6 +54,10 @@ export type GenerationResponseData = {
|
|
|
42
54
|
* ISO 8601 timestamp of when the generation was created
|
|
43
55
|
*/
|
|
44
56
|
createdAt: string;
|
|
57
|
+
/**
|
|
58
|
+
* The data region this generation was routed through. 'europe' for EU-routed requests, 'global' otherwise.
|
|
59
|
+
*/
|
|
60
|
+
dataRegion: DataRegion;
|
|
45
61
|
/**
|
|
46
62
|
* External user identifier
|
|
47
63
|
*/
|
|
@@ -126,6 +142,10 @@ export type GenerationResponseData = {
|
|
|
126
142
|
* Origin URL of the request
|
|
127
143
|
*/
|
|
128
144
|
origin: string;
|
|
145
|
+
/**
|
|
146
|
+
* ID of the preset used for this generation, null if no preset was used
|
|
147
|
+
*/
|
|
148
|
+
presetId: string | null;
|
|
129
149
|
/**
|
|
130
150
|
* Name of the provider that served the request
|
|
131
151
|
*/
|
|
@@ -203,6 +223,8 @@ export type GenerationResponse = {
|
|
|
203
223
|
/** @internal */
|
|
204
224
|
export declare const ApiType$inboundSchema: z.ZodType<ApiType, unknown>;
|
|
205
225
|
/** @internal */
|
|
226
|
+
export declare const DataRegion$inboundSchema: z.ZodType<DataRegion, unknown>;
|
|
227
|
+
/** @internal */
|
|
206
228
|
export declare const GenerationResponseData$inboundSchema: z.ZodType<GenerationResponseData, unknown>;
|
|
207
229
|
export declare function generationResponseDataFromJSON(jsonString: string): SafeParseResult<GenerationResponseData, SDKValidationError>;
|
|
208
230
|
/** @internal */
|