mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-12 03:48:56 +00:00
fix: remove duplicate test and clean up comment encoding
This commit is contained in:
parent
8d4cb39fb5
commit
ed6cb9b4b3
3 changed files with 2 additions and 14 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue