mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
_init_kwargs_for_pass_through_endpoint
This commit is contained in:
parent
808a2efa10
commit
cc59eb9e65
1 changed files with 27 additions and 3 deletions
|
@ -115,7 +115,15 @@ def test_init_kwargs_for_pass_through_endpoint_basic(
|
|||
user_api_key_dict=mock_user_api_key_dict,
|
||||
passthrough_logging_payload=passthrough_payload,
|
||||
litellm_call_id="test-call-id",
|
||||
logging_obj=Mock(),
|
||||
logging_obj=LiteLLMLoggingObj(
|
||||
model="test-model",
|
||||
messages=[],
|
||||
stream=False,
|
||||
call_type="test-call-type",
|
||||
start_time=datetime.now(),
|
||||
litellm_call_id="test-call-id",
|
||||
function_id="test-function-id",
|
||||
),
|
||||
)
|
||||
|
||||
assert result["call_type"] == "pass_through_endpoint"
|
||||
|
@ -159,7 +167,15 @@ def test_init_kwargs_with_litellm_metadata(mock_request, mock_user_api_key_dict)
|
|||
passthrough_logging_payload=passthrough_payload,
|
||||
_parsed_body=parsed_body,
|
||||
litellm_call_id="test-call-id",
|
||||
logging_obj=Mock(),
|
||||
logging_obj=LiteLLMLoggingObj(
|
||||
model="test-model",
|
||||
messages=[],
|
||||
stream=False,
|
||||
call_type="test-call-type",
|
||||
start_time=datetime.now(),
|
||||
litellm_call_id="test-call-id",
|
||||
function_id="test-function-id",
|
||||
),
|
||||
)
|
||||
|
||||
# Check that litellm_metadata was merged with default metadata
|
||||
|
@ -185,7 +201,15 @@ def test_init_kwargs_with_tags_in_header(mock_request, mock_user_api_key_dict):
|
|||
user_api_key_dict=mock_user_api_key_dict,
|
||||
passthrough_logging_payload=passthrough_payload,
|
||||
litellm_call_id="test-call-id",
|
||||
logging_obj=Mock(),
|
||||
logging_obj=LiteLLMLoggingObj(
|
||||
model="test-model",
|
||||
messages=[],
|
||||
stream=False,
|
||||
call_type="test-call-type",
|
||||
start_time=datetime.now(),
|
||||
litellm_call_id="test-call-id",
|
||||
function_id="test-function-id",
|
||||
),
|
||||
)
|
||||
|
||||
# Check that tags were added to metadata
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue