Mirrowel commited on
Commit
956bdbb
Β·
1 Parent(s): 71586c6

fix(provider): πŸ› increase timeout for antigravity API requests from 120s to 600s

Browse files

The previous 120-second timeout was insufficient for long-running requests to the Antigravity provider API, causing premature request failures. This change increases the timeout to 600 seconds (10 minutes) for both streaming and non-streaming completion requests to accommodate longer processing times and prevent timeout errors during complex operations.

src/rotator_library/providers/antigravity_provider.py CHANGED
@@ -2620,7 +2620,7 @@ class AntigravityProvider(AntigravityAuthBase, ProviderInterface):
2620
  file_logger: Optional[AntigravityFileLogger] = None
2621
  ) -> litellm.ModelResponse:
2622
  """Handle non-streaming completion."""
2623
- response = await client.post(url, headers=headers, json=payload, timeout=120.0)
2624
  response.raise_for_status()
2625
 
2626
  data = response.json()
@@ -2652,7 +2652,7 @@ class AntigravityProvider(AntigravityAuthBase, ProviderInterface):
2652
  "is_complete": False # Track if we received usageMetadata
2653
  }
2654
 
2655
- async with client.stream("POST", url, headers=headers, json=payload, timeout=120.0) as response:
2656
  if response.status_code >= 400:
2657
  try:
2658
  error_body = await response.aread()
 
2620
  file_logger: Optional[AntigravityFileLogger] = None
2621
  ) -> litellm.ModelResponse:
2622
  """Handle non-streaming completion."""
2623
+ response = await client.post(url, headers=headers, json=payload, timeout=600.0)
2624
  response.raise_for_status()
2625
 
2626
  data = response.json()
 
2652
  "is_complete": False # Track if we received usageMetadata
2653
  }
2654
 
2655
+ async with client.stream("POST", url, headers=headers, json=payload, timeout=600.0) as response:
2656
  if response.status_code >= 400:
2657
  try:
2658
  error_body = await response.aread()