Cloudflare AI Gateway Doubles Its Custom Metadata Limit: What to Check

Cloudflare raised the number of custom metadata entries AI Gateway saves per request from five to ten on November 30, 2026. For teams running several AI features through one gateway, that means fewer trade-offs between the fields they want in their logs and the fields they use for spend controls or routing. It doesn’t mean every request needs ten labels. The useful change is that you can keep the few labels your team relies on without squeezing unrelated information into a single field. Cloudflare changelog
What changed
The new limit applies to custom metadata. Fields added by the gateway itself, such as the Cloudflare Access user identifier cf.user_id, no longer take up one of those slots or replace your last custom entry. There’s also a separate size limit: Cloudflare documents a ceiling of 12,288 bytes per request for custom metadata. If the metadata exceeds that size, the gateway drops entries from the end until the remaining entries fit. Ten short labels and ten long values are therefore not equivalent. Cloudflare changelog
Which fields to keep
Start with the questions you actually need to answer. Which feature generated the request? Was it a production or staging call? Which team should review the spend? Labels like feature, environment, and cost_center are more useful for those questions than a free-text note that changes with every request.
Keep values short and predictable. For example, pick production or prod and use it consistently, so a saved filter doesn’t miss half your traffic. Avoid putting prompts, customer emails, API keys, or support-ticket text in metadata. A label should tell your team how to group a request, not reproduce the request’s contents.
A worked example: Support replies and catalog descriptions
Imagine an online store using the same gateway to draft support replies and product descriptions. Both features already send five labels: team, project, environment, region, and cost_center. The store wants to add feature without dropping a label used by an existing report.
In staging, send one request tagged feature: support_reply and a second tagged feature: catalog_description. Keep the other five labels the same. In the logs, confirm that both requests retain all six fields and that filtering by feature separates them. If the store later uses that field in a spend limit or routing condition, test that behavior separately. Seeing a value in the log confirms it was recorded; it doesn’t prove a rule acted on it.
How to verify the change before rolling it out
- List the metadata keys your applications send and note which filters, budgets, or routing rules depend on them.
- Choose one staging integration. Add one short label that would answer a question you can’t answer today.
- Send a representative request and check the stored metadata. Verify the new label and the fields your existing rules already rely on.
- If an application sends unusually long values, shorten them before adding more fields. Recheck the stored result rather than assuming every submitted entry survived.
If the team can already answer its operational questions with five fields, there’s nothing it needs to add. The update is most useful when it lets you separate two things you previously had to combine, such as which team owns the request and which feature generated it.



