Every call to an inference service is an exercise in trust. Trust that the provider on the other end has built systems designed to preserve their users’ privacy, and trust that those systems are functioning as intended.

We recently concluded an independent audit of Modal’s zero data retention (ZDR) compliance for Model APIs, our LLM inference product serving trillions of tokens per week. In partnership with Doyensec, we’ve produced an audit report verifying our systems as ZDR-compliant.

We’ve also partnered with Opper, Ramp Router, and Vercel to help their users choose providers with independent ZDR audits through new platform features and controls.

You can request the audit report through our Trust Center.

What is ZDR?

ZDR has a shared industry definition: AI systems shouldn’t retain inputs or outputs beyond what’s needed to complete a task. In practice, “needed to complete a task” gets blurry due to how modern inference engines operate.

For example, inference engines are built to hold on to state for performance. KV and prefix caching keep computation derived from one request in memory so the next request can reuse it, and routers track which replicas have seen which prefixes to improve cache hit rates. None of this is a stored copy of a request, but it is data derived from customer content that outlives the request that produced it.

Inference providers generally don’t consider either of these practices a ZDR violation, since neither stores the original request or response. Still, caching is a good example of the bluntness of the ZDR definition. In our own verification process, we apply five ZDR requirements that customers should evaluate when selecting inference providers.

In these requirements, “customer content” means prompts, system messages, files, images, audio, model outputs, embeddings, and anything derived from them.

  • Single-purpose. Customer content is processed solely to fulfill the inference request and is not used for model training, product improvement, or evaluations.
  • No persistence. Customer content is never written to disk and does not appear in logs, traces, error reports, analytics, support tooling, or backups.
  • Memory only. Customer content is processed only in volatile memory or in bounded, memory-only caches with no disk persistence.
  • No third-party retention. Customer content is never passed to an upstream provider or subprocessor that retains it.
  • Documented, content-free metadata. Metadata never contains customer content. Providers may keep operational records (timestamps, model names, token counts, latency, status codes, and billing identifiers), but any retained metadata must be documented.

Even with these requirements, open-source inference engines can make ZDR difficult to operationalize. Many engines write request and crash logs by default or with a small configuration change. And stdout and stderr, essential during development, can easily become footguns in production: once a log collector picks them up, any request or response printed there ends up on disk.

In the next section, we’ll discuss why we chose SGLang as the inference engine powering Model APIs, and three log paths we’ve discovered and closed to ensure ZDR compliance.

Making our inference engine ZDR-compliant

We use SGLang as the inference engine for most of our Model APIs. We love the performance rigor of the project and collaborate regularly with the SGLang team to enhance support for models and improve the performance of different layers.

SGLang is built as a mature, production-ready service, including detailed logging tools that make it easier to debug issues. Although detailed logs are helpful in development, they store request content; under ZDR compliance, they can’t be written anywhere that lives longer than the request. So we identified these logging paths and changed them to print error sizes and types instead of content, with a flag to get the original output back. This keeps the log useful enough for debugging without retaining any request content.

A few notable examples of paths we’ve altered:

Watchdog dump prints every request in the batch

SGLang runs a watchdog which identifies when the scheduler is stalled. When that happens, it logs the batch of requests the scheduler was working on, which is helpful in debugging incidents.

For every request in that batch, the watchdog logs the full prompt and output as token IDs along with the request’s schema and sampling parameters. Since the tokenizer is open source, anyone with access to the token IDs can decode them back to text. So, we changed the log contents by keeping just the request ID, input length, output length, and grammar type, while dropping the rest. In most instances, this should be helpful enough to debug stalls without retaining customer content.

The watchdog used to log every request’s token IDs and schema:

Scheduler debug info:
scheduler.cur_batch_for_debug.batch_size()=32
scheduler.cur_batch_for_debug.reqs=[Req(rid=a1b2..., input_ids=array('q', [9906, 1917, 527, ...1,843 token ids...]), output_ids=array('q', [40, 1053, ...212 token ids...]), self.grammar=XGrammarGrammar(self.key_string='{"properties": {...whole schema...}}', ...), self.sampling_params=SamplingParams(stop=[...], ...)), Req(...), ...]

Now it logs only the request ID, lengths, and grammar type:

Scheduler debug info:
scheduler.cur_batch_for_debug.batch_size()=32
scheduler.cur_batch_for_debug.reqs=[Req(rid=a1b2..., input_len=1843, output_len=212, grammar=XGrammarGrammar), Req(...), ...]

Request-handling exceptions include the request

When failures occur during request handling, SGLang logs the exception, where exception messages can have image URLs, base64 image fragments, a regex that couldn’t compile, etc. Of course, these can contain customer content, so logging them isn’t ZDR-compliant.

We began addressing this by redacting the sites we found, but fixing them one by one is insufficient; developers can miss exception messages and new code can add more. For a more durable fix, we added a hook in SGLang’s HTTP server, scheduler, and detokenizer processes—replacing the exception message with its exception type, length, and code stack frames.

An invalid image used to log its URL:

invalid IMAGE data at index=0: <error quoting the image URL>

Now the log keeps only the exception type and length:

invalid IMAGE data at index=0: ValueError(<redacted len=96>)

Structured output errors log the request’s whole schema

For many use cases, a client would need the inference response to return structured outputs—output shapes following a JSON schema, regex, or a fixed grammar. One of these can be sent over in the request in SGLang and it compiles it before generating outputs. If there is a failure, SGLang logs the schema and the compiler’s errors. Since the schema is from the request, it can reveal a client’s fields in logs. In this case, ZDR compliance requires redacting the actual schema and the error, only logging the length and the error type.

A failed schema used to be logged in full:

Hit invalid json_schema: key_string='{"properties": {...whole schema...}}', e=RuntimeError('...')

Now the log keeps only its length and error type:

Hit invalid json_schema: key_string=<redacted len=412>, e=RuntimeError(<redacted len=87>)

These are just a few examples of the fixes we’ve deployed to run SGLang in production while maintaining ZDR compliance.

Compliance in LLM gateways

Our goal is to make independent audits an industry-standard tool for building trust in AI infrastructure. In order for that to be true, LLM inference customers need clarity on how providers handle their data—whether they use inference providers directly or through a gateway.

We’re partnering with Opper, Ramp Router, and Vercel to help inference customers make informed choices about who to trust with their data. We’ve provided our audit results to each of these partners, who will be implementing audited ZDR provider tiers, team-wide policy settings, and other features to make it easier for users to pin API calls to Modal and other verified providers.

We’re looking forward to joining with other teams in the ecosystem to provide more clarity for customers.