mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
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
|
@ -694,7 +694,7 @@ def client(original_function):
|
|||
kwargs["litellm_call_id"] = str(uuid.uuid4())
|
||||
try:
|
||||
model = args[0] if len(args) > 0 else kwargs["model"]
|
||||
except:
|
||||
except Exception:
|
||||
model = None
|
||||
if (
|
||||
call_type != CallTypes.image_generation.value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue