Merge branch 'main' of github.com:Wei-Shaw/claude-relay-service

* 'main' of github.com:Wei-Shaw/claude-relay-service:
  chore: sync VERSION file with release v1.1.72 [skip ci]
  fix: 修复账户管理和API Key管理的多个问题
  fix: 修复 GitHub Actions 版本检测对合并提交的处理
This commit is contained in:
mouyong
2025-08-04 20:34:38 +08:00
6 changed files with 580 additions and 160 deletions

View File

@@ -870,7 +870,19 @@ const form = ref({
apiUrl: props.account?.apiUrl || '',
apiKey: props.account?.apiKey || '',
priority: props.account?.priority || 50,
supportedModels: props.account?.supportedModels?.join('\n') || '',
supportedModels: (() => {
const models = props.account?.supportedModels;
if (!models) return '';
// 处理对象格式Claude Console 的新格式)
if (typeof models === 'object' && !Array.isArray(models)) {
return Object.keys(models).join('\n');
}
// 处理数组格式(向后兼容)
if (Array.isArray(models)) {
return models.join('\n');
}
return '';
})(),
userAgent: props.account?.userAgent || '',
rateLimitDuration: props.account?.rateLimitDuration || 60
})
@@ -1362,7 +1374,19 @@ watch(() => props.account, (newAccount) => {
apiUrl: newAccount.apiUrl || '',
apiKey: '', // 编辑模式不显示现有的 API Key
priority: newAccount.priority || 50,
supportedModels: newAccount.supportedModels?.join('\n') || '',
supportedModels: (() => {
const models = newAccount.supportedModels;
if (!models) return '';
// 处理对象格式Claude Console 的新格式)
if (typeof models === 'object' && !Array.isArray(models)) {
return Object.keys(models).join('\n');
}
// 处理数组格式(向后兼容)
if (Array.isArray(models)) {
return models.join('\n');
}
return '';
})(),
userAgent: newAccount.userAgent || '',
rateLimitDuration: newAccount.rateLimitDuration || 60
}