import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js"; import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js"; import { ChatDebugOptions, ChatDebugOptions$Outbound } from "./chatdebugoptions.js"; import { ChatFormatGrammarConfig, ChatFormatGrammarConfig$Outbound } from "./chatformatgrammarconfig.js"; import { ChatFormatJsonSchemaConfig, ChatFormatJsonSchemaConfig$Outbound } from "./chatformatjsonschemaconfig.js"; import { ChatFormatPythonConfig, ChatFormatPythonConfig$Outbound } from "./chatformatpythonconfig.js"; import { ChatFormatTextConfig, ChatFormatTextConfig$Outbound } from "./chatformattextconfig.js"; import { ChatFunctionTool, ChatFunctionTool$Outbound } from "./chatfunctiontool.js"; import { ChatMessages, ChatMessages$Outbound } from "./chatmessages.js"; import { ChatReasoningSummaryVerbosityEnum } from "./chatreasoningsummaryverbosityenum.js"; import { ChatStreamOptions, ChatStreamOptions$Outbound } from "./chatstreamoptions.js"; import { ChatToolChoice, ChatToolChoice$Outbound } from "./chattoolchoice.js"; import { ContextCompressionPlugin, ContextCompressionPlugin$Outbound } from "./contextcompressionplugin.js"; import { FileParserPlugin, FileParserPlugin$Outbound } from "./fileparserplugin.js"; import { FormatJsonObjectConfig, FormatJsonObjectConfig$Outbound } from "./formatjsonobjectconfig.js"; import { FusionPlugin, FusionPlugin$Outbound } from "./fusionplugin.js"; import { ImageConfig, ImageConfig$Outbound } from "./imageconfig.js"; import { ModerationPlugin, ModerationPlugin$Outbound } from "./moderationplugin.js"; import { ParetoRouterPlugin, ParetoRouterPlugin$Outbound } from "./paretorouterplugin.js"; import { ProviderPreferences, ProviderPreferences$Outbound } from "./providerpreferences.js"; import { ResponseHealingPlugin, ResponseHealingPlugin$Outbound } from "./responsehealingplugin.js"; import { StopServerToolsWhenCondition, StopServerToolsWhenCondition$Outbound } from "./stopservertoolswhencondition.js"; import { TraceConfig, TraceConfig$Outbound } from "./traceconfig.js"; import { WebFetchPlugin, WebFetchPlugin$Outbound } from "./webfetchplugin.js"; import { WebSearchPlugin, WebSearchPlugin$Outbound } from "./websearchplugin.js"; export declare const Modality: { readonly Text: "text"; readonly Image: "image"; readonly Audio: "audio"; }; export type Modality = OpenEnum; export type ChatRequestPlugin = AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin; /** * Constrains effort on reasoning for reasoning models */ export declare const ChatRequestEffort: { readonly Xhigh: "xhigh"; readonly High: "high"; readonly Medium: "medium"; readonly Low: "low"; readonly Minimal: "minimal"; readonly None: "none"; }; /** * Constrains effort on reasoning for reasoning models */ export type ChatRequestEffort = OpenEnum; /** * Configuration options for reasoning models */ export type ChatRequestReasoning = { /** * Constrains effort on reasoning for reasoning models */ effort?: ChatRequestEffort | null | undefined; summary?: ChatReasoningSummaryVerbosityEnum | null | undefined; }; /** * Response format configuration */ export type ResponseFormat = ChatFormatGrammarConfig | FormatJsonObjectConfig | ChatFormatJsonSchemaConfig | ChatFormatPythonConfig | ChatFormatTextConfig; /** * The service tier to use for processing this request. */ export declare const ChatRequestServiceTier: { readonly Auto: "auto"; readonly Default: "default"; readonly Flex: "flex"; readonly Priority: "priority"; readonly Scale: "scale"; }; /** * The service tier to use for processing this request. */ export type ChatRequestServiceTier = OpenEnum; /** * Stop sequences (up to 4) */ export type Stop = string | Array | any; /** * Chat completion request parameters */ export type ChatRequest = { /** * 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; /** * Debug options for inspecting request transformations (streaming only) */ debug?: ChatDebugOptions | undefined; /** * Frequency penalty (-2.0 to 2.0) */ 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; /** * Token logit bias adjustments */ logitBias?: { [k: string]: number; } | null | undefined; /** * Return log probabilities */ logprobs?: boolean | null | undefined; /** * Maximum tokens in completion */ maxCompletionTokens?: number | null | undefined; /** * Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. */ maxTokens?: number | null | undefined; /** * List of messages for the conversation */ messages: Array; /** * Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) */ metadata?: { [k: string]: string; } | undefined; /** * Output modalities for the response. Supported values are "text", "image", and "audio". */ modalities?: Array | undefined; /** * Model to use for completion */ model?: string | undefined; /** * Models to use for completion */ models?: Array | undefined; /** * Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response. */ parallelToolCalls?: boolean | null | undefined; /** * Plugins you want to enable for this request, including their settings. */ plugins?: Array | undefined; /** * Presence penalty (-2.0 to 2.0) */ presencePenalty?: number | null | undefined; /** * When multiple model providers are available, optionally indicate your routing preference. */ provider?: ProviderPreferences | null | undefined; /** * Configuration options for reasoning models */ reasoning?: ChatRequestReasoning | undefined; /** * Response format configuration */ responseFormat?: ChatFormatGrammarConfig | FormatJsonObjectConfig | ChatFormatJsonSchemaConfig | ChatFormatPythonConfig | ChatFormatTextConfig | undefined; /** * Random seed for deterministic outputs */ seed?: number | null | undefined; /** * The service tier to use for processing this request. */ serviceTier?: ChatRequestServiceTier | 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 sequences (up to 4) */ stop?: string | Array | any | null | 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; /** * Enable streaming response */ stream?: boolean | undefined; /** * Streaming configuration options */ streamOptions?: ChatStreamOptions | null | undefined; /** * Sampling temperature (0-2) */ temperature?: number | null | undefined; /** * Tool choice configuration */ toolChoice?: ChatToolChoice | undefined; /** * Available tools for function calling */ tools?: Array | undefined; /** * Number of top log probabilities to return (0-20) */ topLogprobs?: number | null | undefined; /** * Nucleus sampling parameter (0-1) */ 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; /** * Unique user identifier */ user?: string | undefined; }; /** @internal */ export declare const Modality$outboundSchema: z.ZodType; /** @internal */ export type ChatRequestPlugin$Outbound = AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound; /** @internal */ export declare const ChatRequestPlugin$outboundSchema: z.ZodType; export declare function chatRequestPluginToJSON(chatRequestPlugin: ChatRequestPlugin): string; /** @internal */ export declare const ChatRequestEffort$outboundSchema: z.ZodType; /** @internal */ export type ChatRequestReasoning$Outbound = { effort?: string | null | undefined; summary?: string | null | undefined; }; /** @internal */ export declare const ChatRequestReasoning$outboundSchema: z.ZodType; export declare function chatRequestReasoningToJSON(chatRequestReasoning: ChatRequestReasoning): string; /** @internal */ export type ResponseFormat$Outbound = ChatFormatGrammarConfig$Outbound | FormatJsonObjectConfig$Outbound | ChatFormatJsonSchemaConfig$Outbound | ChatFormatPythonConfig$Outbound | ChatFormatTextConfig$Outbound; /** @internal */ export declare const ResponseFormat$outboundSchema: z.ZodType; export declare function responseFormatToJSON(responseFormat: ResponseFormat): string; /** @internal */ export declare const ChatRequestServiceTier$outboundSchema: z.ZodType; /** @internal */ export type Stop$Outbound = string | Array | any; /** @internal */ export declare const Stop$outboundSchema: z.ZodType; export declare function stopToJSON(stop: Stop): string; /** @internal */ export type ChatRequest$Outbound = { cache_control?: AnthropicCacheControlDirective$Outbound | undefined; debug?: ChatDebugOptions$Outbound | undefined; frequency_penalty?: number | null | undefined; image_config?: { [k: string]: ImageConfig$Outbound; } | undefined; logit_bias?: { [k: string]: number; } | null | undefined; logprobs?: boolean | null | undefined; max_completion_tokens?: number | null | undefined; max_tokens?: number | null | undefined; messages: Array; metadata?: { [k: string]: string; } | undefined; modalities?: Array | undefined; model?: string | undefined; models?: Array | undefined; parallel_tool_calls?: boolean | null | undefined; plugins?: Array | undefined; presence_penalty?: number | null | undefined; provider?: ProviderPreferences$Outbound | null | undefined; reasoning?: ChatRequestReasoning$Outbound | undefined; response_format?: ChatFormatGrammarConfig$Outbound | FormatJsonObjectConfig$Outbound | ChatFormatJsonSchemaConfig$Outbound | ChatFormatPythonConfig$Outbound | ChatFormatTextConfig$Outbound | undefined; seed?: number | null | undefined; service_tier?: string | null | undefined; session_id?: string | undefined; stop?: string | Array | any | null | undefined; stop_server_tools_when?: Array | undefined; stream: boolean; stream_options?: ChatStreamOptions$Outbound | null | undefined; temperature?: number | null | undefined; tool_choice?: ChatToolChoice$Outbound | undefined; tools?: Array | undefined; top_logprobs?: number | null | undefined; top_p?: number | null | undefined; trace?: TraceConfig$Outbound | undefined; user?: string | undefined; }; /** @internal */ export declare const ChatRequest$outboundSchema: z.ZodType; export declare function chatRequestToJSON(chatRequest: ChatRequest): string; //# sourceMappingURL=chatrequest.d.ts.map