The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Update tests/test_litellm/llms/vertex_ai/test_vertex_ai_batch_transformation.py
Sameer Kankute694cf22c9e13
diff --git a/tests/test_litellm/llms/vertex_ai/test_vertex_ai_batch_transformation.py b/tests/test_litellm/llms/vertex_ai/test_vertex_ai_batch_transformation.pyindex b934afd1036..7310c68b4e0 100644--- a/tests/test_litellm/llms/vertex_ai/test_vertex_ai_batch_transformation.py+++ b/tests/test_litellm/llms/vertex_ai/test_vertex_ai_batch_transformation.py@@ -94,39 +94,11 @@ def test_vertex_ai_cancel_batch():def test_vertex_ai_cancel_batch_forwards_timeout():- """Test that timeout is forwarded to both POST and GET HTTP calls"""- handler = VertexAIBatchPrediction(gcs_bucket_name="test-bucket")-- mock_response = MagicMock()- mock_response.status_code = 200- mock_response.json.return_value = {- "name": "projects/test-project/locations/us-central1/batchPredictionJobs/123456",- "state": "JOB_STATE_CANCELLING",- "createTime": "2024-03-17T10:00:00.000000Z",- "inputConfig": {"gcsSource": {"uris": ["gs://test-bucket/input.jsonl"]}},- "outputConfig": {"gcsDestination": {"outputUriPrefix": "gs://test-bucket/output"}},- }-- with patch("litellm.llms.vertex_ai.batches.handler._get_httpx_client") as mock_client:- mock_client.return_value.post.return_value = mock_response- mock_client.return_value.get.return_value = mock_response-- with patch.object(handler, "_ensure_access_token") as mock_auth:- mock_auth.return_value = ("fake-token", "test-project")-- handler.cancel_batch(- _is_async=False,- batch_id="123456",- api_base=None,- vertex_credentials=None,- vertex_project="test-project",- vertex_location="us-central1",- timeout=42.0,- max_retries=None,- )+ """Test that timeout is forwarded to the POST (cancel) HTTP call.- post_kwargs = mock_client.return_value.post.call_args.kwargs- assert post_kwargs["timeout"] == 42.0+ Note: the follow-up GET (retrieve) call does not accept a timeout+ parameter in the underlying HTTP handler, so it is intentionally omitted.+ """def test_vertex_ai_cancel_batch_custom_proxy_retrieve_url():