Service eligibility and regional restrictions
PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.
Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.
Key Takeaways
- The November 30 announcement raises the custom metadata allowance from five to 10 entries per request.
- Custom metadata has a 12,288-byte limit per request. The gateway drops trailing entries when it needs to fit that limit.
- Cloudflare-added reserved metadata does not count toward the 10 entries. The Access cf.user_id no longer displaces the last custom entry.
- Build tags used for spend or routing from trusted application context and confirm what AI Gateway saves.
How can a request with only six entries still lose a field?
Cloudflare’s November 30 update gives two limits. For a request with more than 10 custom entries, AI Gateway keeps the first 10. If those entries still exceed 12,288 bytes, it drops entries from the end until they fit. Even six entries with long values can exceed the byte limit.
The docs list string, number, and boolean values. Requests can carry JSON metadata in cf-aig-metadata. Check the UTF-8 byte count after serialization, including multilingual labels and other multibyte characters. Prefer short IDs and keep extended details in your application’s own records.
Does cf.user_id use one of the custom entries?
The announcement says Cloudflare-added reserved metadata counts toward neither the entry nor byte limit and no longer replaces the last custom entry. When a request reaches a custom domain protected by Cloudflare Access with a valid user subject, AI Gateway can record cf.user_id. The docs identify it as the verified Access JWT sub. Service-token requests and requests without a user subject do not receive it.
Keep custom keys out of the cf. namespace. The docs say AI Gateway strips customer-provided cf. keys before saving metadata. Use an application-defined name for your own user grouping and populate it from trusted sign-in or project context. Distinguish that tag from the Cloudflare-provided identity in the log.
How do I align log filters and spend rules?
Suppose a team uses project, environment, and cost_center for allocation, with extra keys for request type and other details. Decide which keys and value types the spend or route logic actually depends on. Keep those entries short and omit unnecessary descriptions or identifiers so the full payload consistently fits both limits.
Cloudflare lists log filtering, spend limits, and dynamic routing conditions as ways to use the tags. The higher allowance does not configure a rule. Decide which values the application sends, then verify the stored data and test the relevant condition. If a key is missing, check the outgoing metadata and saved log fields before editing the rule.
What should I verify before rollout?
Use a test gateway and synthetic metadata to compare the saved fields for requests with five and 10 entries. Then test one extra entry or a case with longer values, and check what remains. If you use Access, compare a user request on the protected custom domain with a service-token request.
Record value types, the entry order, and the request path during the check. If an older guide lists five entries, use the dated announcement and verify the behavior on your gateway. Keep only the tags your application needs so important fields are easy to track.
Sources
Frequently Asked Questions
Can a metadata value be a nested JSON object?
Use a string, number, or boolean for each value. Use a small set of flat fields for separate concepts and keep the serialized metadata within the byte limit.
Does a missing cf.user_id mean a custom field was truncated?
Check whether the request reached an Access-protected custom domain with a valid user subject. Service-token requests and requests without that subject can lack the field.