fix(provider): split partial model fetch warnings from errors

This commit is contained in:
zhefox
2026-05-26 17:45:06 +08:00
parent aa409a8a9c
commit 1173a4d9d5
14 changed files with 171 additions and 48 deletions
@@ -691,8 +691,8 @@ async function fetchUpstreamModels(forceRefresh = false) {
// 获取上游模型后,从自定义模型列表中移除已变成已知的模型
const upstreamIds = new Set(result.models.map((m: UpstreamModel) => m.id))
allCustomModels.value = allCustomModels.value.filter(m => !upstreamIds.has(m))
if (result.error) {
showWarning(result.error, '部分格式获取失败')
if (result.warning) {
showWarning(result.warning, '部分格式获取失败')
}
} else if (result.error) {
showError(result.error, '获取上游模型失败')