mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix: req changes by greptile bot
This commit is contained in:
parent
5abfddf47f
commit
28506f88d9
2 changed files with 2 additions and 2 deletions
|
|
@ -109,7 +109,7 @@ def get_litellm_params(
|
|||
# the request uses "litellm_metadata" (e.g. /v1/messages from Claude Code).
|
||||
_merged_metadata = metadata
|
||||
if litellm_metadata and isinstance(litellm_metadata, dict):
|
||||
if _merged_metadata is None:
|
||||
if not _merged_metadata:
|
||||
_merged_metadata = dict(litellm_metadata)
|
||||
else:
|
||||
_merged_metadata = dict(_merged_metadata) # don't mutate caller's dict
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ class TestUpdateFromKwargs:
|
|||
litellm_params={"metadata": {"from_caller": True}, "litellm_call_id": "x"},
|
||||
)
|
||||
|
||||
assert logging_obj.litellm_params["metadata"]["from_caller"] is True
|
||||
assert logging_obj.litellm_params["metadata"] == {"from_caller": True}
|
||||
|
||||
def test_custom_pricing_detected_via_litellm_metadata(self, logging_obj):
|
||||
"""Custom pricing in litellm_metadata.model_info should set custom_pricing flag."""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue