Part of [CODAGT-1430](https://linear.app/codercom/issue/CODAGT-1430).
Stacked on #31383.
We had two rules for which media a model can take.
`AcceptsFilePartMediaType` filtered user attachments, whilst
`ToolResultMediaOmission` filtered tool results with its own lists, and
only let images through on Anthropic. Now that fantasy converts tool
result media like user files, the two should agree, so we'll keep one
rule.
`chatprovider.Model` now carries the configured provider type, and
`AcceptsFilePartMediaType` reads a table keyed on the route, i.e. the
configured provider plus the transport. `replaceUnsupportedMedia`
applies it to user file parts and tool result media alike, including the
pending tail of the turn prompt. As a result, tool result PDFs now reach
Anthropic, and the 5 MiB inline image cap only applies to images.
Azure OpenAI Chat Completions rejects file content parts with a 400
(`This model does not support file content types`, see
https://github.com/Azure/azure-sdk-for-net/issues/51873), and Gemini's
OpenAI-compatible endpoint ignores them. chatd reaches both through the
openai-compat client, so the rule rejects PDFs there, and the model gets
a text note instead of a failed request or a silently dropped file.
Unsupported tool result media now gets the same note fantasy writes
("The tool returned `<type>` content, which cannot be displayed."), so
the model sees one wording whichever layer drops it. I've also added a
Tool results section to the MCP servers docs, and fixed the File
attachments docs, which said every rejected attachment becomes text.
Only text files do; a rejected PDF becomes a note that names it.
I've also tested this end to end on Bedrock. I ran chatd from this
branch with an Anthropic provider pointed at our AI gateway's Bedrock
route (InvokeModel, us-east-2), plus an MCP tool that returns a PDF with
a code word inside. Claude Haiku 5.5 and Claude Opus 5.5 (adaptive
thinking) both read the code word from the tool result, and read it
again on the next turn, when the PDF is replayed from history. The
request carries the PDF as a `document` block inside `tool_result`, the
same body chatd sends to Anthropic.