mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 02:17:46 +08:00
feat(vertex-ai): 重构 Vertex AI 为插件化 adapter,支持 service_account 认证与动态路由
将 Vertex AI 从 transport.py 的硬编码逻辑重构为独立的 plugin adapter, 支持 service_account/oauth 认证类型、模型格式自动识别、区域路由和 URL 构建。 前端新增 Key 认证类型选择和 Service Account 配置表单。 Co-authored-by: NyaDoo <[email protected]> Closes #194
This commit is contained in:
@@ -775,14 +775,14 @@ const isCapabilityUsed = (cap: string): boolean => {
|
||||
// 判断是否为 OAuth 类型(provider_type 为具体值时也算 OAuth)
|
||||
const isOAuthType = (authType?: string): boolean => {
|
||||
if (!authType) return false
|
||||
return !['api_key', 'vertex_ai'].includes(authType)
|
||||
return !['api_key', 'service_account'].includes(authType)
|
||||
}
|
||||
|
||||
// 格式化认证类型(合并 plan 信息,避免冗余)
|
||||
const formatAuthTypeWithPlan = (authType: string, planType?: string): string => {
|
||||
const labels: Record<string, string> = {
|
||||
'oauth': 'OAuth',
|
||||
'vertex_ai': 'Vertex AI',
|
||||
'service_account': 'Service Account',
|
||||
'kiro': 'Kiro',
|
||||
'codex': 'Codex',
|
||||
'antigravity': 'Antigravity',
|
||||
|
||||
Reference in New Issue
Block a user