Catching Shady AI Providers Swapping Smart Models for Cheaper Impostors
Original paper: API-TAIL: Detecting Model Substitution in LLM APIs through Temperature-Aligned Likelihood Tails
"Think of an audio engineer balancing a recording of a world-class string quartet performing in an unfamiliar concert hall. Legitimate server settings merely adjust the room's master volume, raising or lowering the loudness across every instrument uniformly. Once API-TAIL centers that overall volume baseline, an impostor cheap model reveals itself like a hidden plastic kazoo, producing bizarre, discordant notes that no violin could ever legitimately play."
Businesses spend millions of dollars relying on premium AI endpoints for mission-critical code, finance, and healthcare tasks. Without reliable oversight, untrustworthy vendors can quietly pocket profits by downgrading query intelligence behind closed doors. This tool gives developers a low-cost, mathematical polygraph test to ensure they actually receive the flagship intelligence they pay for.
- Unscrupulous AI providers can cut costs by secretly routing queries to cheaper models.
- API-TAIL normalizes server configurations before scanning for anomalous, out-of-character responses.
- The method reliably catches bait-and-switch downgrades using minimal query budgets.
📑 Original arXiv Technical Abstract
Commercial language model APIs return only text, allowing a provider to cut costs by quietly routing a fraction of user requests to a cheaper substitute model while billing for the advertised one. Detecting such partial substitution is challenging because honest providers also alter the output distribution through undocumented decoding and serving choices, such as temperature scaling, sampling truncation, repetition and presence penalties, and default system prompts, forcing an audit to test against a composite null of legitimate configurations rather than a single reference. Our key insight is that these legitimate variations primarily shift response typicality across the entire batch, whereas partial substitution injects individual responses that remain anomalous under the claimed model. Building on this, we introduce API-TAIL, a typicality audit that first absorbs batch-level shifts by aligning a single effective temperature to center standardized surprisal scores across the audited batch, and then flags the endpoint if the number of remaining tail responses exceeds a threshold calibrated across legitimate configurations. Evaluated on real-world commercial APIs, API-TAIL reliably controls false alarms across diverse honest providers while detecting even low-rate partial substitution with a small query budget, substantially outperforming existing rank- and MMD-based audits that lose detection power under the same composite calibration.
✍️ Are you an author of this paper? Add code/demo links or a note
Help readers explore your work — share your official GitHub repo, Hugging Face weights, affiliation, or a clarification note for our editorial review queue.