[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:<Content-Type>;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.
This commit is contained in:
Yuneng Jiang 2026-05-01 13:54:44 -07:00
parent d769e81c90
commit feb238bce9
No known key found for this signature in database

View File

@ -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"
},
},
]