feat: differentiate fetch models error messages by failure type

Distinguish between missing API key, missing endpoint, auth failure,
unsupported provider (404/405), and timeout errors instead of showing
a generic failure toast for all cases.
This commit is contained in:
Jason
2026-04-03 23:40:49 +08:00
parent f200feebe4
commit 84998aa217
9 changed files with 119 additions and 18 deletions
+7 -1
View File
@@ -795,7 +795,13 @@
"fetchingModels": "Fetching...",
"fetchModelsSuccess": "Found {{count}} models",
"fetchModelsFailed": "Failed to fetch models",
"fetchModelsEmpty": "No models found"
"fetchModelsEmpty": "No models found",
"fetchModelsNeedApiKey": "Please fill in API Key first",
"fetchModelsNeedEndpoint": "Please fill in API endpoint first",
"fetchModelsNeedConfig": "Please fill in API endpoint and API Key first",
"fetchModelsAuthFailed": "API Key is invalid or lacks permission",
"fetchModelsNotSupported": "This provider does not support fetching model list",
"fetchModelsTimeout": "Request timed out, please check network connection"
},
"copilot": {
"authSection": "GitHub Copilot Authentication",