fix: 默认补全 antigravity 的 Gemini 3.1 Pro 透传映射
This commit is contained in:
@@ -373,7 +373,11 @@ func (a *Account) GetModelMapping() map[string]string {
|
||||
}
|
||||
if len(result) > 0 {
|
||||
if a.Platform == domain.PlatformAntigravity {
|
||||
ensureAntigravityDefaultPassthrough(result, "gemini-3-flash")
|
||||
ensureAntigravityDefaultPassthroughs(result, []string{
|
||||
"gemini-3-flash",
|
||||
"gemini-3.1-pro-high",
|
||||
"gemini-3.1-pro-low",
|
||||
})
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -400,6 +404,12 @@ func ensureAntigravityDefaultPassthrough(mapping map[string]string, model string
|
||||
mapping[model] = model
|
||||
}
|
||||
|
||||
func ensureAntigravityDefaultPassthroughs(mapping map[string]string, models []string) {
|
||||
for _, model := range models {
|
||||
ensureAntigravityDefaultPassthrough(mapping, model)
|
||||
}
|
||||
}
|
||||
|
||||
// IsModelSupported 检查模型是否在 model_mapping 中(支持通配符)
|
||||
// 如果未配置 mapping,返回 true(允许所有模型)
|
||||
func (a *Account) IsModelSupported(requestedModel string) bool {
|
||||
|
||||
Reference in New Issue
Block a user