Skip to content

feat(platform): hold sandbox coding-agent traffic to the EU/EEA processing switch #5186

Closed

Description

@tale-code-bot

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.ts provisions 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 no base_url for such a name, so a connector whose base URL is https://eu.openrouter.ai/api/v1 still goes to openrouter.ai on 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

  1. added
    priority: medium
    feat
    service: platform
    agent-ready
    on Oct 31, 2026
  2. tale-code-bot commented on Oct 31, 2026

    @tale-code-bot
    CollaboratorAuthor

    A note for whoever works this part, from TALE-222 (#5041, branch feat/eu-model-processing, now on its way to feature-train):

    • services/platform/tests/guards/model-endpoint-gate.guard.test.ts names three modules this part covers as not yet gated: backend/core/node_only/sandbox/gateway_provisioning.ts, backend/core/automations/agent_host.ts and backend/core/tasks/agent_run_host.ts. Remove each from NOT_GATED once it judges the endpoint through core/governance/model_endpoint_gate.ts. The guard fails while a listed module is gated.
    • The model API already refuses a standard gateway provider under the rule (gatewayBuiltinRefusal), because ensureProviderConfig sends the gateway no base_url for a standard name.
    • When this part lands, drop the sentence about coding agents in sandboxes from governance.modelAccess.euProcessing.description (en/de/fr). Also update the "Not covered yet" bullet of #eu-processing in docs/{en,de,fr}/platform/admin/governance/content-models.md and the "Not yet" entry of backend/domains/governance/spec.md.
  3. added a commit that references this issue on Oct 31, 2026
    4d17e62
  4. 27 remaining items

  5. added 11 commits that reference this issue on Nov 4, 2026
    8b05a41
    dfcd1c1
    c0eee28
    c8aa51a
    415c419
    122738f
    1c7133e
    b697bb6
    3479d80
    4e0f1e4
    480e671
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyfeatpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions