Repository navigation
fix(providers/webui): 获取模型列表不再要求先填模型 - #364
Merged
Phantivia merged 2 commits intoNov 4, 2026
Merged
Conversation
- 根因:编辑页草稿带着空 spec.model 走 validateEntry,模型名必填把它拦下;列模型用不到 spec。 - 列模型按去掉 spec 的条目校验并建立实例,测试连接仍要求模型。 - tests/providers/hub.test.ts 新增空模型列模型的用例;修复前报 Model name cannot be empty。
- 草稿用例已经有同一套 fetch 替身和「探测缺模型时报错」的断言,新加的 一行只断言模型名为空时仍能列出模型;单独那条用例与它重复,删掉。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
谢谢修复。我们把新加的用例并进了已有的草稿用例(只多一行断言:模型名为空也能列出模型),删掉了和已有用例重复的那条。已合并,随下个版本发布。 |
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.
中文
在「模型供应商」编辑页,未填模型名就点「获取模型列表」会返回 400「模型名不能为空」,而这个按钮的用途正是先取回列表、再从中选模型。改动在
ProviderHub.action:models动作按去掉spec的草稿条目做校验并建立实例,spec不参与列模型;test动作仍要求模型。新增回归用例覆盖空模型列模型,修复前它以同一条错误失败,修复后通过。English
On the model providers page, pressing "Fetch models" before typing a model name returned HTTP 400 "Model name cannot be empty", although the list is how the operator picks a model.
ProviderHub.actionnow validates the draft entry withoutspecfor themodelsaction, which does not use it; thetestaction still requires a model. The new regression test fails with the same message before the fix and passes after it.Checks
pnpm testpnpm run typecheckpnpm typecheck:web(browser code changed / 改了浏览器代码)pnpm testlocally: all Node-side suites pass; the jsdom suites (tests/web/*.test.ts, 61 cases) fail identically on unmodifiedmainin this environment (localStorageundefined), so they are unrelated to this change.