From 98c717cb5b4be9589a61a23727f0c97af4b01fd8 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Tue, 18 Aug 2026 11:14:36 -0500 Subject: [PATCH] fix(core): migrate standalone small model (#43260) --- packages/core/src/config/normalize.ts | 2 +- packages/core/test/config/normalization.test.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/core/src/config/normalize.ts b/packages/core/src/config/normalize.ts index 3e0848042c5..caec9d4df38 100644 --- a/packages/core/src/config/normalize.ts +++ b/packages/core/src/config/normalize.ts @@ -149,7 +149,7 @@ export function normalize(input: unknown): Result { "agents", migratedAgents, nativeAgents, - isRecord(input.agent) || isRecord(input.mode) || isRecord(input.agents), + migratedSmallModel !== undefined || isRecord(input.agent) || isRecord(input.mode) || isRecord(input.agents), diagnostics, ) diff --git a/packages/core/test/config/normalization.test.ts b/packages/core/test/config/normalization.test.ts index cf94ae86e35..e1ce6c8201d 100644 --- a/packages/core/test/config/normalization.test.ts +++ b/packages/core/test/config/normalization.test.ts @@ -150,6 +150,16 @@ describe("ConfigNormalize", () => { }) test("migrates the legacy small model to the title agent", () => { + const result = normalized({ small_model: "anthropic/claude-haiku-4-5" }) + expect(result.encoded.agents).toEqual({ + title: { + model: { providerID: "anthropic", model: "claude-haiku-4-5" }, + }, + }) + expect(result.diagnostics).toEqual([]) + }) + + test("merges the legacy small model with the title agent", () => { const result = normalized({ small_model: "anthropic/claude-haiku-4-5", agent: { title: { prompt: "Custom title prompt" } },