This commit is contained in:
lloydzhou
2024-07-04 16:03:35 +08:00
parent 7a5596b909
commit aa08183439
4 changed files with 31 additions and 7 deletions

View File

@@ -118,7 +118,12 @@ export function collectModelsWithDefaultModel(
return allModels;
}
export function isModelAvailableInServer(customModels, modelName) {
export function isModelAvailableInServer(
customModels,
modelName,
providerName,
) {
const fullName = `${modelName}@${providerName}`;
const modelTable = collectModelTable(DEFAULT_MODELS, customModels);
return modelTable[modelName ?? ""].available === false;
return modelTable[fullName]?.available === false;
}