mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix req changes from greptile
This commit is contained in:
parent
28506f88d9
commit
f6d533ac2b
2 changed files with 3 additions and 1 deletions
|
|
@ -589,7 +589,7 @@ class Logging(LiteLLMLoggingBaseClass):
|
|||
if "litellm_metadata" in kwargs and isinstance(
|
||||
kwargs["litellm_metadata"], dict
|
||||
):
|
||||
base_litellm_params["litellm_metadata"] = kwargs["litellm_metadata"]
|
||||
base_litellm_params["litellm_metadata"] = kwargs["litellm_metadata"].copy()
|
||||
|
||||
if litellm_params:
|
||||
base_litellm_params.update(litellm_params)
|
||||
|
|
|
|||
|
|
@ -270,6 +270,8 @@ class TestUpdateFromKwargs:
|
|||
result_meta = logging_obj.litellm_params["metadata"]
|
||||
assert result_meta["from_caller"] is True
|
||||
assert result_meta["user_api_key_hash"] == "hashed-xyz"
|
||||
# caller's dict must not be mutated by the merge
|
||||
assert "user_api_key_hash" not in caller_metadata
|
||||
|
||||
def test_merge_handles_metadata_none(self, logging_obj):
|
||||
"""When metadata=None is explicitly in kwargs alongside litellm_metadata,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue