How to Vet LLM API Providers and Enforce Zero Data Retention: Routing Policy, Canary Prompts and Audits
In November 2026, Dragos published the results of roughly two million canary prompts that its researchers sent to AI services between July and November. Those prompts were seeded with unique URLs and real-but-empty AWS keys. Data from at least three hosting providers was stolen. One model lab fetched secret URLs from roughly two-thirds of requests that were marked “no data collection” or zero data retention. Three days later, OpenRouter off-boarded three providers and removed 125 endpoints from its ZDR list. If your zero data retention LLM policy is a checkbox in a router dashboard, these incidents show what it is worth: it covers one hop, on trust.
The timing matters. OpenAI’s updated usage policies, effective 20 November 2026, require prior approval for routers and gateways that give third parties direct model access. Procurement teams are being asked to show evidence, not just intent.
You will leave with a ten-step procedure, two Python tools and a scorecard you can audit against.
What this covers: supply-chain mapping, contractual versus technical ZDR, deny-by-default routing, canary prompts, redaction, confidential computing, audit evidence and an exit plan.
Context and Background
Most teams do not call one model provider. They call a gateway, which calls a router, which may call a reseller, which rents GPUs from a cloud that has its own operators and subcontractors. Each hop can log, cache or forward a prompt. Each hop has its own retention terms, and most of those terms are invisible to the team that wrote the prompt.
The industry answer has been zero data retention, or ZDR. The phrase sounds absolute. In practice it is a negotiated exception to a provider’s default retention, and it is narrower than most buyers assume. OpenAI, for example, retains API abuse-monitoring logs for up to 30 days by default, and ZDR requires prior approval from OpenAI (OpenAI, “Your data”). Anthropic deletes API inputs and outputs within 30 days by default, but it can keep content flagged by its trust and safety systems for up to two years (Anthropic Privacy Center).
Aggregators added a second layer. OpenRouter lets you set zdr: true per request or enforce ZDR account-wide. It defines ZDR as “no routine storage of prompts or responses after processing”, with exceptions for CSAM review and legal preservation (OpenRouter ZDR docs). That definition is honest. However, as reported by ActuIA, OpenRouter’s data processing agreement states that a provider’s inclusion on the ZDR list “does not constitute a guarantee” of compliance. The router passes your flag downstream, and the downstream host decides whether to honor it.
This was the gap the 2026 incidents exposed. We covered how API keys and secrets leak through prompts, resellers and logs in our analysis of secrets in AI prompts. This post is the companion procurement and enforcement guide. It covers how to choose providers, how to make your gateway refuse everything else, and how to prove the policy holds. If you are still choosing a gateway, start with our LLM gateway architecture reference.
The thesis is simple. ZDR is a per-hop claim. You can only enforce it at hops you control, and you can only verify it with behavioral evidence. Contracts tell you what a provider promised. Routing logs tell you where a request went. Canary tokens tell you what happened afterwards. You need all three.
Zero Data Retention LLM Enforcement Starts With the Inference Supply Chain
Direct answer: To enforce zero data retention for LLM traffic, map every hop between your application and the GPU that serves it. Then restrict traffic to hops whose ZDR terms you hold in writing. Pin those providers with fallbacks disabled, verify which provider actually served each request, and seed canary tokens that reveal any later access.

