feat: extract shared auth utility and fix custom provider model resolution

This commit is contained in:
nyatoru
2026-02-24 22:08:20 +07:00
parent a0af564b5a
commit 2a90a05132

View File

@@ -1511,7 +1511,7 @@ function CompatibleModelsSection({
});
if (!customModelRes.ok) {
let errorData = {};
let errorData: { error?: { message?: string } } = {};
try {
errorData = await customModelRes.json();
} catch (jsonError) {
@@ -1519,7 +1519,6 @@ function CompatibleModelsSection({
}
throw new Error(errorData.error?.message || "Failed to save custom model");
}
}
// Only create alias after customModel is saved successfully
await onSetAlias(modelId, resolvedAlias, providerStorageAlias);