PuppyIP Resource Center
Networking & Developer Tools 6 min Published 2026-10-10

Cloudflare Markdown for Agents now accepts 6 MiB: which response headers must clients update?

Cloudflare's HTML-to-Markdown conversion now accepts up to 6 MiB of decompressed HTML and streams the conversion at the edge. Agent clients need to update three assumptions: token-count headers are gone, Content-Length is removed, and cache validators for the original HTML no longer apply.

Cloudflare Markdown for Agents AI agents HTTP response headers HTML to Markdown

Service eligibility and regional restrictions

PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.

Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.

Key Takeaways

  • The 6 MiB limit applies to decompressed HTML bytes, not the compressed download or the resulting Markdown.
  • The feature is available to Pro, Business, Enterprise and SSL for SaaS customers, with no additional conversion charge. Existing plan fees still apply.
  • Conversion requires an enabled site, an HTML source response and an Accept request header that includes text/markdown.
  • Clients must count tokens themselves and read the response as a stream. Site operators should also check the origin's Content-Signal policy: the default includes ai-train=yes.

What does the higher 6 MiB limit actually cover?

Cloudflare announced on October 9 that Markdown for Agents now uses an in-process streaming engine at the edge. It starts processing HTML as it arrives, rather than buffering the full response and sending it to a separate service. The conversion limit also rises from 2 MiB to 6 MiB, or 6,291,456 bytes.

That limit applies to HTML after decompression. A small compressed download can still exceed it once decompressed; a shorter Markdown result does not make oversized source HTML eligible. The announcement does not specify an activation time for each site, so check your own configuration.

The current documentation lists Pro, Business, Enterprise and SSL for SaaS customers as eligible, with no additional charge for conversion itself. Existing plan fees still apply, and this does not establish the same eligibility for the Free plan.

Why might an Accept header still return HTML?

Content negotiation lets a client say which response format it wants. For this feature, the request's Accept header must include text/markdown, Markdown for Agents must be enabled for the site's Cloudflare zone, and the source response must be HTML.

A site administrator can select the relevant zone in the Cloudflare dashboard and enable the feature in AI Crawl Control. To enable it only for a particular subdomain or path, set the matching conditions in Configuration Rules and set Markdown for Agents to On.

The client should check that the actual response's Content-Type is text/markdown, rather than merely confirming that it sent the request. If the feature is not enabled, the source is not HTML or access is restricted, adding Accept does not replace site configuration or access authorization.

How do clients measure usage without token-count headers?

Conversion responses no longer generate x-markdown-tokens or x-original-tokens. Clients that previously read counts from those headers must calculate them themselves. A missing header does not mean zero tokens and, by itself, does not prove that conversion failed.

Once the complete content has arrived, count it using a method appropriate to the target model. To compare HTML and Markdown, retain each actual input and the basis for its count. The claim that the new engine reduces conversion overhead does not guarantee a fixed saving for every page.

How can a client tell the response is complete without Content-Length?

A streaming response cannot provide the final Markdown length in advance, so Cloudflare removes Content-Length instead of recalculating it. Clients should consume the stream using their HTTP library and process the complete document after the response ends normally.

Review code that allocates storage from the stated length or rejects responses without that header, while retaining read-size limits and timeouts. Its absence alone does not mean the body is incomplete. The original HTML length should not be used to validate the converted Markdown either.

What changes for caching, cookies and content-use policies?

Conversion changes Content-Type to Markdown and adds Accept to Vary while retaining the origin's existing Vary dimensions. This helps caches distinguish HTML and Markdown versions. Origin headers related to security, caching, cookies and CORS are preserved, so existing access permissions still apply.

Headers describing the original body, including ETag and Last-Modified, are removed because the converted result cannot honor their original conditional-request semantics. Clients using If-None-Match or If-Modified-Since should stop assuming that the original HTML validators will produce the same caching behavior for a Markdown response.

If the origin already provides content-signal, conversion preserves its content-use policy. Otherwise, the defaults added are ai-train=yes, search=yes and ai-input=yes, covering training, search and AI input respectively. Check that these settings match the site's intentions before enabling the feature; do not enable training by default merely to pursue GEO visibility.

Which page should you check first before integrating?

Consider a hypothetical team whose agent reads a product documentation page. The compressed download is only a few hundred KiB, but the decompressed HTML is 7 MiB. It still exceeds the new 6 MiB limit. Empty token-count headers should not be interpreted as zero cost or successful conversion. This example has not been executed.

First, confirm the enablement scope in a zone you are authorized to configure. Then request a known HTML page with the appropriate Accept header. Check Content-Type, Vary and the actual body, confirm that the client finishes reading the stream, and handle the missing token headers with local counting logic.

Next, inspect cache validation behavior and the actual Content-Signal value, retaining unexpected responses alongside the original HTML for comparison. Format conversion does not prove that a model understands the page, that a search engine has indexed it or that an AI system has cited it. If the result matters to a task, also check that the converted body preserves the information the task needs.

Sources

Frequently Asked Questions

Does HTML over 6 MiB always get truncated or return a fixed error code?

The announcement and documentation reviewed state the size limit, but these passages do not promise a universal error code, truncation behavior or fallback. Inspect and retain the actual response rather than treating one observed behavior as a rule for every site.

Can this also convert PDFs or pages that require JavaScript rendering?

Markdown for Agents currently converts only HTML. Cloudflare separately lists Workers AI's AI.toMarkdown() for multiple document types and Browser Run's /markdown for pages that must first render in a real browser. Those are different interfaces, and their eligibility and pricing cannot be assumed to match this feature.

Is a page's JSON-LD discarded during conversion?

The documentation says JSON-LD from the source HTML is preserved at the end of the Markdown, while other scripts and styles are removed. Metadata front matter is emitted only when supported meta fields exist in the source. Conversion cannot supply a title or description that the original page does not contain.