fix(antigravity): support upstream accounts and custom model_mapping in scheduling
- GetAccessToken: add upstream branch to read api_key from credentials - shouldTriggerAntigravitySmartRetry: relax check from IsOAuth to Platform-based - isModelSupportedByAccount/WithContext: replace IsAntigravityModelSupported whitelist with mapAntigravityModel for unified scheduling/forwarding logic - mapAntigravityModel: fix edge case where wildcard target equals request model - Update tests for new behavior and add custom model_mapping test cases
This commit is contained in:
@@ -2587,6 +2587,9 @@ func (s *GatewayService) isModelSupportedByAccountWithContext(ctx context.Contex
|
||||
// 应用 thinking 后缀后检查最终模型是否在账号映射中
|
||||
if enabled, ok := ctx.Value(ctxkey.ThinkingEnabled).(bool); ok {
|
||||
finalModel := applyThinkingModelSuffix(mapped, enabled)
|
||||
if finalModel == mapped {
|
||||
return true // thinking 后缀未改变模型名,映射已通过
|
||||
}
|
||||
return account.IsModelSupported(finalModel)
|
||||
}
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user