Skip to content

Documentation on Images is Misleading #3109

@maximepeabody

Description

@maximepeabody

Initial Checks

Description

When working with local images, the BinaryContent type is misleading. Docs make it seem like this abstracts away file upload with the model provider, but instead it seems to pass the raw data as string in the prompt, which quickly consumes the entire token context window.

Example Code

Python, Pydantic AI & LLM client version

pypdantic-ai 1.0.15
gemini client (tried openai as well)
python 3.11.9

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions