We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63bfe76 commit 9c237f0Copy full SHA for 9c237f0
packages/opencode/src/tool/registry.ts
@@ -108,13 +108,18 @@ export namespace ToolRegistry {
108
return all().then((x) => x.map((t) => t.id))
109
}
110
111
- export async function tools(_providerID: string, _modelID: string) {
+ export async function tools(providerID: string, _modelID: string) {
112
const tools = await all()
113
const result = await Promise.all(
114
- tools.map(async (t) => ({
115
- id: t.id,
116
- ...(await t.init()),
117
- })),
+ tools
+ .filter((t) => {
+ if (t.id === "codesearch" || t.id === "websearch") return providerID === "opencode"
+ return true
118
+ })
119
+ .map(async (t) => ({
120
+ id: t.id,
121
+ ...(await t.init()),
122
+ })),
123
)
124
return result
125
0 commit comments