Cloudflare raises custom metadata limit in AI Gateway
Published:
Cloudflare AI Gateway now stores up to ten custom metadata entries per request, up from five. Entries can be used for log filtering, spending limits and routing conditions.
Cloudflare has increased the number of custom metadata entries stored per request in AI Gateway from five to ten. Teams can use the additional fields for log filtering, spending limits and dynamic routing conditions. Metadata added by AI Gateway itself, including the Access user ID, no longer counts against the limit or replaces the final custom entry. Custom metadata is subject to a total limit of 12,288 bytes per request. When that limit is exceeded, the service removes entries from the end until the remainder fits. Cloudflare documents how to pass the values in the relevant request header.
Why it matters
Platform teams can pass more context, such as project or environment, for filtering and routing. The documented byte limit remains important when designing requests with large metadata values.
Source retrieved: 2026-12-03