From feb238bce9c575eca3b91278ef5c52f96e9b314f Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Fri, 1 May 2026 13:54:44 -0700 Subject: [PATCH] [Test] Anthropic: Use jsDelivr CDN For PDF Fixture URL To Preserve Content-Type The previous URL switch to raw.githubusercontent.com fixed Anthropic's "Unable to download" failure but caused OpenAI / Gemini / Router PDF tests to fail with "unsupported MIME type 'application/octet-stream'": those providers download the URL and inline it as data:;base64,..., and raw.githubusercontent.com serves PDFs as application/octet-stream. jsDelivr proxies the same in-repo fixture (cdn.jsdelivr.net/gh/BerriAI/litellm@main/...) and returns the correct Content-Type: application/pdf, so all providers (Anthropic forwards the URL natively; OpenAI/Gemini/Bedrock fetch and inline) get the right MIME type without changing transformer code. --- tests/llm_translation/base_llm_unit_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/llm_translation/base_llm_unit_tests.py b/tests/llm_translation/base_llm_unit_tests.py index 89b35daf6c..ed85faee96 100644 --- a/tests/llm_translation/base_llm_unit_tests.py +++ b/tests/llm_translation/base_llm_unit_tests.py @@ -401,7 +401,7 @@ class BaseLLMChatTest(ABC): { "type": "file", "file": { - "file_id": "https://raw.githubusercontent.com/BerriAI/litellm/main/tests/llm_translation/fixtures/dummy.pdf" + "file_id": "https://cdn.jsdelivr.net/gh/BerriAI/litellm@main/tests/llm_translation/fixtures/dummy.pdf" }, }, ]