Compatibility changes

This commit is contained in:
Mr. Z 2024-07-22 16:41:11 +08:00 committed by GitHub
parent 2fd68bcac3
commit aa4e855012
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -98,9 +98,11 @@ export function collectModelTableWithDefaultModel(
defaultModel: string,
) {
let modelTable = collectModelTable(models, customModels);
if (defaultModel && defaultModel !== "" && defaultModel in modelTable) {
if (defaultModel && defaultModel !== "") {
modelTable[defaultModel] = {
...modelTable[defaultModel],
name: modelTable[defaultModel]?.name ?? defaultModel,
displayName: modelTable[defaultModel]?.displayName ?? defaultModel,
available: true,
isDefault: true,
};