Classes
How to ask for a class
Two ways. Both work on/v1/chat/completions today.
Preferred — 4-class taxonomy:
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: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:privacy_class_unavailable_for_model instead of serving a weaker class.
The privacy block on responses
Every billable chat completion includes aprivacy 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:- The privacy class is the durable guarantee. The upstream choice is an implementation detail of meeting that class.
- Routing decisions change as new providers come online and as policies evolve. Pinning to an upstream would lock customers to a single implementation.
- We never let a vendor name on the response imply a stronger guarantee than the class we earned.
/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 withmargin_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 defaultMESH_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:- Static eligibility — the upstream policy claims it
(
supportsPrivateGateway: true/supportsConfidentialRuntime: true, surfaced viaallowedPrivacyClasses). - 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.
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