Skip to content
Back to feed

November 30, 2026 · Cloudflare

AI Gateway - Send up to 10 custom metadata entries per request

What changed

AI Gateway custom metadata: Limit raised from 5 to 10 entries per request; added metadata no longer counts.

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.

Get the week’s Cloudflare changes in one email

Free, every Monday: only what changed in Cloudflare that week. We email you a link to confirm.

See last week’s digest

Free. Unsubscribe any time.

All AI Gateway changes