mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
make sure metadata available and have a value (#9764)
This commit is contained in:
parent
af42e5855f
commit
001043ba05
1 changed files with 1 additions and 1 deletions
|
@ -528,7 +528,7 @@ async def add_litellm_data_to_request( # noqa: PLR0915
|
|||
|
||||
_metadata_variable_name = _get_metadata_variable_name(request)
|
||||
|
||||
if _metadata_variable_name not in data:
|
||||
if data.get(_metadata_variable_name, None) is None:
|
||||
data[_metadata_variable_name] = {}
|
||||
|
||||
# We want to log the "metadata" from the client side request. Avoid circular reference by not directly assigning metadata to itself.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue