forked from phoenix/litellm-mirror
fix(litellm_logging.py): log response_cost=0 for failed calls
Fixes https://github.com/BerriAI/litellm/issues/4604
This commit is contained in:
parent
9cc2daeec9
commit
959c627dd3
5 changed files with 49 additions and 34 deletions
|
@ -1499,6 +1499,7 @@ class Logging:
|
|||
self.model_call_details["traceback_exception"] = traceback_exception
|
||||
self.model_call_details["end_time"] = end_time
|
||||
self.model_call_details.setdefault("original_response", None)
|
||||
self.model_call_details["response_cost"] = 0
|
||||
return start_time, end_time
|
||||
|
||||
def failure_handler(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue