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 { PreviewWebSearchUserLocation, PreviewWebSearchUserLocation$Outbound } from "./previewwebsearchuserlocation.js"; import { SearchContextSizeEnum } from "./searchcontextsizeenum.js"; import { WebSearchDomainFilter, WebSearchDomainFilter$Outbound } from "./websearchdomainfilter.js"; import { WebSearchEngineEnum } from "./websearchengineenum.js"; import { WebSearchMode } from "./websearchmode.js"; import { XSearchOptions, XSearchOptions$Outbound } from "./xsearchoptions.js"; export declare const PreviewWebSearchServerToolType: { readonly WebSearchPreview: "web_search_preview"; }; export type PreviewWebSearchServerToolType = ClosedEnum; /** * Web search preview tool configuration */ export type PreviewWebSearchServerTool = { /** * 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. "perplexity" uses the Perplexity Search API (raw ranked results). */ engine?: WebSearchEngineEnum | undefined; filters?: WebSearchDomainFilter | null | undefined; /** * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. */ maxResults?: number | undefined; /** * Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. */ maxUses?: number | undefined; /** * Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. */ mode?: WebSearchMode | undefined; /** * Size of the search context for web search tools */ searchContextSize?: SearchContextSizeEnum | undefined; type: PreviewWebSearchServerToolType; userLocation?: PreviewWebSearchUserLocation | null | undefined; /** * Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. */ xSearch?: XSearchOptions | undefined; }; /** @internal */ export declare const PreviewWebSearchServerToolType$inboundSchema: z.ZodEnum; /** @internal */ export declare const PreviewWebSearchServerToolType$outboundSchema: z.ZodEnum; /** @internal */ export declare const PreviewWebSearchServerTool$inboundSchema: z.ZodType; /** @internal */ export type PreviewWebSearchServerTool$Outbound = { engine?: string | undefined; filters?: WebSearchDomainFilter$Outbound | null | undefined; max_results?: number | undefined; max_uses?: number | undefined; mode?: string | undefined; search_context_size?: string | undefined; type: string; user_location?: PreviewWebSearchUserLocation$Outbound | null | undefined; x_search?: XSearchOptions$Outbound | undefined; }; /** @internal */ export declare const PreviewWebSearchServerTool$outboundSchema: z.ZodType; export declare function previewWebSearchServerToolToJSON(previewWebSearchServerTool: PreviewWebSearchServerTool): string; export declare function previewWebSearchServerToolFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=previewwebsearchservertool.d.ts.map