Skip to main content
ChatCLI reads PDFs on every provider. Attach one and the model answers from it: in chat, /coder, one-shot (-p), the web UI, ACP editors and the gateway channels (Telegram, WhatsApp, Slack, Discord, webhook).

How to attach

Point @file at a PDF. It is attached as a document, never pasted as raw bytes:
In /coder, the model can open a PDF on its own with @view, the same tool it uses for images:
The document joins the next turn, so the model reads it in full (scanned pages included, on models that read PDFs natively).

How each provider receives it

The decision is made per provider and per model, when the message is sent:
  • Native: the model gets the PDF itself: text, tables, charts and scanned pages.
  • Extracted text: ChatCLI extracts the text locally (pure Go, no external tool), page by page with --- page N --- markers, so the model can cite pages.
A PDF above a provider’s native limit is sent as text instead: 32 MB for Anthropic, 20 MB for Bedrock InvokeModel, 4.5 MB for Bedrock Converse (up to 5 documents), 50 MB for the others, and at most 100 pages natively.

Scanned PDFs on a text-only model

A scanned PDF has no text layer, so there is nothing to extract. When one goes to a model without native PDF input, ChatCLI asks a configured model that does read PDFs to transcribe it first (the current provider, then any other configured one). That pass includes figures and diagrams, described briefly. The transcription is what the current model receives:
If no configured model can read it, you are told, and the model is instructed not to guess the content.
CHATCLI_VISION_PROVIDER / CHATCLI_VISION_MODEL also pick the model used for this transcription, when that model reads PDFs.

Everywhere else PDFs are read

A PDF that arrives from the web UI or an RPC client is also saved under ChatCLI’s private state directory, and its path goes to the model, which can read it again later with @read.

Configuration

A model can also be marked in the catalog with the capability pdf (force native) or no_pdf (force text). Limits on extraction: 50 MB per attached PDF, up to 500 pages and 2 million characters of text, 60 seconds. Password-protected PDFs are still attached for native models, which may open them; text extraction cannot read them.

Image Input (Vision)

Attach images: the same per-provider approach.

Environment variables

Every setting in one place.