# Cloudflare D1 Adds AI Search Source, Caps Results at 50 MB

> Source: <https://shattered.io/cloudflare-d1-ai-search-data-source-50-mb-result-cap/>
> Published: 2026-11-14 08:14:39+00:00

Cloudflare turned **Cloudflare D1** into a retrieval source for AI apps on November 12, 2026, when AI Search began accepting D1 databases as a data source in beta. The same day brought export support for virtual tables, and eight days earlier a hard 50 MB ceiling on query results took effect.

Those three changes sit on top of a busy autumn for Cloudflare’s developer data stack. [Cloudflare launched Basin](https://www.cloudflare.com/press/press-releases/2026/cloudflare-launches-basin-a-more-open-and-accessible-data-platform-for-developers/) as a generally available analytics platform on October 1, split the old Pipelines and R2 analytics names into a new brand, and kept D1 as the separate serverless SQL database for application data.

Developers now face a mix of good news and sharp edges. D1 gained an AI role, yet a 50 MB result limit can break lazy queries, and the pricing keeps a $5 floor with generous allowances. The [Cloudflare Workers pricing](https://shattered.io/cloudflare-workers-pricing-vs-lambda-azure-functions-cloud-run-2026/) model carries all of it, so the details of what shipped, what it costs and what comes next decide how teams plan the winter.

Don't miss new tech stories on Google

Add Shattered once in the Google app and our stories show up in your news suggestions.

[Add now](https://www.google.com/preferences/source?hl=en&q=https%3A%2F%2Fshattered.io%2F)

## Cloudflare D1 Becomes an AI Search Source in Beta

The headline change is simple to state. On November 12, 2026, Cloudflare’s changelog listed D1 databases as a supported data source for AI Search, marked beta. A developer points AI Search at a D1 database and supplies a read-only query. AI Search runs it and indexes each returned row as a document.

That design matters because most application data already lives in rows. Product catalogs, support tickets, knowledge base entries and customer records sit in SQL tables, and teams have had to export them to a separate vector store before an AI feature could search them. With D1 as a source, the path from table to searchable index shrinks to a query and a configuration change.

Cloudflare describes the integration as read-only, so AI Search never writes back to the database. That limits the blast radius if a query is wrong. One report on the feature adds that returned rows are re-synced on a schedule, though that detail comes from a single source and developers should confirm it in the docs before relying on it.

The billing side deserves attention too. AI Search billing, originally set to begin November 1, moved to December 1, 2026. Any team that wires D1 into AI Search during the beta gets about two weeks of runway before metering starts, and should budget for it.

## What Changed in D1 Over Six Weeks

D1 did not receive one big release. It received a string of small, dated changes that together alter how teams should run it. The table below collects the ones Cloudflare’s own documentation confirms.

| Date (2026) | Change | Who feels it | 
|---|---|---|
| Sep 1 | Workers Free accounts get errors after passing daily D1 row-read or row-write limits | Hobby projects and demos | 
| Oct 1 | Basin goes generally available, with analytics products renamed | Teams running event pipelines | 
| Oct 23 | Undelete API accepts only databases deleted in the previous 7 days | Anyone recovering dropped databases | 
| Nov 4 | Queries with results over 50 MB are rejected | Reporting and export jobs | 
| Nov 6 | Docs add guidance on slow queries, including `wrangler d1 insights` | Teams tuning cost | 
| Nov 12 | AI Search supports D1 as a data source (beta) | AI app builders | 
| Nov 12 | Export works for databases with virtual tables (FTS5, R*Tree) | Search and geo features | 

Read as a group, the changes point one way. Cloudflare is tightening operational edges (limits, recovery windows, enforcement) while widening what D1 connects to. That pattern usually signals a product moving from experiment toward infrastructure that customers run production workloads on.

The virtual table export fix is easy to overlook, yet it removes a real blocker. SQLite full-text search tables (FTS5) and spatial indexes (R*Tree) could not be exported before, which made backups and migrations awkward for apps that used them. Now a database holding those tables can leave D1 cleanly, which lowers lock-in worries for teams comparing options.

## The 50 MB Result Cap and What Breaks

Since November 4, 2026, D1 rejects any query whose result exceeds 50 MB. Cloudflare’s changelog describes it as enforcement of a maximum query-result size, and a query that crosses the line now fails instead of returning data.

### Who hits the limit first

Admin dashboards, CSV export endpoints and nightly sync jobs are the usual suspects. A `SELECT *` against a wide table with text or JSON columns can cross 50 MB with far fewer rows than developers expect. A table of 100,000 rows at 600 bytes per row already lands at 60 MB, simple arithmetic that is easy to miss when testing with small seed data.

### Practical fixes

Three habits keep queries under the ceiling. Select only the columns the caller needs. Paginate with keyset conditions instead of large offsets. Push bulk analytics out of D1 entirely and into a system built for scans. Cloudflare’s own November 6 documentation update points the same direction, recommending batched statements and close monitoring of rows read and rows written.

```
wrangler d1 insights
```

That command, plus the `cf sql query` helper Cloudflare documents, surfaces slow and expensive queries. Run it before the next billing cycle, because a query that scans millions of rows costs money even when it never trips the size cap.

## D1 Pricing and Limits in November 2026

D1 pricing carries no separate compute charge. Cloudflare’s documentation says the database scales to zero and bills for usage and storage, with Workers execution costs counted separately. That model rewards spiky workloads and punishes inefficient queries, because every row read adds to the meter.

| Item | Workers Free | Workers Paid ($5 minimum) | 
|---|---|---|
| Rows read | 5 million per day | 25 billion per month, then $0.001 per million | 
| Rows written | 100,000 per day | 50 million per month, then $1.00 per million | 
| Storage | 5 GB total | 5 GB, then $0.75 per GB-month | 
| Databases | 10 | 100,000, then $0.10 per database per month | 
| Past the limit | Errors until midnight UTC reset | Usage billing | 
| Separate compute charge | None | None | 

The per-database line deserves a closer look. Cloudflare pitches D1 for separate databases per user, tenant or project, and the Paid plan covers 100,000 of them. A SaaS product with 150,000 tenant databases would pay for 50,000 extra, which comes to $5,000 per month in database fees alone before any query or storage charges.

Writes are the expensive axis. At $1.00 per million rows written beyond the included 50 million, a job that inserts 150 million rows in a month adds $100. Reads cost a thousandth of that, so read-heavy designs stay cheap while write-heavy ingestion belongs in a pipeline built for it. Workers Free accounts hit hard stops instead of bills, and the stored data stays safe when the daily allowance runs out.

Cloudflare also reportedly cut latency for D1 access, with one account citing 50 to 500 ms less on some REST API requests and up to 60% lower end-to-end latency through the Workers API after reducing network round trips. Treat those figures as vendor claims from a single report until independent tests appear.

## Basin Is Separate From D1

Confusion between the two products is the most common mistake in coverage this month. D1 is Cloudflare’s serverless SQL database, built on SQLite semantics and reachable from Workers or over an HTTP API. Basin targets large-scale analytics on top of R2 object storage. Cloudflare’s Connect 2026 session on November 3 presented them as separate products, and nothing in its documentation says Basin replaces D1.

When [Cloudflare Basin went generally available](https://shattered.io/cloudflare-basin-serverless-data-platform-ga-2026/) on October 1, the company also renamed several products. The old Cloudflare Data Platform became Basin, and three components picked up new labels.

| Former name | Current name | What it does | 
|---|---|---|
| Cloudflare Data Platform | Cloudflare Basin | Umbrella for the analytics products | 
| Cloudflare Pipelines | Basin Pipelines | Ingests events from Workers, HTTP and Logpush, transforms them with SQL, writes Iceberg tables or R2 files | 
| R2 Data Catalog | Basin Catalog | Manages Apache Iceberg metadata and table maintenance such as compaction | 
| R2 SQL | Basin SQL | Serverless distributed SQL over Iceberg tables | 

One official documentation line carries real weight for anyone sizing a pipeline: “Basin Pipelines streams can ingest up to 1 GB/s each, increased from the previous 5 MB/s limit.” That is a roughly 200-fold jump in per-stream throughput, and it moves Basin from a demo tier toward high-volume log and event workloads.

Cloudflare’s own framing of the product comes through in its launch release. “With Cloudflare Basin, we are bringing the same serverless model that developers expect from Cloudflare to analytics: no clusters to manage, no unnecessary data movement, and open standards that keep customers in control of their data,” the company said in the Basin announcement. A customer quoted in the same release pointed to “production-grade reliability and a fraction of the cost thanks to zero egress fees.”

Pricing for Basin does not follow D1 or Workers rates, and the two should never be conflated in a budget. R2’s pricing documentation says Basin Catalog adds charges for catalog operations and for compaction data processed, on top of ordinary R2 storage and operation fees. Cloudflare says Basin SQL is priced serverlessly, meaning pay for usage with no cluster costs.

## Workers AI: Fine-Tuning, Clef and the Pricing Shift

Workers AI shares the Workers plan with D1, and it changed as much as the database did. On October 1, Cloudflare announced Clef and Clef-flash, open-source decision models hosted on Workers AI, along with a reinforcement-learning fine-tuning platform that lets developers tune decision models on their own data. On October 9 it added Clef-omni, which handles audio, video, images and text in one pipeline, and cut the price of Clef-flash. The [Clef-omni model](https://shattered.io/cloudflare-clef-omni-30b-decision-model-2026/) is the multimodal entry in that family.

A newer hosted model followed. Clairic launched as a preview on October 19 under the identifier `@cf/cloudflare/clairic`. Cloudflare’s catalog lists 50+ open-source models, and a release-notes aggregator shows Inkling 2 Small and EmbeddingGemma 2 arriving on November 12, though that listing is a secondary source.

Fine-tuning has two layers. Workers AI supports inference with LoRA adapters, which one account describes as still in open beta. The reinforcement-learning platform is the newer route and applies to Cloudflare’s decision models. Developers should not assume the two share tooling or pricing, since Cloudflare has not published a dated fine-tuning price schedule.

Pricing itself changed shape in mid-November. Workers AI is included in both Workers Free and Workers Paid. The free tier gives 10,000 Neurons per day, resetting at 00:00 UTC, and Paid usage beyond that costs $0.011 per 1,000 Neurons. By November 12, Cloudflare’s documentation described pricing as more granular and per model, presented in token-based units, while Neurons remain the unit used for backend billing.

Rate limits matter for frontier models. Cloudflare’s changelog lists 20 requests per minute under standard Workers AI billing and 50 requests per minute with prepaid AI Gateway credits for selected models. Teams that route traffic through [Cloudflare AI Gateway](https://shattered.io/cloudflare-ai-gateway-setup-2026/) get the higher ceiling, plus per-user and per-model budgets.

## The GLM-5.3 Incident: A Security Check on Hosted Inference

Hosted models carry a risk that databases do not. On October 26, 2026, Cloudflare publicly disclosed a cross-request KV-cache exposure involving the GLM-5.3 model on Workers AI, a case where data from one request could surface in another. It recommended that operators running SGLang use version 0.5.22 or later, and it stated that no other Workers AI model was affected.

Details come from a single report, so treat them with care. That account says 155 responses were affected, all involving prompts longer than 681,280 tokens, and that the model was taken offline, patched and restored on September 9. If accurate, the exposure window was narrow and tied to very long prompts. Even so, the pattern is the one security teams worry about most in multi-tenant AI hosting, where shared cache memory crosses customer boundaries.

The takeaway for D1 users who feed rows into AI Search is practical. Do not index columns holding secrets, personal identifiers or tokens, because any retrieval layer widens the set of places that data can leak. Select only the fields a search feature needs, and keep sensitive tables out of the query that AI Search runs.

## The Nov. 20 Model Cutoff Developers Must Plan For

On November 5, 2026, Cloudflare announced a refresh of the Workers AI model catalog. Older models face deprecation, and applications must remove references to them before November 20, 2026. The original date was November 15, and Cloudflare pushed it back by five days, according to the [AgentDeals weekly pricing digest](https://agentdeals.dev/digest/2026-w46).

After the cutoff, affected models are expected to return HTTP 410 Gone with error code 5028. Cloudflare has not named every affected model in the sources reviewed here, and one report puts the count at 24 models. That figure is unconfirmed by an official Cloudflare page, so check the changelog for the exact list.

The failure mode is the real risk. A hard 410 error in production looks like an outage from the user’s side, and no fallback model will kick in unless the code supplies one. A defensive pattern works well here: keep model identifiers in configuration, wrap calls in a handler that catches 410 responses, and fall back to a current model from the catalog.

Two other dated changes land close together. Workers using compatibility date 2026-11-17 or later get the new module registry by default, so teams bumping that date should test imports first. And Workers Logs move to Cloudflare Observability pricing on December 1, a shift the [Cloudflare observability pricing change](https://shattered.io/cloudflare-pricing-observability-dec-1-ai-search-nov-1-2026/) already flagged for log-heavy accounts.

```
compatibility_date = "2026-11-17"
```

## Cost Controls: Spend Management and AI Gateway Budgets

Usage-based billing creates surprise invoices, and Cloudflare moved to address that on November 13, 2026. It launched Spend Management in beta for pay-as-you-go customers, initially covering Workers and Durable Objects. The announcement also noted that AI Gateway supports per-user and per-model budgets for Workers AI and other AI providers.

The timing makes sense. D1 rows read, Workers AI Neurons and Basin operations all bill by usage, and an AI feature wired to a runaway loop can burn through allowances in hours. Budgets give finance and engineering teams one place to set a ceiling.

Spend Management currently covers only part of the platform. D1 and Workers AI charges are not listed among its first-wave coverage, which means teams still need their own alerts on rows read and Neurons consumed. Until coverage widens, a weekly review of D1 analytics (query volume, latency and storage size across an account or a single database) is the cheapest control available.

Workers pricing offers a useful reference for the compute side. Workers Standard charges $0.30 per million requests past 10 million included, and $0.02 per million CPU milliseconds past 30 million included. Those lines come from Cloudflare’s pricing page, last updated November 13, 2026.

## Competitive Comparison: Where D1 Sits Against Edge Rivals

D1’s strength is proximity. It sits beside the Workers runtime, so a request can reach SQL without leaving Cloudflare’s network, and it bills without a compute meter. That puts it in a different bracket from traditional managed databases, which typically bill by provisioned capacity and need connection handling from short-lived functions.

The tradeoffs are equally clear. D1 follows SQLite semantics, so teams used to PostgreSQL features will find gaps. Query results cap at 50 MB. Undelete works only inside seven days. A heavyweight analytics job belongs in Basin or an outside warehouse, not in D1.

Against rival edge platforms, the data layer is where Cloudflare keeps pulling ahead of function-only competitors. A comparison of [Cloudflare Workers against AWS Lambda@Edge](https://shattered.io/cloudflare-workers-vs-aws-lambda-edge-2026/) shows how much of the edge story depends on cold starts and runtime reach. Data placement adds another axis, since a fast function that waits on a distant database loses its advantage.

Fastly and Vercel offer their own edge runtimes and storage options. Readers weighing them should check the [Workers versus Fastly Compute pricing](https://shattered.io/cloudflare-workers-vs-fastly-compute-pricing-2026/) breakdown and the [Workers versus Vercel Edge](https://shattered.io/cloudflare-workers-vs-vercel-edge-2026/) comparison for plan-level numbers, then test the database path under real load.

## Historical Context: From Standard Pricing to a Data Platform

Cloudflare spent years as a network and security company before it became a place to run application code. A key pricing moment came on March 1, 2024, when Workers on the older Bundled usage model migrated to Standard pricing, and Cloudflare added a 50 ms CPU limit to affected Workers. That change set the pattern of usage-based pricing that D1 and Workers AI inherit today.

D1 followed as the SQL layer for Workers. R2 arrived as object storage with free egress, a design that went after a cost cloud customers had long accepted. Basin extends the R2 idea upward into analytics, which explains why the former R2 Data Catalog and R2 SQL products moved under the Basin name on October 1, 2026.

The current round of limits and deadlines also fits history. Fast-growing platforms tend to loosen constraints early and tighten them as production traffic arrives. The 50 MB result cap, the seven-day undelete window and the Free-plan hard stops all carry that signature. Each protects shared infrastructure, and each shifts work onto developers.

## Market Impact for Teams Building on Workers

The practical effect lands on three groups. Startups running on the $5 Paid plan gain an AI path for their existing data without adding a vector database. Platform teams get new cost controls but also new deadlines. Data engineers get a cleaner split between application storage and analytics, as long as they respect it.

For new builds, the baseline stack is now easy to describe. Workers handle requests, D1 stores relational state, R2 holds files, Basin handles analytics at scale, and Workers AI plus AI Search adds retrieval and inference. Teams following the [secure Workers API deployment steps](https://shattered.io/deploy-secure-cloudflare-workers-api-2026/) can add D1 in an afternoon, and the [Workers setup walkthrough](https://shattered.io/cloudflare-workers-setup-guide/) covers account basics for newcomers.

Buyers watching the wider [cloud computing](https://shattered.io/category/cloud-computing/) market should read this as a bundling play. One plan, one dashboard and one bill cover compute, SQL, storage, analytics and inference. Rivals often sell the same pieces as separate services with separate meters, which gives Cloudflare an easy pitch for small and mid-size teams.

Risk follows the same logic. Concentrating data and AI on one vendor raises switching costs, though the virtual-table export fix and Basin’s Apache Iceberg format both soften that. Iceberg tables are readable by other engines, and SQLite exports are portable, so an exit path exists if pricing or limits shift.

## Predictions for D1 and the Cloudflare Data Stack

- **AI Search with D1 reaches general availability within a few months.** Billing starts December 1, and billing usually arrives before a beta label drops.
- **More first-party data sources follow D1.** If a SQL database works as a source, other Cloudflare storage products are the obvious next candidates.
- **Spend Management widens to D1 and Workers AI.** Usage meters without ceilings block adoption, and Cloudflare just showed it knows that.
- **The Workers AI catalog keeps churning.** The November 20 cutoff is unlikely to be the last, so fallback logic becomes standard practice.
- **Result and size limits stay.** The 50 MB cap exists to protect shared infrastructure, and raising it would cut against that purpose.

None of these rests on a confirmed Cloudflare roadmap. The confirmed dates come first: fix large queries before they fail, move model identifiers to configuration before November 20, and set budget alerts before December 1.

## FAQ

**What did Cloudflare announce for D1 on November 12, 2026?**

Two things. AI Search now supports D1 databases as a data source in beta, and D1 databases containing virtual tables such as SQLite FTS5 and R*Tree tables can now be exported.

**Is Cloudflare Basin replacing D1?**

No. Cloudflare presents them as separate products. D1 is the serverless SQL database for application data, while Basin handles large-scale analytics on R2 and Apache Iceberg. Nothing in the documentation reviewed says D1 was renamed or retired.

**How much does D1 cost on the Workers Paid plan?**

The plan has a $5 monthly minimum and includes 25 billion rows read, 50 million rows written, 5 GB of storage and 100,000 databases. Overage runs $0.001 per million reads, $1.00 per million writes, $0.75 per GB-month and $0.10 per extra database.

**What happens when a D1 query returns more than 50 MB?**

It fails. D1 began enforcing a 50 MB maximum query-result size on November 4, 2026. Select fewer columns, paginate, or move bulk analytics to Basin.

**When do older Workers AI models stop working?**

Cloudflare set November 20, 2026 as the deprecation date, moved from November 15. Affected models are expected to return HTTP 410 Gone with error code 5028. Check the changelog for the exact list of models.

**Is Workers AI free to try?**

Workers Free includes 10,000 Neurons per day, reset at 00:00 UTC. Paid usage beyond the allowance costs $0.011 per 1,000 Neurons, though documentation now shows more granular per-model pricing.

**Can I recover a deleted D1 database?**

Only recently deleted ones. Since October 23, 2026, the undelete API accepts requests for databases deleted within the previous 7 days.
