Driftwatch

Cloudflare / Cloudflare API /

Breakingdirection flip: their tools call this safe

type can now return "d1"

What changed

Producer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums.

Affects result.type on POST /accounts/{account_id}/ai-search/instances.

New value: d1.

can now return "d1"

Who is affected

Code that reads POST /accounts/{account_id}/ai-search/instances (result.type).

Before and after

WhereBeforeAfter
POST /accounts/{account_id}/ai-search/instances · result.type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
GET /accounts/{account_id}/ai-search/instances · result[].type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
GET /accounts/{account_id}/ai-search/instances/{id} · result.type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
PUT /accounts/{account_id}/ai-search/instances/{id} · result.type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
DELETE /accounts/{account_id}/ai-search/instances/{id} · result.type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
GET /accounts/{account_id}/ai-search/namespaces/{namespace}/instances · result[].type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
POST /accounts/{account_id}/ai-search/namespaces/{namespace}/instances · result.type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
GET /accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id} · result.type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
PUT /accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id} · result.type"r2", "web-crawler", null"d1", "r2", "web-crawler", null
DELETE /accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id} · result.type"r2", "web-crawler", null"d1", "r2", "web-crawler", null

Code that breaks

switch (response.result.type) {
  // existing branches …
  // no branch for "d1"
  default:
    throw new Error("unexpected type");
}

Based on Cloudflare’s published API specification. How severity is decided.