mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 04:00:16 +09:00
fix: fix isModelNotavailableInServer logic for bytedance models
This commit is contained in:
parent
1e20b64048
commit
92f57fb18f
@ -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…
Reference in New Issue
Block a user