mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-11 11:43:42 +08:00
Introducing the ability to remove specified Providers.
This commit is contained in:
@@ -88,6 +88,13 @@ export function collectModelTable(
|
||||
Object.values(modelTable).forEach(
|
||||
(model) => (model.available = available),
|
||||
);
|
||||
} else if (name.startsWith("*")) {
|
||||
const modelId = name.substring(1).toLowerCase();
|
||||
Object.values(modelTable).forEach((model) => {
|
||||
if (model?.provider?.id === modelId) {
|
||||
model.available = available;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 1. find model by name, and set available value
|
||||
const [customModelName, customProviderName] = getModelProvider(name);
|
||||
|
||||
Reference in New Issue
Block a user