Repository navigation
Description
Part of #5041, which adds a switch to the model-access policy: Process prompts only in the EU/EEA (part 1, board task TALE-222). Part 1 refuses each direct model call to an endpoint that is not known to process in the EU/EEA, at the moment the model is resolved, and writes an audit entry for it. This part applies the same refusal to coding-agent traffic in sandboxes.
Depends on part 1. Part 1 brings the policy field euProcessing: { enabled, hosts }, the pure endpoint classifier next to REGIONAL_ENDPOINTS in services/platform/lib/chat/serving.ts, and the gate that refuses and audits. Start from a train that already has them.
Where the traffic leaves. Checked at feature-train c0eb93b6b2eadf7744eaf0a666e55efb6d27c41f, in services/platform. There are two lanes.
The gateway lane.
backend/core/node_only/sandbox/gateway_provisioning.tsprovisions each connector on the sandbox LLM gateway (Bifrost).- For a gateway standard name (
lib/shared/providers/gateway_standard_providers.ts), the gateway calls the vendor's built-in endpoint. The provisioner pushes nobase_urlfor such a name, so a connector whose base URL ishttps://eu.openrouter.ai/api/v1still goes toopenrouter.aion this lane. - A custom record calls the connector's base URL. On the Anthropic lane it calls the connector's
harnessEndpoint. - The routing is in
backend/core/node_only/sandbox/llm_gateway_admin.ts(resolveGatewayRouting).
The subscription lane. backend/core/tasks/agent_run_host.ts:1047 and backend/core/automations/agent_host.ts resolve the harness's credential. The harness then calls the vendor directly from the sandbox.
Done when
- With the switch on, a sandbox session never receives a virtual key or a credential for an upstream that part 1's classifier refuses.
- The refusal comes before the session starts, says why, and is audited like part 1's.
- With the switch off, nothing changes.
- Tests cover both lanes. Each lane needs four cases:
- a non-EU upstream is refused;
- an EU upstream is allowed;
- a host an admin attested is allowed;
- OpenRouter is allowed only through
eu.openrouter.ai.
Part 1's guard test keeps the gateway provisioning and the agent hosts on its list of resolveProviderCredential callers that don't use the gate. This part takes them off that list.
Activity
test(platform): hold every credential resolver to the EU/EEA gate
tale-code-bot commentedon Oct 31, 2026
A note for whoever works this part, from TALE-222 (#5041, branch
feat/eu-model-processing, now on its way tofeature-train):services/platform/tests/guards/model-endpoint-gate.guard.test.tsnames three modules this part covers as not yet gated:backend/core/node_only/sandbox/gateway_provisioning.ts,backend/core/automations/agent_host.tsandbackend/core/tasks/agent_run_host.ts. Remove each fromNOT_GATEDonce it judges the endpoint throughcore/governance/model_endpoint_gate.ts. The guard fails while a listed module is gated.gatewayBuiltinRefusal), becauseensureProviderConfigsends the gateway nobase_urlfor a standard name.governance.modelAccess.euProcessing.description(en/de/fr). Also update the "Not covered yet" bullet of#eu-processingindocs/{en,de,fr}/platform/admin/governance/content-models.mdand the "Not yet" entry ofbackend/domains/governance/spec.md.test(platform): hold every credential resolver to the EU/EEA gate
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): hold sandbox agent traffic to the EU/EEA rule
27 remaining items
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule
feat(platform): let admins keep model calls in the EU/EEA
feat(platform): hold sandbox agent traffic to the EU/EEA rule