Skip to main content
Every MESH request is classified into one of four privacy classes. The class controls upstream selection, logging behaviour, and the privacy block returned with the response. The router enforces the class — it cannot be silently downgraded. The class you ask for is the class served, or you get an explicit error.

Classes

How to ask for a class

Two ways. Both work on /v1/chat/completions today. Preferred — 4-class taxonomy:
Legacy — mode (still accepted):
mode: "standard" maps to standard_route. mode: "mesh" maps to private_gateway_route. Both legacy aliases continue to work; new code should use class.

bestAvailable

Ask MESH to pick the strongest class the requested model actually supports:
The response tells you which class was selected. Today, a Bedrock-backed model with bestAvailable: true lands on protected_provider_route. An OpenRouter-backed model whose upstream has not been individually reviewed lands on standard_route.

allowFallbackToLowerClass

If you really need a model whose policy can’t meet your requested class, opt in to a fallback:
The router uses the strongest class the model CAN serve. The actual class is in the response. If you didn’t get what you asked for, you can refuse client-side. Without this flag, MESH returns HTTP 422 with privacy_class_unavailable_for_model instead of serving a weaker class.

The privacy block on responses

Every billable chat completion includes a privacy block:
upstream_disclosed: false is constant. MESH never tells users which upstream provider it routed to — the same model alias may be served from different upstreams over time. The privacy class is the durable guarantee.

What each class enforces today

What each class is NOT

We make a point of saying what we don’t guarantee.
  • Standard does not guarantee anything about the upstream’s data policy. It guarantees that MESH does not store prompts. The upstream provider may log according to its own policy.
  • Protected does not run inference inside an enclave. It selects an upstream path with verified no-training and no-provider-sharing guarantees. The model provider still processes the request.
  • Private Gateway does not protect against the model provider. It protects against MESH-side operators, logs, and infrastructure. If a closed model is selected, that provider still sees the request through the protected upstream path.
  • Confidential is the only class where no closed external model provider receives plaintext. It requires a MESH-controlled confidential runtime + verified attestation. Today this class is only available for open-weight models on the confidential runtime.

Why upstream provider names are hidden

We choose the upstream that gives the requested class at the lowest cost and best reliability. The same model alias may be served from different upstream paths on different calls. We do not disclose the upstream because:
  1. The privacy class is the durable guarantee. The upstream choice is an implementation detail of meeting that class.
  2. Routing decisions change as new providers come online and as policies evolve. Pinning to an upstream would lock customers to a single implementation.
  3. We never let a vendor name on the response imply a stronger guarantee than the class we earned.
Admin and debug surfaces can include upstream identity. Public /v1/chat/completions and /v1/models responses never do.

Margin floors

Each class has a configurable minimum margin in basis points. Routing below the floor returns HTTP 503 with margin_floor_violated.

Class-specific markup (billing)

In addition to the floors above, PG and Confidential calls are charged at a higher MARGIN RATE than the default MESH_MARGIN_BPS=3000 (30%). This covers Nitro compute, attestation overhead, and the stricter SLOs that go with the stronger guarantee. A PG call therefore typically costs the user ~1.5× the equivalent Protected call on the same model, before any per-call infrastructure add-ons (KMS reads, vsock round-trip). The exact user-facing total is in the usage.cost field of the response and in the signed receipt. Loss-leader behaviour is opt-in via MESH_ALLOW_LOSS_LEADER=true and intended only for limited promotional windows.

Routes that currently exist

Runtime gate

For runtime-dependent classes (PG, Confidential), the router checks TWO things:
  1. Static eligibility — the upstream policy claims it (supportsPrivateGateway: true / supportsConfidentialRuntime: true, surfaced via allowedPrivacyClasses).
  2. Runtime availability — the deployment has the infra wired. This reads defaultNitroConfig (in @mesh/economics), the SAME constant that controls whether the actual dispatch path runs through the Nitro parent + enclave. There is one source of truth; the privacy gate and the dispatch eligibility can never disagree.
Both must hold for a per-request PG / Confidential call to succeed. If only the policy side holds, the router returns 503 privacy_class_runtime_unavailable — distinct from the 422 privacy_class_unavailable_for_model you’d get if the upstream policy itself can’t back the class.

Signed receipts

Every response carries an Ed25519 receipt covering:
  • Request ID
  • Model alias (user-visible name, never the upstream)
  • Privacy class served
  • Token counts in/out
  • Cost in USD
  • Timestamp
  • Public-key signer ID
The receipt does not include prompt or response content. Receipts are verifiable offline against the published signer public key — see attestation for the verification path.

Errors