← 一覧へ

AI Gateway、カスタムメタデータを1リクエスト最大10件まで保存可能に

原題: Send up to 10 custom metadata entries per request

changelog / AI / AI Gateway / 2026/11/30 09:00 JST

sendper

要約

CloudflareのAI Gatewayで、1リクエストあたりに保存できるカスタムメタデータが従来の5件から最大10件に増えた。追加したメタデータはログのフィルタリングや利用上限、動的ルーティング条件に利用できる。あわせて、AI Gatewayが自動で付与するcf.user_idなどのメタデータは上限にカウントされなくなり、最後のエントリを上書きすることもなくなった。カスタムメタデータは1リクエストあたり最大12,288バイト(12KB)までで、超えた場合は末尾から削除される。チームやプロジェクト、環境などでAI利用を細かく管理したい開発者にとって便利な改善だ。

AI GatewayAI 出典サイトのOGP画像 出典サイトで原文を開く →

出典サイトの説明: AI Gateway now saves up to 10 custom metadata entries per request, and metadata it adds, such as cf.user_id, no longer counts toward the limit.

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 .

出典: 公式ページ

この記事をシェア