Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
handle llm error on request_async [LET-5403] (#5408)
Ari Webb03e7639e2be2
diff --git a/letta/adapters/simple_llm_request_adapter.py b/letta/adapters/simple_llm_request_adapter.pyindex ab3f662d0..4caa8d005 100644--- a/letta/adapters/simple_llm_request_adapter.py+++ b/letta/adapters/simple_llm_request_adapter.py@@ -38,7 +38,11 @@ class SimpleLLMRequestAdapter(LettaLLMRequestAdapter):self.request_data = request_data# Make the blocking LLM request- self.response_data = await self.llm_client.request_async(request_data, self.llm_config)+ try:+ self.response_data = await self.llm_client.request_async(request_data, self.llm_config)+ except Exception as e:+ raise self.llm_client.handle_llm_error(e)+self.llm_request_finish_timestamp_ns = get_utc_timestamp_ns()# Convert response to chat completion format