mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-04-12 19:00:28 +08:00
Merge pull request #6134 from zcong1993/main
fix: fix isModelNotavailableInServer logic for bytedance models
This commit is contained in:
commit
5db6775cb8
@ -1,4 +1,4 @@
|
||||
import { DEFAULT_MODELS } from "../constant";
|
||||
import { DEFAULT_MODELS, ServiceProvider } from "../constant";
|
||||
import { LLMModel } from "../client/api";
|
||||
|
||||
const CustomSeq = {
|
||||
@ -246,6 +246,11 @@ export function isModelNotavailableInServer(
|
||||
? providerNames
|
||||
: [providerNames];
|
||||
for (const providerName of providerNamesArray) {
|
||||
// if model provider is bytedance, use model config name to check if not avaliable
|
||||
if (providerName === ServiceProvider.ByteDance) {
|
||||
return !Object.values(modelTable).filter((v) => v.name === modelName)?.[0]
|
||||
?.available;
|
||||
}
|
||||
const fullName = `${modelName}@${providerName.toLowerCase()}`;
|
||||
if (modelTable?.[fullName]?.available === true) return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user