mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix(utils.py): fix special keys list for provider-specific items in response object
This commit is contained in:
parent
18828dcac6
commit
ac6bca2320
1 changed files with 2 additions and 1 deletions
|
@ -5859,7 +5859,8 @@ def convert_to_model_response_object(
|
||||||
if _response_headers is not None:
|
if _response_headers is not None:
|
||||||
model_response_object._response_headers = _response_headers
|
model_response_object._response_headers = _response_headers
|
||||||
|
|
||||||
special_keys = litellm.ModelResponse.model_fields.keys()
|
special_keys = list(litellm.ModelResponse.model_fields.keys())
|
||||||
|
special_keys.append("usage")
|
||||||
for k, v in response_object.items():
|
for k, v in response_object.items():
|
||||||
if k not in special_keys:
|
if k not in special_keys:
|
||||||
setattr(model_response_object, k, v)
|
setattr(model_response_object, k, v)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue