AI features in web applications are rarely created today by a direct connection to a single model provider. In between there are often router services, i.e. intermediaries that forward a request to different inference providers depending on price, load or model availability. Inference here simply means the operation of the model that generates a response from an input.

This is precisely where a problem has become visible: via such routers, which forward to particularly cheap inference engines, prompt contents were intercepted. What was intended as cost optimisation thus becomes a supply chain risk – the AI equivalent of dependencies in the software supply chain.

Why the prompt contains more than many assume

In productive applications, a prompt is rarely a harmless question. As a rule, it carries exactly the data that the model needs for a usable answer – and that is often the most valuable thing a system has to offer:

  • Context data from internal systems, such as customer master data, quote contents or ticket histories
  • System prompts with internal rules, wording specifications and business logic
  • Credentials when tool calls or integrations are included – API keys, tokens, connection parameters
  • Document excerpts from retrieval processes, in which suitable passages from an internal knowledge base are copied into the request

If a prompt leaks, it is not only text that leaks. An intercepted key may allow access that goes far beyond the AI use case. And a copied system prompt reveals how an application works internally.

Contractual commitments do not replace control

When using external models, many companies rely on zero data retention commitments, i.e. the assurance that requests are not stored and not reused. Technically, this is often signalled via a flag in the request. In the reported case, however, the model provider MiniMax did not honour these ZDR markers.

This is the really unpleasant point: a flag is a request to a third-party system. Whether it is complied with can practically not be verified from the outside. An application receives the same response regardless of whether the provider discards or retains the data. Misbehaviour thus remains invisible until someone proves it from the outside.

Added to this is the lack of transparency in forwarding. Anyone using a router often does not know in operation exactly which provider processed a specific request and under which legal jurisdiction this happened. For data protection documentation obligations, this is a difficult starting point, because commissioned processing presupposes that the parties involved can be named.

Provider selection belongs in the architecture

The obvious reflex – taking the cheapest token price – falls short. It makes more sense to treat the model connection like any other external interface: with explicit requirements, traceable selection and technical safeguards that do not rely on trust alone.

A number of principles have proven themselves here:

  1. No secrets in the prompt. Credentials belong in the infrastructure, not in the text that goes to a third-party model. Tool calls are better executed server-side, while the model only supplies the business intent.
  2. Data minimisation in the context. Only what is necessary for the specific task belongs in the prompt. Personal fields can often be masked or replaced by placeholders.
  3. Abstraction layer instead of direct coupling. A dedicated intermediate layer in the application decouples the business logic from the provider. This allows a provider to be changed without rebuilding half the application.
  4. Known counterpart. Where sensitive content is processed, there is much to be said for a fixed, documented connection instead of dynamic forwarding to changing providers.
  5. Logging on your own side. Anyone who records which types of data went to which endpoint can limit the scope of an incident in an emergency.
  6. Rotatable keys and narrow permissions. API keys with minimal permission scope and planned rotation limit the damage if something does leak.

Governance: who actually decides on the provider?

In practice, provider selection often migrates into a configuration field and thus out of the sight of those responsible. Especially with router services, the counterpart actually used can change without a single line being touched in your own code.

It therefore makes sense to clearly define which use cases may go to external models at all, which providers are approved for this and who approves a change. For particularly sensitive processing, the option remains of operating smaller models in your own environment or one with clearly regulated contracts – even if this is usually more expensive than the cheapest market price.

A distinction by data class is also useful: publicly available content, internal working data and particularly sensitive information each tolerate different paths. Not every use case needs the strictest regime – but every one needs a deliberate assignment.

Assessment for web and software projects

For projects with AI features, the focus thus shifts: the interesting question is no longer just which model delivers the best answers, but via which chain a request runs and which contents it takes with it.This decision should be documented in the architecture concept and not made casually in the configuration. Anyone who encapsulates the model connection from the outset, keeps secrets out of prompts and limits the context to what is necessary remains able to act – even if a provider does not keep to its commitments.

Sources