AI Gateway Routes by Provider Headquarters: A New Approach to Compliant Procurement

AI Gateway adds the ability to route requests by provider headquarters country, filtering vendors with hard compliance boundaries.
AI Gateway launches provider headquarters routing, letting enterprises filter AI requests by the country where vendors are headquartered to meet compliance and procurement rules. It supports allowlist and denylist modes, configurable as team-level policies (Pro and Enterprise) applied automatically to all requests and new models, or narrowed per request via providerOptions.gateway.headquarters. Alongside regional hosting and regional inference, it forms a three-layer geographic control answering where requests are received, where models run, and who operates them. Vendors without headquarters records are denied by default; when no provider is available in permitted countries, requests fail or use fallback rather than routing to non-compliant vendors.
When choosing AI vendors, enterprises increasingly need to answer a seemingly simple yet tricky question beyond model capabilities and pricing: which country is this company headquartered in? For teams bound by compliance and procurement rules, a vendor's geographic affiliation directly determines whether it can enter the procurement list. AI Gateway's newly launched provider headquarters routing capability is designed precisely for this need.
Why "Headquarters Country" Became a Routing Problem
Traditionally, AI gateways solve consistency and availability of model calls, while vendor geographic restrictions at the compliance level are typically handled through manually maintained lists and post-hoc audits. AI Gateway embeds this control directly into the routing logic: your requests are only sent to vendors headquartered in the country you specify, thereby satisfying compliance and procurement requirements regarding "where AI vendors are located."
This capability can be configured as an allowlist—using only vendors from specified countries—or as a denylist—blocking vendors from certain countries. The gateway skips vendors in blocked countries and routes requests to the remaining providers in the list, so as long as a model is available at any permitted vendor location, it remains accessible.
Allowlist and denylist are two complementary access control strategies. An allowlist follows the principle of "default deny, explicit permit"—only objects explicitly listed are allowed; a denylist is the opposite, allowing by default and only blocking explicitly listed objects. In compliance scenarios, allowlists are typically stricter and easier to audit, since they inherently exclude unforeseen vendors; denylists are more flexible, suited to blocking specific high-risk regions without affecting other vendors. The choice depends on how strict or lenient your enterprise compliance strategy is, and whether you need automatic protection against expansion of the vendor catalog.
How Three Geographic Control Dimensions Work Together
Interestingly, provider headquarters doesn't exist in isolation—it forms a three-layer control alongside regional hosting and regional inference. The three answer three distinct questions: where requests are received, where models run, and who operates the models. For enterprises that need to satisfy both data residency requirements and vendor nationality restrictions, these three layers must be used in combination rather than relying on just one.
Data residency refers to the legal and technical requirements for data to be physically stored or processed in a specific geographic region, commonly seen in GDPR, certain industry regulations, and government procurement rules. It is an independent dimension from vendor nationality: a vendor headquartered in Country A may host and run models in Country B. Regional hosting controls the physical location of data storage and processing, regional inference controls where model computation occurs, and headquarters routing controls the legal affiliation of the operating entity. Satisfying just one does not automatically satisfy the other two, so compliance teams need to declare and combine them separately.
Team-Level Settings: Configure Once, Apply Globally
Pro and Enterprise customers can apply a provider headquarters list to every AI Gateway request within their team in AI Gateway settings. Such team-level settings automatically apply to newly added models and providers in the gateway, with no need to re-audit each time the model catalog expands.
An easily overlooked detail: vendors without a registered headquarters country will never receive your requests. This is a default-deny rule, meaning the completeness of your list directly affects the breadth of available models—if all providers of a given model lack headquarters information, it is effectively unavailable to your team.
Per-Request Settings: Flexible Narrowing
Users on any plan can impose restrictions on individual requests through the headquarters field in the gateway's provider options. Pass country codes to form an allowlist, or prefix each code with ! to form a denylist, for example ['!US'].
If the team has already configured a list, individual requests can only narrow it further, not widen it. This design aligns with compliance intuition: team policy is the baseline, and request-level configuration is refinement.
The following example restricts requests to only vendors headquartered in the US and Germany:
import { generateText } from 'ai';
const { text } = await generateText({
model: 'openai/gpt-oss-120b',
prompt: 'Explain HTTP caching in one sentence.',
providerOptions: {
gateway: {
headquarters: ['US', 'DE'],
},
},
});
console.log(text);
Behavior and Boundaries When Routing Fails
Both settings are essentially vendor filtering, so as long as a model has an available provider within the permitted countries, it remains available. When no provider is available within the permitted countries, AI Gateway attempts your fallback model; if the fallback model is also unavailable within permitted countries, or no fallback is configured at all, the request fails rather than being routed to a provider in another location.
This choice of "fail rather than degrade to a non-compliant vendor" is the key value of this mechanism in a compliance context. It turns compliance constraints into hard boundaries rather than best-effort soft hints. The cost is availability: when providers in permitted countries experience outages or models are delisted, requests will fail directly, and teams need to plan their fallback model list in advance.
Fallback models are backup models that automatically take over requests when the primary model is unavailable, typically configured as a priority list. In the context of provider headquarters routing, fallback models are also subject to headquarters country filtering: only when a fallback model has an available provider within permitted countries can it truly serve as a safety net. Therefore, when configuring fallbacks, don't just look at model capabilities—also verify whether their providers' headquarters fall within the allowlist. Otherwise, the fallback will be skipped by the same filtering rules, and the request will still fail.
Implementation Recommendations
When planning to enable this capability, first inventory the headquarters information for each provider in your existing model catalog and confirm that key models have at least one alternative provider within target countries. For team-level settings, it's recommended to also configure fallback models to avoid request failures caused by a single provider outage. Supported country lists, pricing, and configuration details can be found in the official provider headquarters documentation.
From a broader perspective, the emergence of such capabilities shows that competition in AI infrastructure is shifting from "can it be called" to "can it be called compliantly." For multinational enterprises and regulated industries, vendor geographic routing will gradually become a standard gateway capability rather than an add-on option.
Related articles

Prompt Engineering for Beginners: From Writing Prompts to Engineering Thinking
Starting from the essence and four functions of prompts, this article systematically explains the six-step process, four success criteria, learning value, and practical limitations of prompt engineering to help you build a complete understanding.

Anthropic Launches Nasdaq IPO: AI Giant's Listing and Risk Disclosures
Anthropic officially launches its Nasdaq IPO under ticker ANT, with market valuation expected to potentially exceed SpaceX's record. The prospectus devotes nearly 100 pages to AI risks, while first-half revenue grew over 14x but net losses widened sharply, reigniting the AI bubble debate.

Rust cURL Clone Uses 4,832 unsafe Blocks—Is the Memory Safety Myth Broken?
A Rust cURL clone uses 4,832 unsafe keywords, challenging Rust's memory safety narrative. We analyze what unsafe really means, compare Fil-C, and examine rewrite motives.