diff --git a/src/hooks/anthropic-effort/hook.ts b/src/hooks/anthropic-effort/hook.ts index 31b18c7e6..6d4cc965c 100644 --- a/src/hooks/anthropic-effort/hook.ts +++ b/src/hooks/anthropic-effort/hook.ts @@ -65,6 +65,7 @@ export function createAnthropicEffortHook() { if (isEffortUnsupportedModel(model.modelID)) return if (message.variant !== "max") return if (!isClaudeProvider(model.providerID, model.modelID)) return + if (model.providerID === "github-copilot") return if (shouldSkipForInternalAgent(agent?.name)) return if (output.options.effort !== undefined) return diff --git a/src/hooks/anthropic-effort/index.test.ts b/src/hooks/anthropic-effort/index.test.ts index 5ca923cd2..cea012eb9 100644 --- a/src/hooks/anthropic-effort/index.test.ts +++ b/src/hooks/anthropic-effort/index.test.ts @@ -148,6 +148,22 @@ describe("createAnthropicEffortHook", () => { expect(output.options.effort).toBeUndefined() }) + it("#given github-copilot + claude model #then effort NOT injected", async () => { + // given + const hook = createAnthropicEffortHook() + const { input, output } = createMockParams({ + providerID: "github-copilot", + modelID: "claude-opus-4-6", + }) + + // when + await hook["chat.params"](input, output) + + // then + expect(output.options.effort).toBeUndefined() + expect(input.message.variant).toBe("max") + }) + describe("#given haiku models (effort unsupported)", () => { const haikuModels = [ "claude-haiku-4-5",