From 622094ed9d389bb3f8db2d33e363e51e007453bf Mon Sep 17 00:00:00 2001 From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com> Date: Mon, 27 Apr 2026 16:28:19 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20tests:=20lock=20alias-based=20Op?= =?UTF-8?q?enAI=20reasoning=20summary=20gating?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/utils/ai/providerOptions.test.ts | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/common/utils/ai/providerOptions.test.ts b/src/common/utils/ai/providerOptions.test.ts index 09009c5a2f..ae05a40458 100644 --- a/src/common/utils/ai/providerOptions.test.ts +++ b/src/common/utils/ai/providerOptions.test.ts @@ -364,6 +364,29 @@ describe("buildProviderOptions - mappedToModel resolution", () => { expect(anthropic.effort).toBe("high"); }); + test("resolves custom alias to gpt-5.3-codex-spark for reasoning summary gating", () => { + const providersConfig = createMockProvidersConfig({ + "openai:custom-spark": "openai:gpt-5.3-codex-spark", + }); + + const result = buildProviderOptions( + "openai:custom-spark", + "medium", + undefined, + undefined, + undefined, + undefined, + undefined, + providersConfig + ) as Record; + const openai = result.openai as Record | undefined; + + expect(openai).toBeDefined(); + expect(openai?.reasoningEffort).toBe("medium"); + expect(openai?.reasoningSummary).toBeUndefined(); + expect(openai?.include).toEqual(["reasoning.encrypted_content"]); + }); + test("works without providersConfig (backward compat)", () => { const result = buildProviderOptions("anthropic:claude-sonnet-4-5-20250514", "medium");