// AI Platform Drift

AI Gateway saves up to 10 custom metadata entries per request

Cloudflare developer changelog · published 2026-12-01 00:22 UTC
WORTH KNOWING Check, no change needed LimitsAPI
WHAT CHANGEDAI Gateway now saves up to 10 custom metadata entries per request, increased from 5. System-added metadata such as cf.user_id no longer counts toward this limit and no longer replaces user entries. Custom metadata is capped at 12,288 bytes per request; entries exceeding this are removed from the end until the remainder fits.
WHY IT MATTERSApplications sending more than 5 custom metadata fields can now use all of them for log filtering, spend limits, and dynamic routing without losing entries to system metadata. Applications exceeding 12 KB of metadata will have entries silently truncated.
WHAT TO DOReview metadata payloads in AI Gateway requests. If you send more than 5 fields or rely on fields that were previously dropped, verify they now appear in logs and routing conditions. If payloads approach 12 KB, add size checks to prevent silent truncation.
Model-reported confidence 85% (not measured accuracy) Primary source ↗ Summary drafted by an AI model and checked by RADAR's rules
Show the reasoning — raw diff, triage verdict, confidence
RAW DIFF
+## AI Gateway - Send up to 10 custom metadata entries per request
+https://developers.cloudflare.com/changelog/post/2026-11-30-custom-metadata-limit/
+Mon, 30 Nov 2026 00:00:00 GMT
+
+AI Gateway now saves up to 10 custom metadata entries per request, up from five. You can use the extra entries in log filtering, spend limits and dynamic routing conditions.
+Metadata that AI Gateway adds, such as the Access user ID cf.user_id, no longer counts toward the limit and no longer replaces your last entry.
+Custom metadata can be up to 12,288 bytes (12 KB) per request. If it is larger, AI Gateway removes entries from the end until the rest fit.
+--header 'cf-aig-metadata: {"team": "AI", "user": 12345, "project": "chat", "cost_center": "cc-42", "env": "prod", "region": "us", "tier": "pro"}'
+For details, refer to Custom metadata.
HOW IT WAS JUDGED
Triage signals below are model-reported assertions, preserved verbatim; they are not independent arithmetic verification.
triage verdictMaterial (MATERIAL) at 0.92, needed 0.5
triage reasoningQuota increase and functional change affecting API usage patterns and feature availability.
signalslimit increased: custom metadata entries per request 5 → 10 · behavior change: system-added metadata no longer counts toward limit · new capability: metadata usable in log filtering, spend limits, dynamic routing · size constraint stated: 12,288 bytes per request
suppression—
triage modelanthropic/claude-haiku-4.5 ($0.00000)
writer modelanthropic/claude-sonnet-4.5 ($0.00000)