mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
feat: Key 删除时自动解除不再匹配的 GlobalModel 关联
- 新增 auto_disassociate_provider_by_key_whitelist 方法检测并解除关联 - 删除 Key 后检查 Provider 剩余 Key 白名单,移除不再匹配的 Model - 前端删除密钥后并行刷新端点列表、模型列表和模型映射 Closes #102 Co-authored-by: AAEE86 <ppk0227@hotmail.com>
This commit is contained in:
@@ -779,7 +779,12 @@ async function confirmDeleteKey() {
|
||||
try {
|
||||
await deleteEndpointKey(keyId)
|
||||
showSuccess('密钥已删除')
|
||||
await loadEndpoints()
|
||||
// 并行刷新:端点列表、模型列表、模型映射(删除 Key 触发自动解除模型关联)
|
||||
await Promise.all([
|
||||
loadEndpoints(),
|
||||
modelsTabRef.value?.reload(),
|
||||
modelMappingTabRef.value?.reload()
|
||||
])
|
||||
emit('refresh')
|
||||
} catch (err: any) {
|
||||
showError(err.response?.data?.detail || '删除密钥失败', '错误')
|
||||
|
||||
Reference in New Issue
Block a user