Latest in AI
Vercel AI Gateway provider headquarters: how country filters work
Set a country allowlist on Vercel AI Gateway, understand what happens to model fallbacks, and verify provider headquarters separately from inference location.
A US-headquartered inference provider can run a model in Europe. A US data center can serve a model for a provider whose parent company is based elsewhere. If your approval process cares about both, you need two different checks.
On November 23, Vercel announced a provider headquarters filter for AI Gateway. It looks at the provider's parent company, including when the service itself is a subsidiary. The model author's location is a separate question. A model from one country can still be available through an allowed host in another.
Start with one request
Use a synthetic prompt and your existing Gateway credentials. This example asks the Gateway to consider providers headquartered in the US or Germany:
curl --fail-with-body https://ai-gateway.vercel.sh/v1/chat/completions \
-H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-oss-120b",
"messages": [{"role":"user","content":"List two ways to test a calendar app."}],
"providerOptions": {"gateway":{"headquarters":["US","DE"]}}
}'
See the headquarters reference for the current provider-to-country map. Use ISO country codes such as GB, not UK. For an exclusion list, put ! before each code. Mixing allowed and excluded codes in one list returns HTTP 400. A provider without a recorded headquarters is excluded either way.
Decide whether it belongs in code or team settings
Per-request filtering is available on every plan at no added charge. Pro and Enterprise teams can apply the policy to every Gateway request under AI Gateway → Settings → Provider Headquarters. Vercel lists a surcharge of $0.10 per 1,000 billed requests for that team-wide policy. At a million billed requests, that's $100 for this control alone, before inference and other charges.
A request can narrow the team list but can't widen it. If the team allows US and DE and an application requests DE and FR, only DE remains. Use an allowlist if your team needs to approve each new country before it receives traffic. A denylist will admit new countries that aren't excluded.
Check what fails before deployment
The Gateway tries configured fallback models if the primary has no eligible host. If no fallback can satisfy the policy, the request gets HTTP 400. Bringing your own provider key doesn't change the country requirement. A Gateway-run tool can also fail if its vendor doesn't match the policy.
Build a small staging matrix from the models your app actually calls: primary model without tools, primary with the exact tools it uses, and each intended fallback. Keep the headquarters filter unchanged across those calls. Add a deliberately disjoint request policy in staging and confirm your app handles the rejection without retrying unfiltered.
For team policy, authenticated /v1/models?include_availability can flag headquarters_country_not_allowed. That catalog view doesn't account for your individual request filters, so it isn't a substitute for the matrix.
Verify the provider and the region separately
For OpenAI-compatible responses, inspect the Gateway routing metadata under the choice's message.provider_metadata.gateway. The regional inference docs show how to use routing.finalProvider to identify the host and inferenceEndpoint.geoRegion on the serving attempt to confirm the region when pinned.
If this workload must run in the EU, add inferenceRegion: { scope: 'zone', geoRegion: 'eu' } to the Gateway options, then test the combination. If the request also needs to enter the Gateway in Europe, the regional hosting docs list a separate EU base URL. Hosting is still in beta. Gateway-run search tools can call vendor APIs outside the pinned region, and a region pin alone says nothing about how long a provider retains data. Keep those requirements separate in the deployment checklist.
I'm Paras. I work at the intersection of AI, engineering and distribution.
I help AI teams write technical guides that show developers how to deploy new features and check that they work.