fixes incorrect 3.5 sonnet v2 model id in gcp model reassignment
This commit is contained in:
parent
5072638ec2
commit
3496a2a9bd
|
@ -151,7 +151,7 @@ function maybeReassignModel(req: Request) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const [_, _cl, instant, _v, major, _sep, minor, _ctx, name, _rev] = match;
|
const [_, _cl, instant, _v, major, _sep, minor, _ctx, name, rev] = match;
|
||||||
|
|
||||||
// TODO: rework this to function similarly to aws-claude.ts maybeReassignModel
|
// TODO: rework this to function similarly to aws-claude.ts maybeReassignModel
|
||||||
const ver = minor ? `${major}.${minor}` : major;
|
const ver = minor ? `${major}.${minor}` : major;
|
||||||
|
@ -167,12 +167,25 @@ function maybeReassignModel(req: Request) {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case "3.5":
|
case "3.5":
|
||||||
if (name.includes("sonnet")) {
|
switch (name) {
|
||||||
req.body.model = "claude-3-5-sonnet@20241022";
|
case "sonnet":
|
||||||
} else if (name.includes("haiku")) {
|
switch (rev) {
|
||||||
req.body.model = "claude-3-5-haiku@20241022";
|
case "20241022":
|
||||||
}
|
case "latest":
|
||||||
|
req.body.model = "claude-3-5-sonnet-v2@20241022";
|
||||||
return;
|
return;
|
||||||
|
case "20240620":
|
||||||
|
req.body.model = "claude-3-5-sonnet@20240620";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "haiku":
|
||||||
|
req.body.model = "claude-3-5-haiku@20241022";
|
||||||
|
return;
|
||||||
|
case "opus":
|
||||||
|
// Add after model ids are announced late 2024
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback to Claude3 Sonnet
|
// Fallback to Claude3 Sonnet
|
||||||
|
|
Loading…
Reference in New Issue