import * as z from "zod/v4"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { FusionAnalysisResult, FusionAnalysisResult$Outbound } from "./fusionanalysisresult.js"; import { FusionSource, FusionSource$Outbound } from "./fusionsource.js"; import { ToolCallStatus } from "./toolcallstatus.js"; export type FailedModel = { /** * Error message describing why the model failed. */ error: string; /** * Slug of the analysis model that failed. */ model: string; /** * HTTP status code from the upstream response, when available (e.g. 402, 429). */ statusCode?: number | undefined; }; export type OutputFusionServerToolItemResponse = { content?: string | undefined; model: string; }; export declare const OutputFusionServerToolItemType: { readonly OpenrouterFusion: "openrouter:fusion"; }; export type OutputFusionServerToolItemType = ClosedEnum; /** * An openrouter:fusion server tool output item */ export type OutputFusionServerToolItem = { /** * Structured analysis produced by the fusion analyst model. */ analysis?: FusionAnalysisResult | undefined; /** * Error message when the fusion run did not produce an analysis result. */ error?: string | undefined; /** * Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. The fusion result is still usable but was produced from a degraded panel. */ failedModels?: Array | undefined; /** * Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, invalid_model, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching. The consumer-cancellation code is `cancelled`. */ failureReason?: string | undefined; id?: string | undefined; /** * Analysis models that produced a response in this fusion run, with each model's full panel content. */ responses?: Array | undefined; /** * Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source. */ sources?: Array | undefined; status: ToolCallStatus; type: OutputFusionServerToolItemType; }; /** @internal */ export declare const FailedModel$inboundSchema: z.ZodType; /** @internal */ export type FailedModel$Outbound = { error: string; model: string; status_code?: number | undefined; }; /** @internal */ export declare const FailedModel$outboundSchema: z.ZodType; export declare function failedModelToJSON(failedModel: FailedModel): string; export declare function failedModelFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const OutputFusionServerToolItemResponse$inboundSchema: z.ZodType; /** @internal */ export type OutputFusionServerToolItemResponse$Outbound = { content?: string | undefined; model: string; }; /** @internal */ export declare const OutputFusionServerToolItemResponse$outboundSchema: z.ZodType; export declare function outputFusionServerToolItemResponseToJSON(outputFusionServerToolItemResponse: OutputFusionServerToolItemResponse): string; export declare function outputFusionServerToolItemResponseFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const OutputFusionServerToolItemType$inboundSchema: z.ZodEnum; /** @internal */ export declare const OutputFusionServerToolItemType$outboundSchema: z.ZodEnum; /** @internal */ export declare const OutputFusionServerToolItem$inboundSchema: z.ZodType; /** @internal */ export type OutputFusionServerToolItem$Outbound = { analysis?: FusionAnalysisResult$Outbound | undefined; error?: string | undefined; failed_models?: Array | undefined; failure_reason?: string | undefined; id?: string | undefined; responses?: Array | undefined; sources?: Array | undefined; status: string; type: string; }; /** @internal */ export declare const OutputFusionServerToolItem$outboundSchema: z.ZodType; export declare function outputFusionServerToolItemToJSON(outputFusionServerToolItem: OutputFusionServerToolItem): string; export declare function outputFusionServerToolItemFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=outputfusionservertoolitem.d.ts.map