Probe which file formats each provider reads, and publish the support table

DO
4h ago
+48609-30

Profiles' media-type sets came from a one-off probe on 2026-11-04 whose script is gone, so nothing showed when a provider started accepting or rejecting a format. This PR checks the probe into the test suite as recordings, publishes what it found as a table in the docs, and adds a test that compares every model's profile with the recordings.

Change

  • Corpus: tests/assets/formats/ holds 32 small files (about 540 KB): 8 image, 8 audio, 8 video and 8 document formats. They're made from existing assets by scripts/make_file_format_corpus.py, which needs ffmpeg, plus pillow-heif for HEIC. Each file has something a model names when it read it: the kiwi, the voice saying "Marcelo", the camera in the canyon video, or the word "pineapple" in the documents. The copied dummy.pdf and dummy.pptx say "Dummy".

  • Probe: tests/models/test_file_format_support.py::test_probe sends every file to a current model for 12 of the multimodal matrix's configurations, once in the user prompt and once as a tool result. The profile's own file-input checks are turned off, so only the adapter and the provider decide. Each result is recorded in tests/models/file_format_support.json as one of:

    • read: the answer describes the file;
    • ignored: the request succeeded, but the answer doesn't describe it;
    • rejected_by_provider: an HTTP or gRPC error;
    • rejected_by_adapter: the model class refused it before sending.

    --record-mode=rewrite re-probes and rewrites the JSON and the docs table. --record-mode=once reclassifies the existing recordings without sending anything.

  • Docs: a "Supported file formats" section in docs/input.md with a table generated from the JSON. test_docs_table_is_current keeps it in step.

  • Profile check: test_profile_agrees_with_probe needs no recordings. For each probed file it checks that unsupported_file_input with the model's real profile judges the file unreadable exactly where the probe saw it rejected. ignored files aren't checked. Today's disagreements are pinned in KNOWN_DISAGREEMENTS, so the test fails both on a new one and on one that went away (see "Open for review").

  • Supporting changes:

    • create_model in test_multimodal_tool_returns.py takes profile= and model_name=.
    • The xAI proto cassettes now record a gRPC error and raise it again on replay. Before, a refused request left nothing in the cassette, and replay ran out.

Models

A new recording has to use a current model, so the probe names its own where the matrix's model has gone:

  • OpenAI uses gpt-6.1-terra, since gpt-5-mini retires on 2026-12-11. Over Chat Completions it runs with thinking=False, because OpenAI rejects tools while it reasons.
  • Groq uses qwen/qwen3.8-27b. Groq no longer serves the matrix's meta-llama/llama-4-maverick-17b-128e-instruct and answers model_not_found, so the matrix's existing Groq recordings use a model that's gone.
  • Gemini 2.5 is left out: it's deprecated and can't be recorded again.

What the probe found

ModelImagesAudioVideoDocuments
AnthropicPNG, JPEG, GIF, WebPadapter refusesadapter refusesPDF, TXT
Bedrock, ClaudePNG, JPEG, GIF, WebPadapter refuses400all but PPTX
Bedrock, NovaPNG, JPEG, GIF, WebPadapter refusesall 8all but PPTX
Gemini APIall 8, TIFF includedall 8all 8all 8
Vertex AIall 8all 8all 8PDF and text; Office rejected
Mistralall 8adapter refusesadapter refusesPDF and text; adapter refuses Office
OpenAI ChatPNG, JPEG, GIF, WebPMP3/WAV reach the API, then 400adapter refusesPDF and text; Office rejected
OpenAI ResponsesPNG, JPEG, GIF, WebPadapter refusesadapter refusesall 8
xAIPNG, JPEG, WebPadapter refusesadapter refusesall 8
Groq (Qwen 3.8)PNG, JPEG, GIF, WebPadapter refusesadapter refusesadapter refuses

The docs table has the exact lists for each configuration and API.

Open for review

Where profiles disagree with the recordings. KNOWN_DISAGREEMENTS lists each case:

  • The Gemini API reads TIFF now; the profile still leaves it out.
  • Vertex AI rejects DOCX, XLSX and PPTX. Over Interactions, TXT, Markdown and HTML are rejected too.
  • OpenAI Chat Completions rejects DOCX, XLSX and PPTX.
  • Groq's Qwen 3.8 rejects HEIC, AVIF, BMP and TIFF.
  • PPTX isn't in DocumentMediaType, so no profile can say it isn't read. The Anthropic, Bedrock and Mistral adapters refuse it.

As built, this PR lands the probe with these cases pinned, and each fix follows as its own PR that removes its entries. The alternative is to fix the profiles here, which adds PPTX to the public DocumentMediaType. That choice is with Douwe.

Classification is by keyword. A model that describes the file without one of the format's words counts as ignored. Five results are ignored today. One of them, a Nova 3GP described as a "mountain waterfall", isn't in the clip.

Size: the 24 cassettes are about 9 MB, mostly the Google ones, which embed every video.

Checklist

  • No breaking changes in accordance with the version policy.
  • Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
  • PR title is fit for the release changelog.

🤖 Generated with Claude Code


Summary by cubic

Checks in a repeatable file-format probe so provider support is documented and profile drift is caught. The measured results are published in the input docs.

  • Adds a 32-file corpus (tests/assets/formats/) and recordings of user prompts and tool results across provider APIs.
  • Tests profile agreement against the probe, pinning current discrepancies until they're fixed; the Groq image fix (#15383) is the first one to be removed.
  • --record-mode=rewrite re-runs the probe and updates its results and docs table; --record-mode=once reclassifies existing recordings.
  • The docs table names the provider and API, not the model; the test lists the exact probe models. Where the table and a profile disagree, the profile decides what is sent.
  • Groq's profile now narrows supported_image_media_types to JPEG, PNG, GIF and WebP, so a HEIC, AVIF, BMP or TIFF image a tool returns is sent as a note instead of failing.
  • The xAI proto cassettes now record and replay gRPC refusals, so a rejected request replays instead of running out of interactions.
  • A provider 5xx fails the probe rather than counting as a rejection, except Vertex AI Interactions' repeatable XLSX 500, which is pinned by name.

Known disagreements in KNOWN_DISAGREEMENTS:

  • Gemini API now reads TIFF; Vertex AI rejects Office documents (and text over Interactions); OpenAI Chat rejects Office documents.
  • PPTX isn't in DocumentMediaType, so no profile can judge it even though several adapters refuse it.