From 15a61ba8b84e5e6d188736f0c0d43ad6a4383bb4 Mon Sep 17 00:00:00 2001 From: chezsmithy Date: Fri, 4 Jul 2025 21:24:39 -0700 Subject: [PATCH] feat: :sparkles: Enable amazon nova pro models --- core/edit/streamDiffLines.ts | 6 +++++- core/llm/autodetect.ts | 5 +++++ core/llm/toolSupport.ts | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/edit/streamDiffLines.ts b/core/edit/streamDiffLines.ts index 7cf1af2f7..c2cd32b0e 100644 --- a/core/edit/streamDiffLines.ts +++ b/core/edit/streamDiffLines.ts @@ -55,7 +55,11 @@ export async function* addIndentation( } function modelIsInept(model: string): boolean { - return !(model.includes("gpt") || model.includes("claude")); + return !( + model.includes("gpt") || + model.includes("claude") || + model.includes("nova") + ); } export async function* streamDiffLines({ diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index a13ffe8dc..9a3d37af9 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -237,6 +237,11 @@ function autodetectTemplateType(model: string): TemplateType | undefined { return "none"; } + // Nova Pro requests always sent through Converse API, so formatting not necessary + if (lower.includes("nova")) { + return "none"; + } + if (lower.includes("codestral")) { return "none"; } diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index b578569cb..9c3db3e74 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -96,6 +96,10 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> = "claude-3.7-sonnet", "claude-sonnet-4", "claude-opus-4", + "nova-lite", + "nova-pro", + "nova-micro", + "nova-premier", ].some((part) => model.toLowerCase().includes(part)) ) { return true;