Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix: add 30s timeout to LiteLlmManager HTTP client (#13557)

Tim O'Farrellff240c968bb9
diff --git a/enterprise/storage/lite_llm_manager.py b/enterprise/storage/lite_llm_manager.py
index d4e1aefd2c..e5afcb65c8 100644
--- a/enterprise/storage/lite_llm_manager.py
+++ b/enterprise/storage/lite_llm_manager.py
@@ -1531,7 +1531,8 @@ class LiteLlmManager:
@functools.wraps(internal_fn)
async def wrapper(*args, **kwargs):
async with httpx.AsyncClient(
- headers={'x-goog-api-key': LITE_LLM_API_KEY}
+ headers={'x-goog-api-key': LITE_LLM_API_KEY},
+ timeout=httpx.Timeout(30.0),
) as client:
return await internal_fn(client, *args, **kwargs)