From fe61745e24054a64799a2b27d440fa0f2309216d Mon Sep 17 00:00:00 2001 From: khanon Date: Fri, 25 Oct 2024 17:49:24 +0000 Subject: [PATCH] fixes issue with AWS model assignment when requesting legacy claude (claude-2.1, etc) --- src/proxy/aws-claude.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/proxy/aws-claude.ts b/src/proxy/aws-claude.ts index 85de7dc..ab25eb5 100644 --- a/src/proxy/aws-claude.ts +++ b/src/proxy/aws-claude.ts @@ -195,7 +195,7 @@ function maybeReassignModel(req: Request) { } const ver = minor ? `${major}.${minor}` : major; - const name = rawName.match(/([a-z]+)/)?.[1]; + const name = rawName?.match(/([a-z]+)/)?.[1] || ""; switch (ver) { case "1": @@ -222,7 +222,6 @@ function maybeReassignModel(req: Request) { return; } break; - case "3-5": case "3.5": switch (name) { case "sonnet":