mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-18 09:45:23 +00:00
fix: address review and validation findings for PR 44819
This commit is contained in:
parent
65962a2f52
commit
88284c5ffa
1 changed files with 1 additions and 3 deletions
|
|
@ -82,9 +82,7 @@ def _store_response_cost_before_usage_flattening(completion_response: object, kw
|
|||
litellm_logging_obj = litellm_logging_obj_from_kwargs(kwargs)
|
||||
if litellm_logging_obj is None:
|
||||
return
|
||||
# cast-ok: the adapter hands back an OpenAI-shaped ModelResponse; the calculator
|
||||
# accepts it as-is and only the usage fields are read.
|
||||
model_response: Final = cast(ModelResponse, completion_response)
|
||||
model_response: Final = cast(ModelResponse, completion_response) # cast-ok: adapter returns ModelResponse
|
||||
usage: Final = getattr(model_response, "usage", None)
|
||||
if not isinstance(usage, Usage):
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue