diff --git a/litellm/batches/batch_utils.py b/litellm/batches/batch_utils.py index bdbf7671f15..f0ffeadd9fa 100644 --- a/litellm/batches/batch_utils.py +++ b/litellm/batches/batch_utils.py @@ -546,7 +546,7 @@ def _translate_anthropic_batch_item_to_openai(item: dict) -> dict: """ result = item.get("result", {}) if result.get("type") != "succeeded": - # failed/errored items — return as-is so _batch_response_was_successful + # failed/errored items return as-is so _batch_response_was_successful # correctly treats them as non-200 return item diff --git a/tests/test_litellm/llms/anthropic/files/test_anthropic_files_transformation.py b/tests/test_litellm/llms/anthropic/files/test_anthropic_files_transformation.py index 4a2fb197f94..ddd9fae1ba5 100644 --- a/tests/test_litellm/llms/anthropic/files/test_anthropic_files_transformation.py +++ b/tests/test_litellm/llms/anthropic/files/test_anthropic_files_transformation.py @@ -326,18 +326,6 @@ class TestAnthropicFilesConfig: assert url == f"{ANTHROPIC_FILES_API_BASE}/v1/messages/batches/msgbatch_abc123/results" assert params == {} - def test_transform_file_content_request_msgbatch_routes_to_batch_endpoint(self): - """msgbatch_* IDs must route to batch results endpoint not Files API. - Ref: https://github.com/BerriAI/litellm/issues/27944 - """ - url, params = self.config.transform_file_content_request( - file_content_request={"file_id": "msgbatch_abc123"}, - optional_params={}, - litellm_params={}, - ) - assert url == f"{ANTHROPIC_FILES_API_BASE}/v1/messages/batches/msgbatch_abc123/results" - assert params == {} - def test_transform_file_content_response(self): mock_response = Mock(spec=httpx.Response) result = self.config.transform_file_content_response( diff --git a/tests/test_litellm/llms/anthropic/test_anthropic_batch_translation.py b/tests/test_litellm/llms/anthropic/test_anthropic_batch_translation.py index 2d52f0090fd..9e3f1cd4ff8 100644 --- a/tests/test_litellm/llms/anthropic/test_anthropic_batch_translation.py +++ b/tests/test_litellm/llms/anthropic/test_anthropic_batch_translation.py @@ -33,7 +33,7 @@ def test_translate_failed_item_passes_through(): "result": {"type": "errored", "error": {"type": "server_error"}}, } result = _translate_anthropic_batch_item_to_openai(item) - # failed items pass through unchanged — no response.status_code == 200 + # failed items pass through unchanged; no response.status_code == 200 assert result == item