import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js"; import { ApplyPatchServerTool, ApplyPatchServerTool$Outbound } from "./applypatchservertool.js"; import { ApplyPatchServerToolOpenRouter, ApplyPatchServerToolOpenRouter$Outbound } from "./applypatchservertoolopenrouter.js"; import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js"; import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js"; import { CodeInterpreterServerTool, CodeInterpreterServerTool$Outbound } from "./codeinterpreterservertool.js"; import { CodexLocalShellTool, CodexLocalShellTool$Outbound } from "./codexlocalshelltool.js"; import { ComputerUseServerTool, ComputerUseServerTool$Outbound } from "./computeruseservertool.js"; import { ContextCompressionPlugin, ContextCompressionPlugin$Outbound } from "./contextcompressionplugin.js"; import { CustomTool, CustomTool$Outbound } from "./customtool.js"; import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeservertool.js"; import { FileParserPlugin, FileParserPlugin$Outbound } from "./fileparserplugin.js"; import { FileSearchServerTool, FileSearchServerTool$Outbound } from "./filesearchservertool.js"; import { FusionPlugin, FusionPlugin$Outbound } from "./fusionplugin.js"; import { FusionServerToolOpenRouter, FusionServerToolOpenRouter$Outbound } from "./fusionservertoolopenrouter.js"; import { ImageConfig, ImageConfig$Outbound } from "./imageconfig.js"; import { ImageGenerationServerTool, ImageGenerationServerTool$Outbound } from "./imagegenerationservertool.js"; import { ImageGenerationServerToolOpenRouter, ImageGenerationServerToolOpenRouter$Outbound } from "./imagegenerationservertoolopenrouter.js"; import { InputsUnion, InputsUnion$Outbound } from "./inputsunion.js"; import { LegacyWebSearchServerTool, LegacyWebSearchServerTool$Outbound } from "./legacywebsearchservertool.js"; import { McpServerTool, McpServerTool$Outbound } from "./mcpservertool.js"; import { ModerationPlugin, ModerationPlugin$Outbound } from "./moderationplugin.js"; import { OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnion$Outbound } from "./openairesponsestoolchoiceunion.js"; import { OpenAIResponsesTruncation } from "./openairesponsestruncation.js"; import { OutputModalityEnum } from "./outputmodalityenum.js"; import { ParetoRouterPlugin, ParetoRouterPlugin$Outbound } from "./paretorouterplugin.js"; import { Preview20250311WebSearchServerTool, Preview20250311WebSearchServerTool$Outbound } from "./preview20250311websearchservertool.js"; import { PreviewWebSearchServerTool, PreviewWebSearchServerTool$Outbound } from "./previewwebsearchservertool.js"; import { ProviderPreferences, ProviderPreferences$Outbound } from "./providerpreferences.js"; import { ReasoningConfig, ReasoningConfig$Outbound } from "./reasoningconfig.js"; import { ResponseHealingPlugin, ResponseHealingPlugin$Outbound } from "./responsehealingplugin.js"; import { ResponseIncludesEnum } from "./responseincludesenum.js"; import { ShellServerTool, ShellServerTool$Outbound } from "./shellservertool.js"; import { StopServerToolsWhenCondition, StopServerToolsWhenCondition$Outbound } from "./stopservertoolswhencondition.js"; import { StoredPromptTemplate, StoredPromptTemplate$Outbound } from "./storedprompttemplate.js"; import { TextExtendedConfig, TextExtendedConfig$Outbound } from "./textextendedconfig.js"; import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js"; import { WebFetchPlugin, WebFetchPlugin$Outbound } from "./webfetchplugin.js"; import { WebFetchServerTool, WebFetchServerTool$Outbound } from "./webfetchservertool.js"; import { WebSearchPlugin, WebSearchPlugin$Outbound } from "./websearchplugin.js"; import { WebSearchServerTool, WebSearchServerTool$Outbound } from "./websearchservertool.js"; import { WebSearchServerToolOpenRouter, WebSearchServerToolOpenRouter$Outbound } from "./websearchservertoolopenrouter.js"; export type ResponsesRequestPlugin = AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin; export declare const ResponsesRequestServiceTier: { readonly Auto: "auto"; readonly Default: "default"; readonly Flex: "flex"; readonly Priority: "priority"; readonly Scale: "scale"; }; export type ResponsesRequestServiceTier = OpenEnum; /** * Function tool definition */ export type ResponsesRequestToolFunction = { description?: string | null | undefined; name: string; parameters: { [k: string]: any | null; } | null; strict?: boolean | null | undefined; type: "function"; }; export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | PreviewWebSearchServerTool | Preview20250311WebSearchServerTool | LegacyWebSearchServerTool | WebSearchServerTool | FileSearchServerTool | ComputerUseServerTool | CodeInterpreterServerTool | McpServerTool | ImageGenerationServerTool | CodexLocalShellTool | ShellServerTool | ApplyPatchServerTool | CustomTool | (DatetimeServerTool & { type: "openrouter:datetime"; }) | FusionServerToolOpenRouter | (ImageGenerationServerToolOpenRouter & { type: "openrouter:image_generation"; }) | (ChatSearchModelsServerTool & { type: "openrouter:experimental__search_models"; }) | (WebFetchServerTool & { type: "openrouter:web_fetch"; }) | WebSearchServerToolOpenRouter | ApplyPatchServerToolOpenRouter; /** * Request schema for Responses endpoint */ export type ResponsesRequest = { background?: boolean | null | undefined; /** * Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. */ cacheControl?: AnthropicCacheControlDirective | undefined; frequencyPenalty?: number | null | undefined; /** * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. */ imageConfig?: { [k: string]: ImageConfig; } | undefined; include?: Array | null | undefined; /** * Input for a response request - can be a string or array of items */ input?: InputsUnion | undefined; instructions?: string | null | undefined; maxOutputTokens?: number | null | undefined; maxToolCalls?: number | null | undefined; /** * Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. */ metadata?: { [k: string]: string; } | null | undefined; /** * Output modalities for the response. Supported values are "text" and "image". */ modalities?: Array | undefined; model?: string | undefined; models?: Array | undefined; parallelToolCalls?: boolean | null | undefined; /** * Plugins you want to enable for this request, including their settings. */ plugins?: Array | undefined; presencePenalty?: number | null | undefined; previousResponseId?: string | null | undefined; prompt?: StoredPromptTemplate | null | undefined; promptCacheKey?: string | null | undefined; /** * When multiple model providers are available, optionally indicate your routing preference. */ provider?: ProviderPreferences | null | undefined; /** * Configuration for reasoning mode in the response */ reasoning?: ReasoningConfig | null | undefined; safetyIdentifier?: string | null | undefined; serviceTier?: ResponsesRequestServiceTier | null | undefined; /** * A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. */ sessionId?: string | undefined; /** * Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. */ stopServerToolsWhen?: Array | undefined; store?: false | undefined; stream?: boolean | undefined; temperature?: number | null | undefined; /** * Text output configuration including format and verbosity */ text?: TextExtendedConfig | undefined; toolChoice?: OpenAIResponsesToolChoiceUnion | undefined; tools?: Array | undefined; topK?: number | undefined; topLogprobs?: number | null | undefined; topP?: number | null | undefined; /** * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. */ trace?: TraceConfig | undefined; truncation?: OpenAIResponsesTruncation | null | undefined; /** * A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. */ user?: string | undefined; }; /** @internal */ export type ResponsesRequestPlugin$Outbound = AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound; /** @internal */ export declare const ResponsesRequestPlugin$outboundSchema: z.ZodType; export declare function responsesRequestPluginToJSON(responsesRequestPlugin: ResponsesRequestPlugin): string; /** @internal */ export declare const ResponsesRequestServiceTier$outboundSchema: z.ZodType; /** @internal */ export type ResponsesRequestToolFunction$Outbound = { description?: string | null | undefined; name: string; parameters: { [k: string]: any | null; } | null; strict?: boolean | null | undefined; type: "function"; }; /** @internal */ export declare const ResponsesRequestToolFunction$outboundSchema: z.ZodType; export declare function responsesRequestToolFunctionToJSON(responsesRequestToolFunction: ResponsesRequestToolFunction): string; /** @internal */ export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | FileSearchServerTool$Outbound | ComputerUseServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | CustomTool$Outbound | (DatetimeServerTool$Outbound & { type: "openrouter:datetime"; }) | FusionServerToolOpenRouter$Outbound | (ImageGenerationServerToolOpenRouter$Outbound & { type: "openrouter:image_generation"; }) | (ChatSearchModelsServerTool$Outbound & { type: "openrouter:experimental__search_models"; }) | (WebFetchServerTool$Outbound & { type: "openrouter:web_fetch"; }) | WebSearchServerToolOpenRouter$Outbound | ApplyPatchServerToolOpenRouter$Outbound; /** @internal */ export declare const ResponsesRequestToolUnion$outboundSchema: z.ZodType; export declare function responsesRequestToolUnionToJSON(responsesRequestToolUnion: ResponsesRequestToolUnion): string; /** @internal */ export type ResponsesRequest$Outbound = { background?: boolean | null | undefined; cache_control?: AnthropicCacheControlDirective$Outbound | undefined; frequency_penalty?: number | null | undefined; image_config?: { [k: string]: ImageConfig$Outbound; } | undefined; include?: Array | null | undefined; input?: InputsUnion$Outbound | undefined; instructions?: string | null | undefined; max_output_tokens?: number | null | undefined; max_tool_calls?: number | null | undefined; metadata?: { [k: string]: string; } | null | undefined; modalities?: Array | undefined; model?: string | undefined; models?: Array | undefined; parallel_tool_calls?: boolean | null | undefined; plugins?: Array | undefined; presence_penalty?: number | null | undefined; previous_response_id?: string | null | undefined; prompt?: StoredPromptTemplate$Outbound | null | undefined; prompt_cache_key?: string | null | undefined; provider?: ProviderPreferences$Outbound | null | undefined; reasoning?: ReasoningConfig$Outbound | null | undefined; safety_identifier?: string | null | undefined; service_tier: string | null; session_id?: string | undefined; stop_server_tools_when?: Array | undefined; store: false; stream: boolean; temperature?: number | null | undefined; text?: TextExtendedConfig$Outbound | undefined; tool_choice?: OpenAIResponsesToolChoiceUnion$Outbound | undefined; tools?: Array | undefined; top_k?: number | undefined; top_logprobs?: number | null | undefined; top_p?: number | null | undefined; trace?: TraceConfig$Outbound | undefined; truncation?: string | null | undefined; user?: string | undefined; }; /** @internal */ export declare const ResponsesRequest$outboundSchema: z.ZodType; export declare function responsesRequestToJSON(responsesRequest: ResponsesRequest): string; //# sourceMappingURL=responsesrequest.d.ts.map