mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-12 18:22:48 +03:00
* feat(routing): per-model web-search interception rule (#3384) Adds a per-provider/per-model interceptSearch rule (src/lib/db/interceptionRules.ts, key_value namespace interception_rules) that overrides the existing native web-search bypass defaults (Codex/Gemini/Claude->Claude passthrough) in webSearchFallback.ts. Wired at the existing prepareWebSearchFallbackBody() call site in chatCore.ts. Resolution precedence: per-model rule > provider-level rule > existing native-bypass defaults. This lands Phase 1-2 of the plan (rule store + search interception). Web-fetch interception and the dashboard UI toggle are tracked as follow-up phases. * fix(db): register interceptionRules in localDb re-export layer (db-rules gate) * fix(db): renumber interception_rules migration 119→120 (collision with model_capability_overrides)
17 lines
697 B
SQL
17 lines
697 B
SQL
-- 120_interception_rules.sql
|
|
-- Documents the interception_rules namespace in the key_value table (#3384).
|
|
-- No schema change — the key_value table already exists.
|
|
-- Key = provider ID, value = JSON with shape:
|
|
-- {
|
|
-- interceptSearch?: boolean,
|
|
-- interceptFetch?: boolean,
|
|
-- fetchBackend?: "firecrawl"|"jina"|"tavily",
|
|
-- fetchProxyUrl?: string,
|
|
-- models?: { [modelId]: { interceptSearch?, interceptFetch?, fetchBackend?, fetchProxyUrl? } }
|
|
-- }
|
|
--
|
|
-- Resolution precedence: per-model rule > provider-level rule > undefined (caller
|
|
-- falls back to the existing native web-search-bypass defaults in webSearchFallback.ts).
|
|
--
|
|
-- See: src/lib/db/interceptionRules.ts
|