Figure 1: The inference supply chain. A privacy flag set at the gateway travels with the request, but only the first hop is bound by your contract.
The figure shows three paths out of your gateway. The direct path goes to a first-tier model provider. The cloud path goes to a hyperscaler platform such as Amazon Bedrock, Google’s Gemini Enterprise Agent Platform (formerly Vertex AI) or Azure. The aggregator path runs through a router, and possibly a reseller, to an independent model host and its GPU cloud. Retention can occur at the host’s logs, caches and abuse stores. It can also occur at hidden relays that nobody disclosed.
A privacy flag binds only the first hop
The Dragos write-up puts it bluntly: “a privacy flag only binds the first hop.” When you send zdr: true to a router, the router is contractually bound by its own terms. The router then selects an endpoint whose published policy says ZDR. Whether that host actually honors the policy is a matter between the router and the host. Their agreement may not include audit rights, technical verification or breach notification timelines that flow down to you.
The Dragos researchers traced about two thousand routes by embedding an image URL and sending deliberately broken requests. Each router wrapped the error from the hop behind it, creating nested “envelopes” that revealed the chain. Several hundred routes included an unidentified system. One marketplace seller quietly added about a thousand hidden tokens to every prompt. Their conclusion on marketplaces was precise: “the leak follows the seller and not the marketplace as a whole.” In other words, your risk is set by the weakest host your traffic can reach, not by the router’s brand.
ZDR has scope, and the scope is per feature
Even first-tier providers scope zero data retention to specific endpoints and features. OpenAI lists Assistants, Threads, Vector Stores, Files, fine-tuning, Evals and Batches as endpoints that are not ZDR-eligible. With ZDR enabled, OpenAI forces store to false on /v1/responses and /v1/chat/completions. Anthropic’s eligibility table excludes Batch processing (29-day retention), the Files API, the code execution tool, the MCP connector and Agent Skills. Under its legacy ZDR arrangement, using those features is not blocked. It simply steps outside ZDR for that data (Anthropic API and data retention).
A related breach shows how scope gaps hurt. In a November 2026 research note, the Cloud Security Alliance described a Fireworks AI breach that exposed chat transcripts from fewer than 1% of Notion workspaces. ZDR commitments were in place. The most likely explanation is that the affected processing path fell outside the ZDR scope, though neither company had confirmed it (CSA research note). The lesson: define ZDR by processing path, not by vendor.
What each major provider actually retains
The table summarizes what each provider’s own documentation said when this post was written. Treat it as a starting checklist, not legal advice, and re-read the source before you sign.
| Provider | Default API retention | ZDR route | Known carve-outs |
|---|---|---|---|
| OpenAI API | Abuse-monitoring logs up to 30 days; no training on API data unless you opt in (since 1 March 2023) | ZDR or Modified Abuse Monitoring after OpenAI approval; configured per organization or project | Assistants, Threads, Vector Stores, Files, fine-tuning, Evals, Batches not eligible; prompt-cache KV tensors kept in GPU-local storage up to 24 hours |
| Anthropic API | Inputs and outputs deleted within 30 days | Per-organization agreement through sales; each new organization enabled separately | Flagged content up to 2 years, classifier scores up to 7 years; Batch, Files, code execution and MCP connector not eligible; some “Covered Models” require 30-day retention |
| Google Gemini Enterprise Agent Platform | No training without permission; implicit caching on by default, deleted within 24 hours | Disable caching via cacheConfig; contact account team for abuse-monitoring exceptions |
Grounding with Google Search logs up to 3 days; Maps grounding 30 days; neither can be disabled; Interactions API store defaults to true |
| Amazon Bedrock | Mode-based: default follows each model’s policy, and AWS may retain for abuse prevention |
Set data_retention_mode to none per Region at account or project scope |
Models requiring aws_review retain prompts up to 30 days inside AWS and become unavailable under none |
| Azure OpenAI in Foundry | Abuse monitoring may sample flagged prompts for review | Modified Abuse Monitoring by application for managed customers | Responses API, Assistants, stored completions, batch and Files store data; MAM ends for models released on or after 1 November 2026, from a date to be announced |
Sources: OpenAI, Anthropic, Google, AWS, Microsoft.
Two patterns stand out. First, providers increasingly require retention for their most capable models. Anthropic’s “Covered Models” and Bedrock’s aws_review tier both make retention a condition of access, unless the provider grants a specific ZDR exception. Second, caching is contested. OpenRouter does not treat in-memory implicit prompt caching as retention. Google’s documentation treats its caches as something you must disable for ZDR. Your contract must say which interpretation applies.
How to Vet LLM API Providers and Enforce Zero Data Retention: 10 Steps
The procedure below is ordered so that each step produces evidence the next step needs. Steps 1 to 3 are procurement. Steps 4 to 7 are engineering. Steps 8 to 10 are assurance.
- Map the inference supply chain for every AI feature.
- Classify the data each feature sends.
- Separate contractual ZDR from technical ZDR.
- Enforce deny-by-default routing with a provider allow-list.
- Redact before the prompt leaves your boundary.
- Seed canary prompts on every route.
- Verify the served-by provider on every response.
- Decide where confidential computing is worth it.
- Collect audit evidence and score providers.
- Monitor continuously and rehearse the exit.
Step 1: Map the inference supply chain
Start with an inventory, not a policy. For each AI feature, record the gateway, the router, the model slug and every provider that the router is allowed to select. Include indirect paths: SaaS vendors that embed AI features are often sending your data to inference providers you have never heard of. The CSA calls this fourth-party AI subprocessor risk. Its recommendation is to ask vendors which inference providers process customer data for each feature, not just which foundation models they use.
Treat the gateway’s configuration as the source of truth. If a model alias can fall back to five providers, all five are in your supply chain. That is true even if 99% of traffic goes to one of them, because fallback is triggered by exactly the conditions you cannot predict. Those conditions are outages, rate limits and price changes.
Record the network evidence too. Egress logs at your gateway show which upstream hostnames you actually contact. If you see an aggregator hostname you did not approve, a developer has bypassed the gateway, and the map is wrong.
Step 2: Classify the data each feature sends
Not every prompt needs zero data retention. Marketing copy generation and public documentation search can tolerate a provider’s default retention. Source code, customer records, incident tickets and anything that may contain credentials cannot. A three-tier scheme is enough for most organizations:
- Public: content that could be published. Any approved provider.
- Internal: business data without regulated fields. ZDR endpoints only, from an allow-list.
- Restricted: regulated data, credentials, source code, customer content. First-tier providers with a signed ZDR agreement, a hyperscaler with retention set to none, or self-hosted models.
The classification must travel with the request. In practice, that means a header or a key-level tag that your gateway reads. Without it, the gateway cannot apply different routing rules, and every request gets the weakest policy anyone configured.
Step 3: Separate contractual ZDR from technical ZDR
Contractual zero data retention is a promise: a data processing agreement (DPA) clause, an order form addendum, or a provider’s published policy. Technical zero data retention is a configuration you can observe. Examples include OpenAI forcing store=false, Bedrock returning an error when a model needs retention you have not allowed, or Azure showing ContentLogging: false in the resource JSON once Modified Abuse Monitoring is approved.
For every provider, write both down. Then look for the gaps where zero data retention quietly stops applying. Common ones include:
- Abuse monitoring. A ZDR agreement may remove routine storage but keep flagged content. Anthropic’s two-year retention for flagged content applies regardless of arrangement.
- Stateful features. Batch, files, vector stores, conversation state and background jobs are usually outside ZDR.
- Grounding and tools. Google states that Grounding with Google Search logs data for up to three days and that this cannot be disabled. OpenRouter notes that server tools and plugins, such as search engines and sandboxes, follow their own services’ policies.
- Caching. Implicit caches, prompt caches and session-resumption caches can each hold content for hours.
- Legal holds. Every provider reserves retention where law requires it.
A useful test question for any vendor is: “Name every system where a byte of my prompt can exist after you return the response, and its maximum lifetime.” A vendor that cannot answer has not done the analysis. In that case, their ZDR claim is a marketing statement.
Step 4: Enforce deny-by-default routing with a provider allow-list
This is the step that turns policy into behavior. The rule is that a request with no matching allow-list entry is rejected, not routed to “best available”.

