_init_kwargs_for_pass_through_endpoint

This commit is contained in:
Ishaan Jaff 2025-04-21 18:57:01 -07:00
parent 808a2efa10
commit cc59eb9e65

View file

@ -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