fix(core): disable default GPT and Claude search filtering (#47586)

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-09-06 01:22:48 -05:00 committed by GitHub
parent bfcb388dd7
commit cf1923c238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 15 deletions

View file

@ -45,14 +45,7 @@ export const MetaPlugin = make("opencode.prompt.meta", (model) => {
return PROMPT_META.replaceAll("{{MODEL_NAME}}", model.name)
})
export const Plugins = [
OpenAIToolsPlugin,
AnthropicToolsPlugin,
OpenAIPlugin,
KimiPlugin,
ArceePlugin,
MetaPlugin,
] as const
export const Plugins = [OpenAIPlugin, KimiPlugin, ArceePlugin, MetaPlugin] as const
function make(
id: string,

View file

@ -56,10 +56,8 @@ describe("OptimizePlugin", () => {
)
})
test("preserves prompt plugin IDs and exposes separate lab tool optimizations", () => {
test("enables prompt plugins without model-specific tool optimization", () => {
expect(OptimizePlugin.Plugins.map((plugin) => plugin.id)).toEqual([
"opencode.optimize.openai.tools",
"opencode.optimize.anthropic.tools",
"opencode.prompt.openai",
"opencode.prompt.kimi",
"opencode.prompt.arcee",
@ -243,7 +241,7 @@ describe("OptimizePlugin", () => {
}),
)
it.effect("curates tools while preserving an explicit agent system prompt", () =>
it.effect("preserves tools and an explicit agent system prompt by default", () =>
Effect.gen(function* () {
const agents = yield* Agent.Service
const hooks = yield* PluginHooks.Service
@ -261,7 +259,7 @@ describe("OptimizePlugin", () => {
yield* hooks.trigger("session", "context", event)
expect(event.system.map((part) => part.text)).toEqual(["Custom agent prompt"])
expect(Object.keys(event.tools).sort()).toEqual(["edit", "patch", "read", "shell", "write"])
expect(Object.keys(event.tools).sort()).toEqual(["edit", "glob", "grep", "patch", "read", "shell", "write"])
}),
)
@ -298,7 +296,7 @@ describe("OptimizePlugin", () => {
}),
)
it.effect("filters tools by model metadata while preserving catalog-ID prompt selection", () =>
it.effect("preserves tools for model aliases and catalog-ID prompt selection by default", () =>
Effect.gen(function* () {
const catalog = yield* Catalog.Service
const hooks = yield* PluginHooks.Service
@ -329,7 +327,7 @@ describe("OptimizePlugin", () => {
const event = context(id)
yield* hooks.trigger("session", "context", event)
expect(event.system[0]?.text).toContain(prompt)
expect(Object.keys(event.tools).sort()).toEqual(["edit", "patch", "read", "shell", "write"])
expect(Object.keys(event.tools).sort()).toEqual(["edit", "glob", "grep", "patch", "read", "shell", "write"])
}),
{ discard: true },
)