import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { SearchQualityLevel } from "./searchqualitylevel.js"; import { WebSearchConfig, WebSearchConfig$Outbound } from "./websearchconfig.js"; import { WebSearchEngineEnum } from "./websearchengineenum.js"; import { WebSearchUserLocationServerTool, WebSearchUserLocationServerTool$Outbound } from "./websearchuserlocationservertool.js"; export declare const ChatWebSearchShorthandType: { readonly WebSearch: "web_search"; readonly WebSearchPreview: "web_search_preview"; readonly WebSearchPreview20250311: "web_search_preview_2025_03_11"; readonly WebSearch20250826: "web_search_2025_08_26"; }; export type ChatWebSearchShorthandType = OpenEnum; /** * Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. */ export type ChatWebSearchShorthand = { /** * Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains. */ allowedDomains?: Array | undefined; /** * 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. */ engine?: WebSearchEngineEnum | undefined; /** * Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains. */ excludedDomains?: Array | undefined; /** * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search. */ maxResults?: number | undefined; /** * Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. */ maxTotalResults?: number | undefined; parameters?: WebSearchConfig | undefined; /** * How much context to retrieve per result. Applies to Exa and Parallel 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. */ searchContextSize?: SearchQualityLevel | undefined; type: ChatWebSearchShorthandType; /** * Approximate user location for location-biased results. */ userLocation?: WebSearchUserLocationServerTool | undefined; }; /** @internal */ export declare const ChatWebSearchShorthandType$outboundSchema: z.ZodType; /** @internal */ export type ChatWebSearchShorthand$Outbound = { allowed_domains?: Array | undefined; engine?: string | undefined; excluded_domains?: Array | undefined; max_results?: number | undefined; max_total_results?: number | undefined; parameters?: WebSearchConfig$Outbound | undefined; search_context_size?: string | undefined; type: string; user_location?: WebSearchUserLocationServerTool$Outbound | undefined; }; /** @internal */ export declare const ChatWebSearchShorthand$outboundSchema: z.ZodType; export declare function chatWebSearchShorthandToJSON(chatWebSearchShorthand: ChatWebSearchShorthand): string; //# sourceMappingURL=chatwebsearchshorthand.d.ts.map