Where residency is violated in multi-provider routing
Residency that is defined only in contracts is not enforced when a request is routed. In a multi-provider setup, enforcement has to reach every path a request can take, not just the primary model call. The points below are where a residency rule must apply at request time.
- Primary, failover, and fallback routing. The same region filter must apply to all three, and the request must fail closed when no approved endpoint remains.
- Tool calls and retrieval. Residency covers retrieved documents and tool payloads, not just model prompts.
- Processing region. A region that is only asserted is different from one that is verified, and the record should say which applies.
- Provider-side behavior. Retention, caching, and sub-processors sit outside gateway control (see the final section).
Request-time enforcement flow
Residency enforcement works as four control points, applied in order to every request.
- Classify. Assign a data class to every prompt, retrieved document, and tool payload.
- Decide. Evaluate region policy before any provider call is made.
- Constrain. Route only to approved, region-pinned endpoints and fail closed otherwise.
- Evidence. Record classification, decision, and destination for each request.
Illustrative residency policy by data class
A residency policy is expressed as a policy-as-code rule and evaluated per request, before any provider call. The evaluation uses data class, agent identity, and tool-call context as inputs, and the result determines which approved, region-pinned endpoints the request may reach.
| Element | Role in the rule |
|---|---|
| Data class | Assigned to each prompt, retrieved document, and tool payload; an input to the evaluation. |
| Agent identity | An input to the evaluation. |
| Tool-call context | An input to the evaluation. |
| Approved endpoints | Region-pinned endpoints are the only permitted destinations. |
| No approved endpoint | The request fails closed. |
Closing each gap with a specific control
Each point where residency can break maps to a specific control in the routing layer.
| Gap | Control |
|---|---|
| Failover and fallback paths | Apply the same region filter to primary, failover, and fallback routing, and fail closed when no approved endpoint remains. |
| Tool calls and retrieval | Classify every prompt, retrieved document, and tool payload, and evaluate policy before the call. |
| Asserted versus verified region | Use region-pinned endpoints and record whether the processing region was verified or only asserted. |
| Missing evidence | Produce tamper-evident logs of classification, decision, and destination for every request. |
Provider-side limits and audit evidence
Provider-side retention, caching, and sub-processor behavior sit outside gateway control. Verify them in provider documentation and record them as documented constraints.
Evaluating a runtime enforcement layer
Use these criteria when assessing whether a layer can enforce residency at runtime.
- Evaluates residency policy per request, before any provider call, using data class, agent identity, and tool-call context.
- Applies the same region filter to primary, failover, and fallback routing, and fails closed when no approved endpoint remains.
- Supports region-pinned endpoints and records whether the processing region was verified or only asserted.
- Covers tool calls and retrieval, not just model prompts.
- Produces tamper-evident logs of classification, decision, and destination for every request.
- Documents provider-side behaviors it cannot control, such as retention, caching, and sub-processors.