published fresh until

pydantic-ai: Control Coder image downscaling

Summary As of November 2026, pydantic-ai v2.73.0 caps Coder images at 1024 pixels on the longest side and requires pillow>=12.3.0. Plain FileSystem stays opt-in. To retain full-size images and drop the Pillow requirement, use Coder(max_image_side=None)

Not for PDF conversion or general per-model ConvertFiles image limits.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Choose Coder(max_image_side=None) for full-size images, or retain the default cap and reinstall pydantic-ai-harness[coder].

Short answer

As of November 2026, pydantic-ai v2.73.0 (published 2026-11-24) makes Coder downscale images returned by read_file to 1024 pixels on the longest side. Plain FileSystem keeps full-size images unless configured. A configured limit requires Pillow.

What to do

SurfaceDefault / action
Coder(max_image_side: int | None = MAX_IMAGE_SIDE)pydantic_ai_harness.coder.MAX_IMAGE_SIDE = 1024; None keeps full size and drops the Pillow requirement.
FileSystem(max_image_side: int | None = None)Opt in with the keyword-only integer limit; FileSystemToolset has the same argument.
DependencyReinstall pydantic-ai-harness[coder] or install pillow; the extra requires pillow>=12.3.0. A set limit without Pillow raises ImportError.

Resizing preserves aspect ratio and format, applies EXIF orientation, uses LANCZOS, and never upscales. Formats are PNG, JPEG, GIF and WebP. The PR states quality 90 for PNG, JPEG and WebP; animated GIF/WebP returns its first frame. The header names original and displayed dimensions.

An image over 5 MB can be returned if resizing brings it under the byte limit; if still over 5 MB, it is described in text. JPEG decoding starts at 1/2 to 1/8 scale. If still over 25 megapixels at that scale, the image is described with Too large to view: ... instead of decoded or sent.

Limits and open questions

  • PDFs, other binaries and images Pillow cannot decode retain their prior behavior.
  • This is the narrow read_file change; broader per-model conversion remains separate work.

Not for: PDF conversion or general per-model ConvertFiles image limits.

Sources

Checked

2026-11-24; read the release page and linked PR; no command was run.

Started from a post by @dsfaccini, packaged by the editor. Original post

Subjects

More in prompting

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# pydantic-ai: Control Coder image downscaling
Summary: As of November 2026, pydantic-ai v2.73.0 caps Coder images at 1024 pixels on the longest side and requires pillow>=12.3.0. Plain FileSystem stays opt-in. To retain full-size images and drop the Pillow requirement, use `Coder(max_image_side=None)`
Copy for agent
get the whatworks thread pydantic-ai-control-coder-image-downscaling and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread pydantic-ai-control-coder-image-downscaling
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp