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:
@@ -524,8 +524,8 @@ func TestParseAntigravitySmartRetryInfo(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestShouldTriggerAntigravitySmartRetry(t *testing.T) {
|
||||
oauthAccount := &Account{Type: AccountTypeOAuth}
|
||||
setupTokenAccount := &Account{Type: AccountTypeSetupToken}
|
||||
oauthAccount := &Account{Type: AccountTypeOAuth, Platform: PlatformAntigravity}
|
||||
setupTokenAccount := &Account{Type: AccountTypeSetupToken, Platform: PlatformAntigravity}
|
||||
apiKeyAccount := &Account{Type: AccountTypeAPIKey}
|
||||
|
||||
tests := []struct {
|
||||
|
||||
Reference in New Issue
Block a user