mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(tests): use github-hosted PDF fixture for Anthropic Files API test
Anthropic's URL fetcher intermittently returns 400 'Unable to download the file' for the Wikipedia URL the test was using. Point it at the repo's existing tests/llm_translation/fixtures/dummy.pdf via raw GitHub instead — small, deterministic, reliably fetchable. With a stable URL the test no longer needs to be opted out of VCR; remove it from the incompatible list so it can replay from cassette.
This commit is contained in:
parent
a47c4e7d1b
commit
225d01cb4f
2 changed files with 4 additions and 3 deletions
|
|
@ -401,7 +401,10 @@ class BaseLLMChatTest(ABC):
|
|||
{
|
||||
"type": "file",
|
||||
"file": {
|
||||
"file_id": "https://upload.wikimedia.org/wikipedia/commons/2/20/Re_example.pdf"
|
||||
# GitHub-hosted fixture (small, deterministic, reliably
|
||||
# fetchable from Anthropic's egress) instead of a Wikipedia
|
||||
# URL that intermittently returns 400 "Unable to download".
|
||||
"file_id": "https://raw.githubusercontent.com/BerriAI/litellm/main/tests/llm_translation/fixtures/dummy.pdf"
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@ _VCR_INCOMPATIBLE_NODEID_SUFFIXES = frozenset(
|
|||
# Provider prompt-cache propagation isn't deterministic between two
|
||||
# back-to-back calls; the test is flaky against the live provider.
|
||||
"::test_prompt_caching",
|
||||
# Wikipedia URL fetch through Anthropic Files API is flaky upstream.
|
||||
"::test_async_pdf_handling_with_file_id",
|
||||
# Bedrock Nova returns tool_call vs JSON nondeterministically; the
|
||||
# base assertion expects JSON. Other providers' versions of this
|
||||
# test are healthy, so we narrow with a class-name guard below.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue