feat: add configurable timeout for LLM requests

This commit is contained in:
Ahmed Allam
2025-11-12 18:58:03 +04:00
committed by Ahmed Allam
parent 795ed02955
commit 1abfb360e4
5 changed files with 27 additions and 6 deletions
+3
View File
@@ -208,9 +208,12 @@ async def warm_up_llm() -> None:
{"role": "user", "content": "Reply with just 'OK'."},
]
llm_timeout = int(os.getenv("LLM_TIMEOUT", "600"))
response = litellm.completion(
model=model_name,
messages=test_messages,
timeout=llm_timeout,
)
validate_llm_response(response)