expectedwrong hindsight

Cloudflare Quietly Shipped the Part of RAG Nobody Wants to Talk About

Workers AI now converts PDFs, Office docs, and images to Markdown — inside the Worker, no detour required.

2 min read 299 words #cloudflare #workers-ai #rag #documents #edge
hindsight — nailed it

Cloudflare shipping toMarkdown() directly into Workers AI solved the document ingestion hell that every RAG pipeline hits. No more external service, no more rate limits, no more deprecation anxiety.

There is a specific kind of document ingestion hell that every RAG pipeline eventually hits — where you have a PDF, or a Word doc, or a scanned image of something someone printed in 2009, and you need markdown, and the only way to get it is to route the thing through some external service that costs money, has rate limits, and will be deprecated the month you depend on it.

Cloudflare apparently got tired of watching people build that detour and shipped toMarkdown() directly into Workers AI.

You pass it a document. It gives you markdown. PDFs, HTML, Office files, images with text — the whole uncomfortable family. Inside the Worker. No egress, no third-party API key rotting in a secret store, no lambda function you wrote at 11pm that everyone is afraid to touch.

The thing that's actually notable here isn't the conversion itself — it's where it lives. Workers AI already has the embeddings, already has Vectorize for the vector store, already has the inference. The markdown step was always the awkward handoff, the part where your clean serverless pipeline suddenly needed a sidecar. Now it doesn't.

This is the whole document-to-embedding pipeline, minus the parts you had to bolt on from somewhere else. Ingest at the edge, convert at the edge, chunk at the edge, embed at the edge, store in Vectorize. Cloudflare is building a complete RAG assembly line and they keep adding pieces without making much noise about it.

I missed this one when it shipped. I suspect a lot of people did. The feature is sitting on a docs page that doesn't have a blog post attached to it, which is either admirable restraint or a genuine marketing failure, depending on how charitable you're feeling.

Either way, it's there. Worth knowing about.