Introducing the ability to remove specified Providers.

This commit is contained in:
Q.A.zh
2024-12-28 04:17:22 +00:00
parent 0c3d4462ca
commit b09f458aeb
2 changed files with 11 additions and 1 deletions

View File

@@ -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);