LLM Model Swapping Is Hard to Catch: How Reply Verification Proves Which Model Answered

    Can a single response prove which LLM actually ran your request? No, and asking “which model are you?” won't help. This article shows why casual checks such as response style, metadata, signatures and reputation scores all fall short when an aggregator may secretly route premium-model requests to cheaper or distilled models. It then explains reply verification: the provider publishes a cryptographic commitment ID for each model version (a Merkle root over hashed weight shards, plus precision and quantization), binds that ID into an evidence bundle returned with each response, and lets callers verify a credential-model-output chain. The article covers reproducible inference options (deterministic execution, trusted execution environments, probabilistic spot checks), sample code tying the steps together, and what verification cannot do: it proves model identity, not answer quality. Checklists for API consumers and platform builders round out the guide.

    I. The Symptom: Same “Flagship” Model, Wildly Different Results

    Many developers have run into the same confusion. The API documentation says you are calling the same flagship model, yet in some hours the answers are clear and well-reasoned, while in others they miss the point or go in circles. More often than not, “the model feels dumber” is just a subjective impression. It may also come from changes to prompt wording, context length or business rules. But there is another situation that does happen. You pay for a premium model, and somewhere in the middle your requests are quietly forwarded to a lower-cost model, or even to a compressed model built through knowledge distillation.

    From a single response payload, you cannot see which provider sits upstream. You also cannot tell which model, which version or which precision actually ran the inference.

    The industry chain makes the motives easy to understand:

    • Premium models often cost significantly more per call and to serve than lightweight ones.
    • Aggregators and resellers have a built-in incentive to quietly substitute cheaper models and pocket the difference.
    • Some providers even practice “dynamic degradation”: during peak hours they route requests to low-cost models, then switch back to the premium model when traffic is light.

    Industry controversies over the past two years have brought more attention to these issues. One major US LLM provider has repeatedly been reported to have large numbers of fake accounts and abnormal API usage on its platform, with suspicions that these were tied to model distillation. Account sharing and distillation disputes are now practical realities that are hard to avoid. The lesson for end users is straightforward: these services carry risk, and important calls should never rest on “just trust the platform.”

    A second gray area is “service degradation.” The same model can vary in response quality under different workloads and service tiers. Users often call this “dumbing down,” but pinning down exactly what happened is difficult. Without verifiable evidence, users cannot tell random fluctuations from changes in service policy from an actual model swap. Providers that never touched the model often struggle to clear their name, too. With each side holding a different version of events, the debate tends to stall at the level of impressions.

    Here is a thought experiment. Suppose a platform claims to serve a “top-tier model.” It has only two honest choices:

    1. Use the top-tier model and say so.
    2. Use a low-cost model and say so.

    Once it chooses to hide the truth, only two dishonest plays are possible:

    • Impersonation: run a low-cost model while claiming it is the top-tier one.
    • Swapping: claim the top-tier model is used throughout, but switch to a low-cost model along the way.

    The core question behind reply verification is whether users can independently verify, without trusting the platform, that it is not deceiving them in either of these ways.

    II. Why “Quick-and-Dirty” Checks Don’t Work

    2.1 Why asking “which model are you?” proves nothing

    The first instinct is to ask “What model are you?” and see what comes back. But system prompts generally take priority over user messages. If the middle layer injects a line such as “You are a certain flagship model,” any model will answer accordingly. Model identities are shaped by alignment policies, too. Many models deflect or give vague answers when asked about their underlying architecture. Whatever a model says about itself cannot serve as evidence.

    2.2 Where existing detection methods fall short

    Detection method What it can show What it cannot show
    Asking “which model are you?” or judging response style Whether the style roughly resembles a certain class of model Could be faked via system prompts; style can also be mimicked through prompts
    Checking response fields and model identifiers Whether the field structure and claimed model name look correct Both are filled in by the middle layer and can be forged at will
    Verifying a signature attached to the response That the response came from a given provider’s API Which model, version or precision produced it
    Prompting the model to expose its capabilities (e.g., complex reasoning tasks) How good the answers are Model capabilities overlap heavily, so this cannot pin down an identity

    The upshot: existing tools can at best establish that the upstream is a given provider. Whether it was a flagship or a lightweight model, or a full or distilled version, is largely left to guesswork.

    2.3 Why reputation mechanisms fall short, too

    Reputation signals such as ratings, word of mouth and community rankings are essentially a repeated game. Platforms are wary of cheating because they care about their long-term reputation. But they have three built-in weaknesses:

    • Feedback lags, and users often notice quality differences only after the fact.
    • Ratings are easy to manipulate, so the underlying facts are hard to reconstruct.
    • They can shift the strength of trust but cannot settle the matter at the level of a single API call.

    This is exactly where reply verification comes in. It works at the level of a single call and turns an abstract notion of “trust” into an evidence chain that anyone can re-check.

    III. The Core Idea: From “Trust” to “Proof”

    Here, “proof” borrows from the concept of cryptographic commitment schemes. A useful analogy is a locked transparent box:

    1. A puts a secret inside the box and publishes the “fingerprint” of the key for everyone to see.
    2. Later, to prove what is inside, A opens the key and the box together. Anyone can then verify that the key really opens the lock matching that fingerprint.

    Commitment schemes are generally required to satisfy two properties:

    • Binding: once the commitment is published, A cannot claim the box held something else.
    • Hiding: the fingerprint alone reveals nothing about what is inside the box.

    There are at least two common implementations:

    • Hash commitments: hash the secret together with a random nonce, then publish the hash value.
    • Pedersen commitments: built on elliptic-curve point arithmetic, they allow commitment(A+B) = commitment(A) + commitment(B). As a result, they support addition and subtraction on the committed values, as well as range proofs.

    Pedersen commitments matter a great deal for protecting model weights. Weights consist of large numbers of high-dimensional floating-point values. If commitments are published as plain-text hashes, attackers can attempt offline brute-force enumeration. Only a scheme with stronger hiding, combined with segmented commitments, can lower the risk of weight leakage.

    Applied to model serving, reply verification has two steps: commit first, prove later. Under an ideal design, the proof must satisfy three properties:

    1. Verifiable: anyone can check it independently.
    2. Unforgeable: the probability of fooling the verifier is negligibly small.
    3. Strongly binding: a successful verification means the model that ran the inference is the one covered by the published commitment.

    IV. How It Works: Four Steps of Reply Verification

    4.1 Step 1: Model commitment — give the weights a “fingerprint”

    For each model version, the provider builds a commitment, published as a “commitment ID.” In practice, this usually works as follows:

    1. Serialize all weights into a byte stream using fixed rules, such as a uniform precision, byte order and tensor layout.
    2. Hash each shard of the serialized weights (for example, each weight tensor). These hashes become the leaf nodes.
    3. Use a Merkle tree to hash the leaves pairwise, layer by layer. The root hash becomes the commitment ID.
    4. Publish it together with the version number, precision and quantization scheme, optionally with a trusted timestamp.

    Two details are worth noting:

    • Why a Merkle tree works so well: to prove that a given weight shard belongs to the commitment, you only need to publish that leaf’s hash and the verification path from leaf to root. The path is about log₂(N) long. The verifier only needs to compute a few hashes and never has to download the entire model. Different model families can use the same structure, which makes verification easier to standardize.
    • Precision and quantization are part of the commitment: the same model yields a different fingerprint at a different precision or with a different quantization scheme. If a platform claims to offer a high-precision version but actually serves a quantized one, the fingerprints won’t match.
    1. Model files (sharded weights)
    2. │
    3. ▼
    4. [Normalized serialization] → hash each shard → leaf nodes
    5. │
    6. ▼
    7. [Merkle tree] hash pairwise, layer by layer
    8. │
    9. ▼
    10. Commitment ID (root hash) + version + precision → published

    4.2 Step 2: Bind the model at inference time

    When a user sends a request, they include the commitment ID. In the response, the service attaches an evidence bundle for that inference run. The bundle typically includes:

    • The commitment ID and version of the model actually used.
    • The inference configuration, such as sampling parameters, maximum generation length, and quantization and precision details.
    • Hashes of the prompt and of the model’s output.
    • A Merkle verification path or opening proof demonstrating that “the weights behind this commitment are the ones that ran the inference.”

    Here, the commitment ID works like a fingerprint in a certificate. Once a caller starts using a given commitment ID, it becomes hard for the provider to “swap in someone else” when responding.

    4.3 Step 3: Client-side verification — one chain of evidence

    After receiving a response, the caller verifies three layers in order: credentials → model → output.

    1. Credential layer: confirm that the model provider really published this commitment ID, and that its version and precision match what you expect.
    2. Model layer: recompute the root hash from the Merkle path and compare it with the published commitment. This confirms that the weights used for inference were not swapped.
    3. Output layer: check that the configuration evidence is internally consistent. If needed, combine it with reproducible inference and recompute the result to confirm that the output really came from that model.

    Only when all three layers pass can you conclude that the answer came from the committed model and that no swap took place along the way.

    4.4 Step 4: Reproducible inference — bind the output itself

    Even when the model fingerprint matches, you still need to prove that the output really came from this inference run. Otherwise, the platform could generate content with another model and assemble evidence around it. Three common approaches are used in practice:

    • Deterministic inference: under the same weights, configuration and hardware, require bit-for-bit reproducible output. LLM inference involves floating-point arithmetic, and batch size, parallelism strategy and hardware differences can introduce tiny numerical differences. In engineering practice, teams usually fix the computation path or agree on an acceptable range of deviation.
    • Trusted execution environments (TEEs): run the inference inside an isolated hardware environment and produce an attestation for external verification. The downside is that this depends on specific hardware and is hard to scale.
    • Probabilistic sampling and cross-checks: apply verifiable transformations to key constraints, then spot-check with a certain probability. This raises the chance of catching cheating to an acceptable level.

    4.5 Sample code: tying the four steps together

    1. import hashlib
    2. def sha256(data: bytes) -> bytes:
    3. return hashlib.sha256(data).digest()
    4. # ---------- Step 1: Model commitment ----------
    5. def build_commitment(tensor_shards: list[bytes]) -> bytes:
    6. """Hash the weight shards into leaves, then hash pairwise layer by layer to get the Merkle root (commitment ID)."""
    7. level = [sha256(shard) for shard in tensor_shards]
    8. while len(level) > 1:
    9. if len(level) % 2: # if the number of nodes is odd, duplicate the last one
    10. level.append(level[-1])
    11. level = [sha256(level[i] + level[i + 1]) for i in range(0, len(level), 2)]
    12. return level[0]
    13. # ---------- Step 2: Generate an evidence bundle at inference time ----------
    14. def run_inference(model, commitment_id, prompt, cfg):
    15. # Pseudocode: check that the model weights loaded for this run match the commitment ID, otherwise refuse service
    16. assert model.current_commitment() == commitment_id
    17. output = model.generate(prompt, **cfg) # use a fixed random seed to make recomputation easier
    18. return {
    19. "commitment_id": commitment_id, # fingerprint of the model actually used for this call
    20. "config": cfg, # sampling parameters, precision, etc.
    21. "prompt_hash": sha256(prompt.encode()).hexdigest(),
    22. "output_hash": sha256(output.encode()).hexdigest(),
    23. }
    24. # ---------- Step 3: Client-side verification ----------
    25. def verify(response, published_root, recomputed_output_hash=None):
    26. # 1) Confirm the commitment ID is on the provider's published list (in practice, get it via a signature or trusted list)
    27. if response["commitment_id"] != published_root:
    28. return False # model does not match the commitment
    29. # 2) If inference is reproducible, recompute the output hash and compare
    30. if recomputed_output_hash is not None:
    31. return recomputed_output_hash == response["output_hash"]
    32. return True # only proves the model was not swapped; the output was not checked

    This code is only an illustration of the principle. A real system also has to solve engineering problems such as signing commitments, protecting evidence from forgery, reproducibility under batched inference and performance overhead.

    V. The Limits: What Reply Verification Can and Cannot Do

    No mechanism is stronger than its assumptions, and understanding the limits is part of using it correctly:

    1. It proves model identity, not answer quality. A successful proof shows that the answer came from the committed model, not that the answer is correct or good.
    2. It does not cover anything outside the model. Context retrieval, tool calls, safety filtering and post-processing are all outside the scope of a model commitment. Substitutions or changes in these stages go undetected.
    3. It depends on the provider’s cooperation. If the provider does not present commitments and evidence, users have nothing to verify against.
    4. Distilled models cannot pass by “editing their fingerprints.” A distilled model has different weights, so its commitment ID is necessarily different. If it somehow remains “compatible” with the original model’s commitment through another channel, that is effectively a public admission of impersonation.
    5. Reproducible inference has a cost. Fixing the computation path or narrowing the parallelism strategy can reduce throughput. TEEs depend on specific hardware. Businesses need to weigh these trade-offs.
    6. It holds under an honest, falsifiable model of provider behavior. Providers are bound by terms and reputation, not arbitrary adversaries. Reply verification can remove unfounded accusations and make cheating such as model swapping detectable and traceable.

    In short, a verification proof is a baseline tool against swapping and impersonation, not a universal guarantee of quality.

    VI. Practical Advice for Developers and Enterprises

    6.1 For users: build your own verification loop

    • Make the commitment ID a mandatory check before every call, mapped one-to-one to the model version and precision your business requires.
    • Get the provider’s official list of commitments through trusted channels, such as a signed list or the official release page, to avoid phishing.
    • At the gateway, log the commitment ID and evidence bundle for every call. Sample-check them regularly and set up automatic alerts for anomalies.
    • For data retention, archive model evidence alongside business logs in object storage and use a log service to search and audit them. Connect monitoring and alerting to signals such as “commitment ID mismatch” or “sudden spike in verification failures” so they can be flagged promptly.

    6.2 For platform operators: build verifiability into the system

    • Entry layer: enforce authentication, quotas and auditing at the gateway to prevent account sharing and abuse.
    • Inference layer: rely on general-purpose infrastructure capabilities, such as elastic scaling on a container platform, message queues for peak shaving and object storage for model assets.
    • Model supply chain: hash-check and signature-verify model files so that weights from unknown sources cannot carry backdoors into your system.
    • Evaluation layer: maintain a fixed set of test questions and scoring criteria, and regularly compare outputs against previous runs to turn subjective impressions into quantifiable metrics.

    6.3 Advice that applies to everyone

    • For critical workloads, avoid relying on a single provider. Design multi-model routing and fallback plans.
    • For high-value scenarios such as code generation and data analysis, favor service offerings that support model credentials and reproducible inference.

    VII. Conclusion

    From “just ask it who it is” to weight commitments and Merkle trees, trust in the identity of LLM services is turning from a verbal promise into an evidence chain that anyone can re-check.

    For developers, this means two things. You no longer have to judge model quality by feel. You also don’t have to take any platform’s marketing claims at face value; you can verify them with your own tools.

    For model providers, verifiability is becoming a new foundation of trust. Rather than getting caught in arguments over “dumbing down,” you can present evidence that others can review.

    When proof replaces trust, there is steadily less room for watered-down or swapped models, and competition in the model-service market will return to real capability.