feat(gateway): Gemini API Key 账户跳过模型映射检查,直接透传

Gemini API Key 账户通常代理上游服务,模型支持由上游判断,
本地不需要预先配置模型映射。
This commit is contained in:
liuxiongfeng
2026-02-01 16:29:27 +08:00
parent d3062b2e46
commit bbc7b4aeed

View File

@@ -1893,6 +1893,10 @@ func (s *GatewayService) isModelSupportedByAccount(account *Account, requestedMo
// Antigravity 平台使用专门的模型支持检查 // Antigravity 平台使用专门的模型支持检查
return IsAntigravityModelSupported(requestedModel) return IsAntigravityModelSupported(requestedModel)
} }
// Gemini API Key 账户直接透传,由上游判断模型是否支持
if account.Platform == PlatformGemini && account.Type == AccountTypeAPIKey {
return true
}
// 其他平台使用账户的模型支持检查 // 其他平台使用账户的模型支持检查
return account.IsModelSupported(requestedModel) return account.IsModelSupported(requestedModel)
} }