| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/ai-gateway/reference/troubleshooting/ | [Back] [Original] |
This page covers common issues when using AI Gateway. For provider-specific troubleshooting, refer to the relevant provider documentation.
If you receive authentication errors from your AI provider, AI Gateway did not pass valid credentials upstream. Check the following:
Verify header placement: Make sure your Cloudflare token is in cf-aig-authorization, not Authorization. The Authorization header is reserved for provider credentials.
Check your configuration based on endpoint type:
/google-vertex-ai/ or /openai/). AI Gateway uses this to identify the provider and apply the correct stored credentials./compat/chat/completions endpoint: Confirm your model name starts with the provider prefix (for example, google-vertex-ai/google/gemini-2.5-flash or openai/gpt-4o). AI Gateway uses this prefix to route the request and select the correct stored credentials.Verify BYOK key selection: If you have multiple keys configured for a provider, ensure either:
default, orcf-aig-byok-alias header with the correct alias nameVerify BYOK configuration: If using BYOK, confirm in the dashboard that your credentials were saved correctly.
For provider-specific authentication issues:
For troubleshooting Data Loss Prevention issues such as DLP not triggering or unexpected blocking, refer to DLP troubleshooting.
| Web Proxy Viewer | New URL | Original Page |