fix: handle all model versions in normalizeModelName for fallback chains (#1679)

This commit is contained in:
YeonGyu-Kim
2026-02-17 01:27:10 +09:00
parent fcf26d9898
commit dab99531e4
3 changed files with 23 additions and 5 deletions
+1 -2
View File
@@ -28,8 +28,7 @@ import { normalizeSDKResponse } from "./normalize-sdk-response"
function normalizeModelName(name: string): string {
return name
.toLowerCase()
.replace(/claude-(opus|sonnet|haiku)-4-5/g, "claude-$1-4.5")
.replace(/claude-(opus|sonnet|haiku)-4\.5/g, "claude-$1-4.5")
.replace(/claude-(opus|sonnet|haiku)-(\d+)[.-](\d+)/g, "claude-$1-$2.$3")
}
export function fuzzyMatchModel(