In short.
Pydantic AI’s File Understanding guide helps Python developers configure agents to handle unsupported attachments through another model’s descriptions, with extra model usage and no established accuracy or monetary cost. It explains how model profiles control conversion, how descriptions persist in conversation history and how helper requests count toward usage limits. It also documents important differences between ModelFallback and FallbackModel. No code was executed; runtime compatibility, accuracy and latency remain unassessed.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete File Understanding page at [https://pydantic.dev/docs/ai/capabilities/file-understanding/index.md], including all three Python examples and its documentation-index and agent-query notices. Linked pages and the documentation index are excluded. No code was executed; compatibility, accuracy, latency and monetary cost have not been independently assessed.
The overview
Identity
This is the Pydantic AI documentation guide for the FileUnderstanding capability at [https://pydantic.dev/docs/ai/capabilities/file-understanding/index.md]. It teaches developers how to configure an agent so another model describes files that the agent’s active model cannot accept.
The resource is a feature guide containing explanations and three Python examples. It does not identify a minimum supported Pydantic AI release.
Assessment
The documented approach suits agents that need to keep a preferred model while accepting files outside that model’s input support. Its practical value is the combination of automatic conversion, reusable descriptions and shared usage accounting.
The guide gives concrete configuration and lifecycle details, but no measured accuracy, latency or cost results. Whether descriptions preserve enough information for a particular task remains unassessed.
Users
The main audience is Python developers building Pydantic AI agents that receive documents, images, audio or video through user prompts or tool results. Developers using text-only models or switching between models with different input capabilities have particularly relevant use cases.
Beginners will need familiarity with agents and model providers. Experienced developers will find the details about model profiles, history metadata, durable replay and usage limits useful when integrating this behavior into an application.
Capabilities
FileUnderstanding replaces unsupported images, documents, audio and video with descriptions written by a model that accepts those files. Files the active model accepts are passed through. The guide highlights audio and video as common conversion cases and Word and Excel documents when using AnthropicModel.
Developers can replace the default detailed-description request with custom instructions, such as asking for transcription that preserves headings and tables. Files needing descriptions are processed concurrently, and repeated occurrences of the same file are described once within a conversation when the required history is retained.
Using it
Requirements
The illustrated configuration requires a Pydantic AI Agent with FileUnderstanding in its capabilities list. Its fallback_subagent_model must accept the files it will describe; this parameter accepts either a provider:model name or a Model instance.
The active model’s profile must accurately declare support for images, documents, audio files and video, including supported document media types. The page does not establish minimum Python or package versions, installation steps, provider authentication requirements or file-size limits.
Mechanism
Before each request attempt, the capability checks files against the model serving that attempt. Unsupported files become named text/plain blocks bounded by -----BEGIN FILE----- and -----END FILE----- markers. Text-like documents, including CSV, JSON, XML and YAML, are inlined directly and retain their media types.
Descriptions are recorded in request metadata under the reserved __pydantic_ai__ namespace, which is not sent to the model. Later turns, other workers and durable replays can reuse that text from message history. URL files are identified by URL; binary files by their bytes and media type. Downloaded text documents are also retained to avoid downloading them again.
Without this capability, an unsupported file returned by a tool becomes a note explaining that it cannot be read; an unsupported file in a user prompt fails the request.
Setup
Import FileUnderstanding from pydantic_ai.capabilities, configure fallback_subagent_model and add the capability to Agent. Supply instructions when the task needs a specific description format instead of the default detailed description.
Check profile flags against the actual model. The guide illustrates a text-only Llama model behind vLLM with supports_image_input=False and supports_document_input=False. These overrides matter because support flags otherwise default to True unless an adapter or model family is known to lack support.
Preserve framework-managed message history when relying on description reuse, and configure usage limits to include both description requests and the agent’s own requests.
Example
The main example configures a typesafe:jev-latest agent to answer whether a document is about animals, with a Boolean output. It uses openai:gpt-6.1-sol as the description model and supplies a PDF through DocumentUrl at [https://example.com/field-guide.pdf].
The displayed True output belongs to the documentation example and was not verified by execution. The example establishes the intended configuration pattern, not the availability of those models or the contents of that PDF.
Assessment & evidence
Limitations
Profile flags are declarations rather than a verification that a model can read a file. An incorrectly permissive profile can cause the original attachment to reach a provider that rejects it. Provider file references represented by UploadedFile are left unchanged because only their own provider can read them.
UI adapters omit the reserved description metadata from history sent to clients, and sanitize_messages removes it from untrusted history returned by clients. Consequently, conversations whose history lives on the client describe files again each turn. Different descriptions can change earlier request content and invalidate the cached prefix.
The page does not quantify description errors, information loss, processing latency or behavior when the description model fails.
Reasoning
The agent receives the description in place of an unsupported file, so its answer depends on what the describing model includes. It is reasonable to infer that omitted text, table cells or visual details could affect downstream answers; the page provides no measurements of that risk.
Custom transcription instructions offer a way to request the information a task needs, but they do not establish extraction accuracy. Tasks requiring exact details should compare descriptions and answers against representative originals before relying on them.
Alternatives
A main model that accepts the original file receives it directly under the documented mechanism, avoiding the description step for that file. Text-like documents also use direct inlining.
For switching models inside an agent, the guide recommends ModelFallback: each candidate is evaluated against its own profile. FallbackModel has no single profile, so FileUnderstanding leaves its files alone; an attempted model instead receives a note for a tool file it cannot read.
The page supplies no comparison with other file-processing libraries or extraction services.
Evidence
The evidence is the complete Pydantic AI File Understanding page at [https://pydantic.dev/docs/ai/capabilities/file-understanding/index.md]. Its explanations and three Python examples support the configuration and behavior described here.
The page contains no independent evaluation, execution receipts or comparative measurements. Linked API references, provider documentation and package source code are outside the available evidence. No code was executed.
Access & freshness
Costs
Monetary cost is unknown: the page supplies no prices or measured usage totals. Each description is a separate model run, whose requests, tokens and cost are added to the parent agent’s RunUsage.
Usage limits are checked before description requests are sent. A request_limit covers those requests together with the agent’s own requests; it does not establish a monetary price.
Retained descriptions avoid repeated description work within a conversation. Separate conversations describe files again, while client-held history can cause descriptions to be regenerated every turn. Those differences affect usage and prompt-cache reuse.
Rights
The page does not state licence or redistribution terms for its documentation, examples or the underlying package. Those permissions and any commercial-use conditions are unknown from this evidence.
The description model receives the file it must interpret. The page does not establish provider retention, confidentiality or data-location terms; these depend on the chosen model and provider configuration.
Freshness
The available page snapshot is dated 15 November 2026 at 07:52:04 UTC. The page gives no publication date, last-update date or required Pydantic AI release.
Model names in examples do not establish their current availability. Changes to the capability, model profiles or provider support beyond this snapshot are unknown.
Actions
Check the main model’s actual file support and correct its profile where necessary. Choose a description model that accepts the remaining formats, then assess representative files for missing details, answer accuracy, latency and total usage.
Set a shared request limit, establish provider prices and decide how conversation history will be retained. Use ModelFallback when each candidate needs its own file-support decision. Confirm applicable licence and provider data terms separately.
