fix(admin): reauthenticate model discovery
Staging Backend Quality Gate / validate (push) Successful in 12m14s
Staging Backend Quality Gate / publish (push) Successful in 25m47s

This commit is contained in:
Jesse_Chen
2026-08-07 22:19:15 +08:00
parent d1bea7611e
commit bf31193b60
2 changed files with 17 additions and 6 deletions
@@ -19,8 +19,10 @@ test("provider form keeps codes server-owned and API keys write-only", () => {
});
test("model discovery stays searchable with a manual provider model fallback", () => {
assert.match(component, /onClick=\{\(\) => setDiscoverProviderId\(selectedProviderId\)\}>获取模型列表<\/Button>/);
assert.match(component, /title="获取供应商模型列表"[\s\S]*reauthPermission="models\.test"[\s\S]*onSubmit=\{discoverModels\}/);
assert.match(component, /adminRequestJson<DiscoveredModelsPayload>\("\/api\/admin\/models\/discover"/);
assert.match(component, /body: JSON\.stringify\(\{ providerId: selectedProviderId \}\)/);
assert.match(component, /body: JSON\.stringify\(\{ providerId: discoverProviderId \}\)/);
assert.match(component, /获取模型列表/);
assert.match(component, /<Select[\s\S]*showSearch[\s\S]*optionFilterProp="label"[\s\S]*onSelect=\{selectDiscoveredModel\}/);
assert.match(component, /name="providerModel" label="供应商模型名(可手工输入)"/);