Merge pull request #444 from touwaeriol/fix/gemini-apikey-passthrough

feat(gateway): Gemini API Key 账户跳过模型映射检查,直接透传
This commit is contained in:
Wesley Liddick 2026-02-02 15:17:05 +08:00 committed by GitHub
commit 6999a9c011
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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