From bbc7b4aeed6d33e6b6f7d42991edd949c9de8833 Mon Sep 17 00:00:00 2001 From: liuxiongfeng Date: Sun, 1 Feb 2026 16:29:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(gateway):=20Gemini=20API=20Key=20=E8=B4=A6?= =?UTF-8?q?=E6=88=B7=E8=B7=B3=E8=BF=87=E6=A8=A1=E5=9E=8B=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=EF=BC=8C=E7=9B=B4=E6=8E=A5=E9=80=8F=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gemini API Key 账户通常代理上游服务,模型支持由上游判断, 本地不需要预先配置模型映射。 --- backend/internal/service/gateway_service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/internal/service/gateway_service.go b/backend/internal/service/gateway_service.go index 2e3ba93e..7a901907 100644 --- a/backend/internal/service/gateway_service.go +++ b/backend/internal/service/gateway_service.go @@ -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) }