From 4840864ed88f6266eb9f3aae93a28a89ca2571fb Mon Sep 17 00:00:00 2001 From: YanzheL Date: Mon, 2 Feb 2026 03:36:42 +0800 Subject: [PATCH] feat(config): add websearch provider schema --- assets/oh-my-opencode.schema.json | 12 ++++++++++++ src/config/schema.ts | 14 ++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/assets/oh-my-opencode.schema.json b/assets/oh-my-opencode.schema.json index 787c8d3a1..c562bdad8 100644 --- a/assets/oh-my-opencode.schema.json +++ b/assets/oh-my-opencode.schema.json @@ -2977,6 +2977,18 @@ } } }, + "websearch": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "exa", + "tavily" + ] + } + } + }, "tmux": { "type": "object", "properties": { diff --git a/src/config/schema.ts b/src/config/schema.ts index 19b4ad89a..d0aca6278 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -340,6 +340,17 @@ export const BrowserAutomationConfigSchema = z.object({ provider: BrowserAutomationProviderSchema.default("playwright"), }) +export const WebsearchProviderSchema = z.enum(["exa", "tavily"]) + +export const WebsearchConfigSchema = z.object({ + /** + * Websearch provider to use. + * - "exa": Uses Exa websearch (default, works without API key) + * - "tavily": Uses Tavily websearch (requires TAVILY_API_KEY) + */ + provider: WebsearchProviderSchema.optional(), +}) + export const TmuxLayoutSchema = z.enum([ 'main-horizontal', // main pane top, agent panes bottom stack 'main-vertical', // main pane left, agent panes right stack (default) @@ -393,6 +404,7 @@ export const OhMyOpenCodeConfigSchema = z.object({ babysitting: BabysittingConfigSchema.optional(), git_master: GitMasterConfigSchema.optional(), browser_automation_engine: BrowserAutomationConfigSchema.optional(), + websearch: WebsearchConfigSchema.optional(), tmux: TmuxConfigSchema.optional(), sisyphus: SisyphusConfigSchema.optional(), }) @@ -420,6 +432,8 @@ export type BuiltinCategoryName = z.infer export type GitMasterConfig = z.infer export type BrowserAutomationProvider = z.infer export type BrowserAutomationConfig = z.infer +export type WebsearchProvider = z.infer +export type WebsearchConfig = z.infer export type TmuxConfig = z.infer export type TmuxLayout = z.infer export type SisyphusTasksConfig = z.infer