Figure 2: Deny-by-default routing. Data class selects the policy, the allow-list gates the provider, and the served-by check runs after every response.
The flow in Figure 2 has two gates. The first runs before the request leaves your gateway: is the target provider on the allow-list for this data class? The second runs after the response returns: did the provider that actually served the request match? Most gateways implement the first gate. Very few implement the second, and the second gate is what catches silent fallback.
On OpenRouter, the provider routing object gives you the controls you need. According to the provider selection docs, these fields are:
only: provider slugs allowed for this request.order: provider slugs to try in sequence.allow_fallbacks: defaults totrue; set it tofalse.data_collection:"allow"or"deny"; defaults to"allow".zdr: restricts routing to ZDR endpoints.
The per-request zdr flag combines with account and guardrail settings as a logical OR. A request can add ZDR protection but cannot switch off an account-level requirement. That makes the account toggle the safer place to set your floor, with per-request flags as belt and braces.
{
"model": "meta-llama/llama-3.3-70b-instruct",
"messages": [{"role": "user", "content": "..."}],
"provider": {
"only": ["deepinfra"],
"order": ["deepinfra"],
"allow_fallbacks": false,
"data_collection": "deny",
"zdr": true,
"require_parameters": true
}
}
Two details matter. First, OpenRouter’s ZDR endpoint list at https://openrouter.ai/api/v1/endpoints/zdr updates automatically when a provider’s policy changes. It also includes Safety Retention endpoints, which are used only if you allow Safety Retention. OpenRouter introduced Safety Retention on 26 October 2026 as a tier where a provider may keep prompts only to prevent abuse. Decide explicitly whether your internal tier accepts it. Second, the list changed overnight on 22 November 2026, when 125 endpoints lost ZDR eligibility. Your allow-list should be your own pinned list, diffed against the router’s list daily. It should not simply mirror the router’s list.
If you run LiteLLM, the equivalent controls live in the proxy config and key management. Tag deployments with model_info.access_groups, then issue keys or teams whose models field names only the approved group. A key without the group cannot call the model. Set litellm_settings.turn_off_message_logging: true so your own observability callbacks do not become a retention point. Also set global_disable_no_log_param: true if you do not want clients choosing their own logging behavior (LiteLLM logging docs). For a side-by-side of how LiteLLM, Portkey, Kong and Cloudflare handle routing and fallback, see our LLM gateway comparison.
On Amazon Bedrock, enforcement can move into identity policy. Bedrock’s data_retention_mode is set per Region at account or project scope. The effective mode is the first non-inherit value from project, then account, then model default. A Service Control Policy can deny PutAccountDataRetention, CreateProject and UpdateProject unless the bedrock-mantle:DataRetentionMode condition key equals none. The control-plane equivalent is bedrock:DataRetentionMode. Under none, Bedrock blocks requests to models that require retention rather than silently retaining. That is exactly the deny-by-default behavior you want. Remember that the setting does not propagate across Regions, so a new Region starts at inherit.
Step 5: Redact before the prompt leaves your boundary
Redaction reduces what any hop can leak. It does not replace routing policy, because you will never redact everything. Apply it in three layers. Secret scanning catches API keys, tokens, private keys and connection strings. Use pattern rules plus entropy checks, and block rather than mask when you find a live credential. PII detection masks names, emails, phone numbers and account identifiers; reversible tokenization keeps responses useful. Finally, structural minimization removes fields the model does not need, such as full log files when only the error line matters.
We documented a full PII pipeline with Microsoft Presidio and reversible tokenization in our PII detection and redaction guide. For this procedure, the critical point is placement. Redaction must run inside your gateway or client, before the router. Redaction offered by the router itself happens after the router has already received the plaintext.
Credential rotation is the other half. The CSA note makes the point that deleting a secret from a provider does not invalidate it. If a key reached any external hop, rotate it at the issuing service.
Step 6: Seed canary prompts on every route
A canary token is a unique, meaningless value that should never be touched. If it is touched, someone read the prompt. Dragos built its study on this idea. Each prompt carried a unique hostname, a unique URL and, in some cases, an AWS key tied to an empty, fully logged account. Every interaction was attributed back to “the exact prompt, model, router, and privacy setting that carried it.”

