showcase/integrations/pydantic-ai/qa/multimodal.md
/demos/multimodal/api/health)OPENAI_API_KEY setpublic/demo-files/sample.png and public/demo-files/sample.pdf
present (copied over from the langgraph-python reference assets)/demos/multimodal<CopilotChat /> renders a message composersample.png
appears in the composersample.pdf
appears in the composerbefore_model middleware. The equivalent behaviour is implemented via
a PydanticAI history_processors hook that rewrites incoming binary
parts into image_url (for GPT-4o vision) or extracted text (for
PDFs via pypdf) before each model call. Functionally equivalent to
the langgraph-python reference.onRunInitialized shim (rewriting modern
image/document parts into legacy binary parts) is framework-agnostic
and kept intact so the Python-side history processor sees the same
wire shape the langgraph-python reference does.