fixes incorrect model assignment when requesting Haiku from AWS

This commit is contained in:
nai-degen 2024-03-21 23:21:27 -05:00
parent 32fea30c91
commit 8cb960e174
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,7 @@ function maybeReassignModel(req: Request) {
}
const pattern =
/^(claude-)?(instant-)?(v)?(\d+)(\.(\d+))?(-\d+k)?(-sonnet-?|-opus-?)(\d*)/i;
/^(claude-)?(instant-)?(v)?(\d+)(\.(\d+))?(-\d+k)?(-sonnet-?|-opus-?|-haiku-?)(\d*)/i;
const match = model.match(pattern);
// If there's no match, return the latest v2 model

View File

@ -212,7 +212,7 @@ export function buildInfo(baseUrl: string, forAdmin = false): ServiceInfo {
}
function getStatus() {
if (!config.checkKeys) return "Key checking is disabled.";
if (!config.checkKeys) return "Key checking is disabled. The data displayed are not reliable.";
let unchecked = 0;
for (const service of LLM_SERVICES) {