Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
TypeScript
1234567891011121314151617181920212223242526272829303132333435363738394041import { z } from "zod/v4"
// Args validation schemaexport const webSearchPreviewArgsSchema = z.object({ /** * Search context size to use for the web search. * - high: Most comprehensive context, highest cost, slower response * - medium: Balanced context, cost, and latency (default) * - low: Least context, lowest cost, fastest response */ searchContextSize: z.enum(["low", "medium", "high"]).optional(),
/** * User location information to provide geographically relevant search results. */ userLocation: z .object({ /** * Type of location (always 'approximate') */ type: z.literal("approximate"), /** * Two-letter ISO country code (e.g., 'US', 'GB') */ country: z.string().optional(), /** * City name (free text, e.g., 'Minneapolis') */ city: z.string().optional(), /** * Region name (free text, e.g., 'Minnesota') */ region: z.string().optional(), /** * IANA timezone (e.g., 'America/Chicago') */ timezone: z.string().optional(), }) .optional(),})