Figure 3: Canary lifecycle. The seeder records each token’s route before sending it; any later DNS lookup or HTTP fetch maps back to one provider and triggers a deny-list action.
You do not need two million prompts. You need coverage of every allowed route, at a steady rate, with tokens that resolve to infrastructure you monitor. The sketch below derives tokens deterministically from a secret seed using HMAC (hash-based message authentication code). Any token seen in the wild can then be verified as yours and mapped to its route, even if the registry is lost.
"""canary_seeder.py - derive per-route canary tokens and a registry.
Tokens resolve to infrastructure you control (DNS zone + HTTPS listener).
For credential-shaped canaries, use a service such as Thinkst Canarytokens
or real keys on empty, fully-logged accounts. Do not invent key formats.
"""
import hmac, hashlib, json, sqlite3, time, secrets
from dataclasses import dataclass, asdict
SEED = b"load-from-your-secret-manager" # rotate per campaign
CANARY_ZONE = "cnry.example.net" # wildcard DNS you log
@dataclass
class Canary:
token_id: str
route: str # e.g. "openrouter:deepinfra:llama-3.3-70b"
privacy_flags: str # e.g. "zdr=true;data_collection=deny"
hostname: str
url: str
created_at: int
def derive(route: str, flags: str, nonce: str) -> Canary:
msg = f"{route}|{flags}|{nonce}".encode()
tag = hmac.new(SEED, msg, hashlib.sha256).hexdigest()[:20]
host = f"{tag}.{CANARY_ZONE}"
return Canary(tag, route, flags, host,
f"https://{host}/r/{tag}.png", int(time.time()))
def verify(tag: str, route: str, flags: str, nonce: str) -> bool:
return hmac.compare_digest(derive(route, flags, nonce).token_id, tag)
def registry(path="canaries.db"):
db = sqlite3.connect(path)
db.execute("""CREATE TABLE IF NOT EXISTS canary(
token_id TEXT PRIMARY KEY, route TEXT, privacy_flags TEXT,
hostname TEXT, url TEXT, created_at INT, nonce TEXT)""")
return db
def seed_prompt(c: Canary) -> str:
# Looks like ordinary pasted context; nothing in it should be acted on.
return (f"Summarise this deployment note in two lines.\n"
f"Staging dashboard: {c.url}\n"
f"Internal mirror host: {c.hostname}\n")
def new_canary(db, route: str, flags: str) -> tuple[Canary, str]:
nonce = secrets.token_hex(8)
c = derive(route, flags, nonce)
db.execute("INSERT INTO canary VALUES (?,?,?,?,?,?,?)",
(*asdict(c).values(), nonce))
db.commit()
return c, seed_prompt(c)
def on_hit(db, token_id: str, src_ip: str, kind: str) -> dict:
"""Call from your DNS/HTTP listener. Any hit is an incident."""
row = db.execute("SELECT route, privacy_flags, created_at FROM canary "
"WHERE token_id=?", (token_id,)).fetchone()
if not row:
return {"status": "unknown-token", "token": token_id}
route, flags, created = row
return {"status": "INCIDENT", "route": route, "flags": flags,
"kind": kind, "src_ip": src_ip,
"hours_after_send": round((time.time() - created) / 3600, 1)}
Run the seeder from a scheduled job that sends one canary per allowed route per day through the same gateway path production uses. Two operational rules keep the signal clean. First, never send canaries from a developer laptop. Its own browser or tools may resolve the hostname and create false positives. Second, expect some benign touches. Some providers legitimately fetch URLs when a model has browsing tools enabled. Disable tools on canary requests, and treat any fetch that arrives after the response completes as suspicious.
What counts as a hit? A DNS lookup of the hostname, an HTTP request to the URL, or any use of a credential canary. Timing tells you which failure you are seeing. A fetch within seconds suggests an agentic tool or URL preview inside the serving path. A fetch days later suggests the prompt was stored and read. In the Dragos data, one secret link surfaced in a Feishu chat 24 days after it was sent. That delay is a retention signature.
Step 7: Verify the served-by provider on every response
The routing parameters in Step 4 express intent. The served-by check confirms outcome. On OpenRouter, the GET /api/v1/generation?id= endpoint returns provider_name for the provider that served the request. It also returns a provider_responses array that lists fallback attempts. A wrapper can enforce the allow-list both before and after the call.
"""zdr_client.py - request wrapper enforcing a provider allow-list.
Assumes OpenRouter's documented provider routing fields and the
/api/v1/generation metadata endpoint. Generation metadata can lag the
completion by a short interval, so the check retries briefly.
"""
import os, time, logging, requests
BASE = "https://openrouter.ai/api/v1"
KEY = os.environ["OPENROUTER_API_KEY"]
H = {"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"}
# Your pinned allow-list, per data class. Slugs are examples only.
ALLOW = {
"internal": {"deepinfra", "fireworks"},
"restricted": set(), # restricted data never goes via the router
}
class PolicyViolation(Exception):
pass
def provider_block(data_class: str) -> dict:
allowed = sorted(ALLOW.get(data_class, set()))
if not allowed:
raise PolicyViolation(f"no router providers allowed for {data_class}")
return {"only": allowed, "order": allowed, "allow_fallbacks": False,
"data_collection": "deny", "zdr": True,
"require_parameters": True}
def served_by(gen_id: str, tries: int = 5) -> tuple[str | None, list]:
for i in range(tries):
r = requests.get(f"{BASE}/generation", headers=H,
params={"id": gen_id}, timeout=10)
if r.status_code == 200:
d = r.json().get("data", {})
attempts = [a.get("provider_name")
for a in (d.get("provider_responses") or [])]
return d.get("provider_name"), attempts
time.sleep(0.5 * (2 ** i))
return None, []
def chat(messages: list, model: str, data_class: str) -> dict:
body = {"model": model, "messages": messages,
"provider": provider_block(data_class)}
r = requests.post(f"{BASE}/chat/completions", headers=H,
json=body, timeout=120)
r.raise_for_status()
resp = r.json()
prov, attempts = served_by(resp["id"])
allowed = {p.lower() for p in ALLOW[data_class]}
touched = {p.lower() for p in attempts if p} | ({prov.lower()} if prov else set())
if prov is None:
logging.warning("served-by unknown for %s; quarantining", resp["id"])
raise PolicyViolation("cannot verify serving provider")
if not touched <= allowed:
logging.error("route escape: %s touched %s", resp["id"], touched)
raise PolicyViolation(f"providers outside allow-list: {touched - allowed}")
return resp
Note that the check compares lowercase provider names against slugs. In production, maintain an explicit mapping between the display names the metadata returns and the routing slugs you configure. The exception path matters as much as the happy path. If the wrapper cannot verify which provider served a request, the safe default is to treat that request as an incident and not return the response to the user. Some teams will find that too strict for internal-tier traffic. If you relax it, log the decision, because an auditor will ask.
Step 8: Decide where confidential computing is worth it
Confidential computing runs inference inside a hardware trusted execution environment (TEE). Examples include confidential VMs on Intel TDX or AMD SEV-SNP, paired with GPUs that support a confidential mode. Remote attestation lets you verify the software stack before you send data. The promise is that the host operator cannot read memory. We compared the CPU-side options in our confidential VM attestation guide.
Be precise about what a TEE protects. It protects data in use from a curious or compromised host. It does not protect against the application inside the enclave logging prompts to disk, forwarding them, or running with stolen credentials. Attestation proves which code is running. It proves nothing about what that code does with the plaintext unless you can inspect or trust the attested image. A confidential-compute endpoint with an unaudited serving stack is a stronger box with an unknown occupant.
Use confidential inference where three conditions hold. The data is restricted. Self-hosting is impractical. And the provider publishes attestation evidence that binds a known serving image to the endpoint you call. Otherwise, a first-tier provider with a signed ZDR agreement is usually the better trade.
Step 9: Collect audit evidence and score providers
Paper evidence of zero data retention is necessary, even though Step 6 proves it is not sufficient. For each provider, collect:
- SOC 2 Type II report covering the inference service, not just the corporate IT environment. Read the system description and the carve-outs. Subservice organizations listed as “carved out” are the GPU clouds and colocation providers you were trying to find.
- DPA with ZDR terms that define retention per processing path, including abuse monitoring, caching, batch and tooling. The CSA note recommends requiring advance notice before any AI feature starts storing customer content at a subprocessor, and breach-notification timelines that flow down to the inference layer.
- Subprocessor list with a change-notification commitment. Under GDPR Article 28, a processor must not engage another processor without the controller’s authorization. Apply that expectation explicitly to inference subprocessors.
- Penetration test summary and incident history. Several providers published incident notices in November 2026; their quality and speed are themselves evidence.
- Technical attestations: screenshots or API output of retention settings, such as Bedrock’s
data_retentionresponse, Azure’sContentLoggingentry, or OpenAI’s data controls page.

