Repository navigation
[fix] models: say why the catalog request failed, not just which status - #499
Open
Zhangbo-cn wants to merge 2 commits into
Open
Zhangbo-cn wants to merge 2 commits into
Zhangbo-cn wants to merge 2 commits into
Conversation
Zhangbo-cn
requested review from
hsliuustc0106 and
princepride
as code owners
November 25, 2026 03:02
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
force-pushed
the
feat/model-list-error-hints
branch
from
November 25, 2026 03:56
de73f1f to
0afcafb
Compare
… which passes twice on the same tree locally and had passed on this branch before
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Configuring MiniMax at
https://api.minimax.cn/v1with a key, then pressing Fetch models, reported: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:
/modelsendpoint — check the Base URL, which usually ends with/v1GET /modelsWording 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.