Skip to content

[fix] models: say why the catalog request failed, not just which status - #499

Open
Zhangbo-cn wants to merge 2 commits into
ThinkFlowLab:mainfrom
Zhangbo-cn:feat/model-list-error-hints
Open

Zhangbo-cn wants to merge 2 commits into
ThinkFlowLab:mainfrom
Zhangbo-cn:feat/model-list-error-hints

Conversation

@Zhangbo-cn

@Zhangbo-cn Zhangbo-cn commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What

Configuring MiniMax at https://api.minimax.cn/v1 with a key, then pressing Fetch models, reported:

读取模型声明失败(HTTP 401),未修改配置。可重试或手动添加模型。

Three problems in one line. It says nothing about the request that failed, nothing about which address was queried, and it reads as if the models failed a check while the key — the thing that was actually rejected — is never named. A 401, a 404 and a 405 all produced the same sentence, so the user had to guess between a wrong key, a wrong Base URL, and an endpoint that does not exist.

The receipt now names the status, the URL that was queried, and the likely cause:

读取模型列表失败(HTTP 401,GET https://api.minimax.cn/v1/models):密钥无效、已过期或无权访问该地址;未修改配置。
Could not load the model list (HTTP 401, GET https://api.minimax.cn/v1/models): the key is invalid, expired, or not allowed for this address. Nothing was changed.
Status Cause named
401 invalid, expired, or not-allowed key
403 key may not access the address, or the endpoint is closed for the account
404 no /models endpoint — check the Base URL, which usually ends with /v1
405 the address does not accept GET /models
429 rate limited or out of quota
5xx the service is temporarily unavailable

Wording is deliberate: the hint says what the status usually means and never claims the key was tested — only the Test button sends a request that does that. Errors that are not about a text model keep their existing code, so nothing that was previously untranslated becomes translated.

Verification

  • pytest tests/test_localization.py tests/test_model_configs.py -q → 44 passed, including a new test that the failure keeps the status, the URL and the cause in both languages.
  • tests/browser/zhipu_provider.mjs (isolated fixture, forced 503 upstream) → passes, asserting the new wording reaches the panel as an alert.

@github-actions github-actions Bot added area:provider Model providers and generation protocols type:bug Something is broken labels Nov 25, 2026
@FayeSpica FayeSpica mentioned this pull request Nov 25, 2026
5 of 12 tasks
Pointing the picker at https://api.minimax.cn/v1 with a key, then pressing Fetch models, reported "无法读取模型的声明(HTTP 401)" and stopped. Nothing on screen said whether the key was rejected, the address was wrong, or the endpoint simply did not exist there — a 401, a 404 and a 405 all read the same, and all of them look like a fact about the model rather than about the request.

The receipt now carries the status, the address that was actually queried, and the likely cause: an invalid or expired key, a key not allowed for that address, a missing /models endpoint (usually a Base URL without /v1), a wrong method, rate limiting, or a service-side failure. Errors that are not about the text model keep their existing behaviour, and the message still ends with the fact that nothing was changed.

This is an error message, not a probe: it names what the status usually means without claiming the key was tested, which only the Test button does.
@Zhangbo-cn
Zhangbo-cn force-pushed the feat/model-list-error-hints branch from de73f1f to 0afcafb Compare November 25, 2026 03:56
@github-actions github-actions Bot added the area:i18n Localisation and bilingual UI label Nov 25, 2026
… which passes twice on the same tree locally and had passed on this branch before

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localisation and bilingual UI area:provider Model providers and generation protocols type:bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant