Add LLM client compaction errors to traces (#9474)
* add llm client errors to traces * update response json for telemetry * prevent silent failures and properly log errored responses in streaming path * remove double logging --------- Co-authored-by: Amy Guan <amy@letta.com> Co-authored-by: Kian Jones <kian@letta.com>
This commit is contained in:
@@ -161,7 +161,11 @@ class LLMClientBase:
|
||||
return
|
||||
|
||||
if response_json is None:
|
||||
return
|
||||
if error_msg:
|
||||
response_json = {"error": error_msg, "error_type": error_type}
|
||||
else:
|
||||
logger.warning(f"Skipping telemetry: no response_json or error_msg (call_type={self._telemetry_call_type})")
|
||||
return
|
||||
|
||||
try:
|
||||
pydantic_actor = self.actor.to_pydantic() if hasattr(self.actor, "to_pydantic") else self.actor
|
||||
|
||||
Reference in New Issue
Block a user