mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
feat: 非 custom 提供商新建密钥时默认开启自动获取上游模型
- 前端 KeyFormDialog 根据提供商类型自动设置 auto_fetch_models 默认值 - OAuth 创建密钥时传入 auto_fetch_models=True - OAuth 完成、refresh token 导入、批量导入后自动触发模型获取
This commit is contained in:
@@ -417,6 +417,11 @@ const apiKeyFieldName = computed(() => `api-key-field-${formNonce.value}`)
|
||||
// 可用的能力列表
|
||||
const availableCapabilities = ref<CapabilityDefinition[]>([])
|
||||
|
||||
// 非 custom 提供商默认开启自动获取上游模型
|
||||
const defaultAutoFetchModels = computed(() =>
|
||||
!!props.providerType && props.providerType !== 'custom'
|
||||
)
|
||||
|
||||
const form = ref({
|
||||
name: '',
|
||||
api_key: '', // 标准 API Key
|
||||
@@ -519,7 +524,7 @@ function resetForm() {
|
||||
note: '',
|
||||
is_active: true,
|
||||
capabilities: {},
|
||||
auto_fetch_models: false,
|
||||
auto_fetch_models: defaultAutoFetchModels.value,
|
||||
model_include_patterns_text: '',
|
||||
model_exclude_patterns_text: ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user