mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-12 20:23:45 +08:00
fix custom models setting
This commit is contained in:
@@ -66,8 +66,8 @@ export function collectModelTable(
|
||||
|
||||
// default models
|
||||
models.forEach((m) => {
|
||||
// using <modelName>@<providerId> as fullName
|
||||
modelTable[`${m.name}@${m?.provider?.id}`] = {
|
||||
// using <modelName>@<providerType> as fullName
|
||||
modelTable[`${m.name}@${m?.provider?.providerType}`] = {
|
||||
...m,
|
||||
displayName: m.name, // 'provider' is copied over if it exists
|
||||
};
|
||||
@@ -126,7 +126,7 @@ export function collectModelTable(
|
||||
displayName: displayName || customModelName,
|
||||
available,
|
||||
provider, // Use optional chaining
|
||||
sorted: CustomSeq.next(`${customModelName}@${provider?.id}`),
|
||||
sorted: CustomSeq.next(`${customModelName}@${provider?.providerType}`),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user