feat(websearch): add parallel provider rollout (#26227)

This commit is contained in:
Shoubhit Dash
2026-05-08 14:19:36 +05:30
committed by GitHub
parent ae25278eda
commit a43d3e0e1e
13 changed files with 276 additions and 44 deletions
+8 -1
View File
@@ -49,6 +49,13 @@ import { Permission } from "@/permission"
const log = Log.create({ service: "tool.registry" })
export function webSearchEnabled(
providerID: ProviderID,
flags = { exa: Flag.OPENCODE_ENABLE_EXA, parallel: Flag.OPENCODE_ENABLE_PARALLEL },
) {
return providerID === ProviderID.opencode || flags.exa || flags.parallel
}
type TaskDef = Tool.InferDef<typeof TaskTool>
type ReadDef = Tool.InferDef<typeof ReadTool>
@@ -284,7 +291,7 @@ export const layer: Layer.Layer<
const tools: Interface["tools"] = Effect.fn("ToolRegistry.tools")(function* (input) {
const filtered = (yield* all()).filter((tool) => {
if (tool.id === WebSearchTool.id) {
return input.providerID === ProviderID.opencode || Flag.OPENCODE_ENABLE_EXA
return webSearchEnabled(input.providerID)
}
const usePatch =