mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
make sure metadata available and have a value (#9764)
This commit is contained in:
parent
b3dac9c145
commit
1127fb4b7a
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