Figure 4: The provider scorecard. Contract, configuration and canary evidence feed a single score; failing providers are suspended, credentials rotated and deletion attested before any re-qualification.
Score each provider on all three evidence types, as Figure 4 shows. A simple, defensible model weights behavioral evidence highest, because it is the only category the provider cannot write for you. For example, a canary hit could be an automatic fail regardless of paperwork. Technical evidence could carry 40% of the remaining score and contract evidence 60%. These weights are illustrative; set your own and document why.
Step 10: Monitor continuously and rehearse the exit
Zero data retention eligibility changes faster than procurement cycles. OpenRouter’s 22 November change removed 125 endpoints from ZDR eligibility in one action. Azure has announced that Modified Abuse Monitoring will not be available for models made available on or after 1 November 2026, from a date to be announced with at least 30 days’ notice per model. Anthropic and Bedrock now gate some models on retention.
Monitoring therefore has four feeds. The router’s ZDR endpoint list, diffed daily against your allow-list. The canary listener, with paging on any hit. Gateway route logs, checked for any served-by provider outside the list. And provider policy pages, watched for changes. A weekly diff of the five provider documentation pages linked above catches most policy drift.
The exit plan is the part most teams skip. Write it before you need it. It should name the alternate provider for each model alias, the config change that removes a provider, the credential rotation runbook, the deletion request template and the customer notification criteria. Then rehearse it: remove a provider from the allow-list in staging and confirm traffic shifts without errors. When the next provider fails a canary test, the exit should be a config commit, not a design meeting.
Trade-offs, Gotchas, and What Goes Wrong
Strict pinning costs availability. Setting allow_fallbacks: false with a single provider means an outage at that provider is an outage for you. The fix is two or three independently vetted providers, not a return to open fallback. Budget for the extra vetting effort, and see our guide to rate limits and provider fallback for retry design inside an allow-list.
Zero data retention can lock you out of the best models. Providers increasingly tie their newest models to retention for safety review. Under Bedrock’s none mode, those models return a ValidationException. Under Anthropic’s legacy ZDR, Covered Models are unavailable unless expressly authorized. You may have to choose between capability and retention. Make that choice per data class, not globally.
Canaries can be detected or create noise. A sophisticated operator who reads logs may learn your canary domain and ignore it. Rotate zones per campaign and keep token formats varied. Conversely, browsing tools, link unfurlers and security scanners at legitimate providers can fetch URLs. Tune for timing and context before you treat a hit as proof of malice, but always treat it as an incident to investigate.
Your own gateway is a retention point. Observability callbacks, spend logs, prompt registries and debugging traces all store prompts. Teams enforce ZDR downstream while keeping 90 days of full prompts in their own tracing backend. Apply the same data classes to your LLM observability stack.
Abuse monitoring is not optional everywhere. Even with ZDR, providers keep the right to retain flagged content, and legal holds override everything. Your risk register should record the residual retention, not claim zero.
Router terms can change your posture without a code change. OpenAI’s policy, effective 20 November 2026, requires prior approval for routers and gateways that provide third parties with direct access to its models, according to reporting by eWeek. If your router loses access, its fallback behavior decides where your traffic goes next. That is another reason to pin.
Contract language rarely covers derived data. KV-cache tensors, embeddings and classifier scores are derived from your prompt. Anthropic keeps trust and safety classifier scores for up to seven years. Ask explicitly whether derived artifacts fall under ZDR.
Practical Recommendations
Start where the risk concentrates. Most organizations send restricted data through a small number of features: coding assistants, support copilots and document analysis. Apply the full procedure to those first. Then extend the allow-list discipline to everything else, so that zero data retention LLM routing becomes the default rather than the exception. A deny-by-default gateway with a short allow-list will do more for your LLM provider data retention posture in one sprint than a year of vendor questionnaires.
Prefer first-tier providers or hyperscaler platforms for restricted data, with retention configured off and the setting enforced by identity policy where the platform supports it. Use routers for public and internal data, and only with pinned providers and fallbacks disabled. Avoid reseller marketplaces for anything you would not publish. Dragos’s guidance is the same: go direct where you can, “the smallest exposure you can buy.”
Treat canary results as the ground truth. A provider with a clean SOC 2 report and a canary hit has failed. A provider with modest paperwork and a year of clean canaries has earned some trust. Revisit the scorecard quarterly, and immediately after any public incident in your supply chain.
Checklist:
- [ ] Supply-chain map per AI feature, including every fallback provider.
- [ ] Data classes defined and carried as a header or key tag.
- [ ] Contractual and technical ZDR documented per provider, with gaps listed.
- [ ] Gateway allow-list pinned, fallbacks off, account-level ZDR enabled.
- [ ] Served-by verification on every response, with fail-closed handling.
- [ ] Secret scanning and PII redaction before the router.
- [ ] Daily canary per allowed route, with paging on hits.
- [ ] SOC 2 Type II, DPA and subprocessor list on file per provider.
- [ ] Exit runbook written and rehearsed in staging.
Frequently Asked Questions
What does zero data retention mean for LLM APIs?
Zero data retention means the provider does not routinely store your prompts or responses after it returns the completion. It is usually an exception to default retention, granted by agreement or configuration. It is not absolute. Providers typically keep the right to retain content flagged by abuse systems and content under legal hold. Stateful features such as batch jobs, files, vector stores and conversation state are usually excluded. Always ask which endpoints, features and caches the commitment covers, and get the answer in writing.
Does OpenRouter’s ZDR setting guarantee my prompts are not stored?
No. OpenRouter’s ZDR setting restricts routing to endpoints whose policies say they do not retain data. OpenRouter states that it does not keep prompts or responses for ZDR-covered traffic unless you opt in. However, the downstream host decides whether to honor its own policy. As reported, OpenRouter’s DPA says ZDR listing is not a guarantee. On 22 November 2026, OpenRouter removed 125 endpoints from ZDR eligibility after research found policy failures. Pin providers and verify with canaries.
Is OpenAI API data used for training?
According to OpenAI’s documentation, data sent to the API has not been used to train or improve OpenAI models since 1 March 2023, unless you explicitly opt in. That is separate from retention. By default, OpenAI keeps abuse-monitoring logs for up to 30 days. Zero Data Retention and Modified Abuse Monitoring remove customer content from those logs, but both require OpenAI’s approval. Some endpoints, including Assistants, Files, Batches and fine-tuning, are not eligible for ZDR.
How do canary tokens detect an AI supply chain data leak?
A canary token is a unique hostname, URL or credential placed in a prompt that nobody should ever use. You log every DNS lookup, web request or login attempt against it. Because each token is sent on exactly one route, any touch identifies the provider chain that exposed it. Timing helps classify the failure: an immediate fetch suggests a tool inside the serving path, while a fetch days later suggests the prompt was stored. Treat every hit as an incident.
Is Amazon Bedrock zero data retention by default?
Not necessarily. Bedrock uses data retention modes. New accounts and projects start at inherit, which falls back to each model’s default policy. Under default, AWS may retain data for abuse prevention, though Bedrock says it does not share content with model providers. To enforce zero retention, set data_retention_mode to none per Region at account or project scope. Bedrock then blocks models that require retention. You can lock that setting in place with a Service Control Policy condition key.
Should I self-host models instead of vetting providers?
Self-hosting removes inference subprocessors from your supply chain, so it is the strongest option for restricted data. It also moves the operational burden to you: GPU capacity, patching, logging discipline and model updates. A poorly run internal cluster can leak through its own logs. The CSA note makes the same point. Many teams use a hybrid approach: self-hosted or first-tier ZDR for restricted data, and pinned, vetted providers for everything else.
Further Reading
- Secrets in AI prompts: how API keys leak through LLM providers, resellers and logs – the threat model behind this procedure.
- LLM gateway architecture reference – where the policy point sits and how to build it.
- LiteLLM vs Portkey vs Kong AI Gateway vs Cloudflare AI Gateway – routing, fallback and budget controls compared.
- PII detection and redaction pipeline for LLM applications – client-side minimization in depth.
- AI model supply chain security and provenance – the model-artifact side of AI supply chain risk.
- Dragos: “Three breaches, endless leaks: Your AI supply chain needs canaries” – the primary research.
- OpenRouter: Data processing incidents on inference providers – the router’s response.
- Amazon Bedrock data retention documentation – retention modes and SCP enforcement.
By Riju — about
