{"slug": "breaking-cloudflare-type-can-now-return-d1", "title": "Cloudflare: type can now return \"d1\"", "summary": "Cloudflare's AI Search API can now return \"d1\" as a value for result.type on POST /accounts/{account_id}/ai-search/instances, adding to the existing \"r2\", \"web-crawler\" and null values. The change, described as additive by producer-side tools, also applies to the GET, PUT and DELETE instance endpoints and to the namespaced instance endpoints, and breaks exhaustive switches, strict parsers and generated client enums that lack a \"d1\" branch.", "body_md": "## What changed\n\nProducer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums.\n\nAffects `result.type` on `POST /accounts/{account_id}/ai-search/instances`.\n\nNew value: `d1`.\n\ncan now return \"d1\"\n\n## Who is affected\n\nCode that reads POST /accounts/{account_id}/ai-search/instances (result.type).\n\n## Before and after\n\n| Where | Before | After | \n|---|---|---|\n| POST /accounts/{account_id}/ai-search/instances · result.type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| GET /accounts/{account_id}/ai-search/instances · result[].type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| GET /accounts/{account_id}/ai-search/instances/{id} · result.type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| PUT /accounts/{account_id}/ai-search/instances/{id} · result.type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| DELETE /accounts/{account_id}/ai-search/instances/{id} · result.type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| GET /accounts/{account_id}/ai-search/namespaces/{namespace}/instances · result[].type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| POST /accounts/{account_id}/ai-search/namespaces/{namespace}/instances · result.type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| GET /accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id} · result.type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| PUT /accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id} · result.type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n| DELETE /accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id} · result.type | \"r2\", \"web-crawler\", null | \"d1\", \"r2\", \"web-crawler\", null | \n\n## Code that breaks\n\n```\nswitch (response.result.type) {\n  // existing branches …\n  // no branch for \"d1\"\n  default:\n    throw new Error(\"unexpected type\");\n}\n```\n\nBased on Cloudflare’s published API specification. [How severity is decided](https://driftwatch.et/method).", "url": "https://wpnews.pro/news/breaking-cloudflare-type-can-now-return-d1", "canonical_source": "https://driftwatch.et/changes/cloudflare-2026-11-11-096291e2", "published_at": "2026-11-11 19:47:46+00:00", "updated_at": "2026-11-12 07:52:42.483327+00:00", "lang": "en", "topics": ["ai-search", "ai-products", "developer-tools"], "entities": ["Cloudflare"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/breaking-cloudflare-type-can-now-return-d1", "markdown": "https://wpnews.pro/news/breaking-cloudflare-type-can-now-return-d1.md", "text": "https://wpnews.pro/news/breaking-cloudflare-type-can-now-return-d1.txt", "jsonld": "https://wpnews.pro/news/breaking-cloudflare-type-can-now-return-d1.jsonld"}}