How to Tell If an API Is Really the Model It Claims to Be

    Behavioral tests are the most common way to check whether a model API is the model it advertises, but the same abnormal result can come from three unrelated causes: a swapped model, rewritten request parameters, or a lossy adapter layer. This article proposes a three-layer troubleshooting order instead: first confirm the request arrives unchanged by comparing the sent body, the model field, usage details, and finish_reason; then check hard-to-fake signals such as prompt_tokens ratios across fixed text samples and identity fields like model and system_fingerprint; and only run behavioral validation on your own real tasks last, measuring finish_reason distribution, tool-call success and argument completeness, and structured-output parse failure rates. The goal is not to prove an API is fake but to classify each regression so it maps to a concrete action.

    1. Why Behavioral Tests Cannot Find the Root Cause

    When verifying whether a model API is the model it claims to be, the most widely circulated approach in the community is behavioral testing: ask it to draw a pelican, generate random numbers and inspect the distribution, ask for today’s date, feed it sensitive content to see how it refuses, or throw a document of several hundred thousand tokens at it to hit the context limit.

    These methods are not useless, but they all stay at the level of “observing output characteristics.” The real problem is that the same abnormal result can be produced by at least three completely different causes:

    1. The server swapped the model, using a smaller model to impersonate a large one.
    2. Request parameters were not passed through as-is, but rewritten or filled with default values by an intermediate adapter layer.
    3. The API adapter code is poorly written, dropping fields or degrading semantics during protocol conversion.

    The three causes have completely different fixes: the first can only be solved by switching providers, the second requires checking your own call chain, and the third requires filing a ticket or fixing the adapter layer. Testing them all mixed together only tells you “the result is wrong” without telling you what to change. A more reasonable troubleshooting order is therefore the reverse: rule out parameters first, then identity, and leave behavioral tests for last.

    2. Step One: Confirm the Request Actually Arrives Unchanged

    Do not ask the provider first; look at the response body. Construct the same request, send it to both the official direct endpoint and the candidate endpoint, and print four things for each: the body you actually sent (not what the code says, but the content really serialized and transmitted), the model field in the response, the usage details, and finish_reason.

    Illustrative validation logic:

    1. def probe(base_url, payload):
    2. resp = client.post(base_url, json=payload)
    3. data = resp.json()
    4. return {
    5. "sent_body": payload, # The parameters actually sent
    6. "model": data.get("model"),
    7. "usage": data.get("usage"),
    8. "finish_reason": data["choices"][0].get("finish_reason"),
    9. }

    The three most common kinds of “fake dumbing down” all occur at this layer.

    The first is truncated output length. max_tokens was not passed, or the adapter layer filled in a conservative default, so the output is cut off at just over a thousand tokens. It looks like the model has become lazy, but it is actually truncation. The way to tell is finish_reason: a value of length means the length limit caused it, while a value of stop means the model ended naturally.

    The second is degraded system semantics. During cross-protocol conversion, the system message may be concatenated as a user prefix, or replaced with a platform’s fixed assistant persona. Format constraints and role constraints immediately stop working, showing up as “it does not follow instructions.”

    The third is lost tool-calling information. The schema of tools may have its latter half trimmed, and tool_choice may be ignored, so the model does not call a tool when it should, or the call arguments are missing fields.

    If these three are not ruled out, all subsequent identity tests are invalid, because you cannot tell whether the difference comes from the model or from the parameters.

    3. Step Two: Look at a Few Numbers That Are Hard to Fake

    Once the parameter layer is clean, look at prompt_tokens first. This number is not generated by the model but computed by the tokenizer, and different model families use different tokenizers. For the same piece of mixed Chinese-English text, the input token count returned by the official direct endpoint and the candidate endpoint should have a stable proportional relationship; if they differ wildly (for example, by more than a factor of two), you can basically conclude that the tokenizer is not the same. This metric is hard to fake, because changing it means changing the billing basis.

    Recommended approach: prepare three to five fixed text samples (pure Chinese, pure English, mixed Chinese-English, and text containing code and JSON), request each three times and take the median, and record the ratio rather than the absolute values.

    1. Text A: official 512 / candidate 1180 -> ratio 2.30
    2. Text B: official 300 / candidate 690 -> ratio 2.30
    3. Stable ratio but abnormal absolute values => different tokenizer
    4. Randomly fluctuating ratio => the adapter layer is rewriting the input

    Then look at identity fields such as model and system_fingerprint. They can be filled in arbitrarily, so they can only serve as clues, not evidence. But one situation is telling: when you request with different model names, the returned model is always the same value, or it returns a version number that does not exist officially.

    4. Step Three: Use Real Tasks for Behavioral Validation

    Behavioral tests come last, and they must use the real tasks you actually run: take about twenty production samples, a few of which have obviously long outputs, a few of which must trigger tool calls, and a few of which require strict structured output. After running them, do not compare “how similar it looks”; compare only three countable metrics:

    • The distribution of finish_reason (whether the proportion of length rises abnormally).
    • The tool-call success rate and the completeness rate of argument fields.
    • The field completeness rate and parse failure rate of structured output (such as JSON).

    A real model usually fluctuates little on these three metrics; a small model behind a wrapper is concentratedly exposed on long outputs and tool arguments. Repeat each configuration three times and draw conclusions from the fluctuation range rather than a single run.

    5. Conclusion: Separate the Cause Before Discussing Authenticity

    What most people actually need is not “proof that it is fake” but “to classify which kind of problem this regression is.” Parameter problems you can fix yourself, adapter problems can be filed as a ticket, and only a replaced model is truly unsolvable. Fix the troubleshooting order at three layers — parameters, identity clues, behavioral metrics — so that every anomaly maps to a concrete action. If you use model services from platforms such as Baidu AI Cloud, it is likewise advisable to keep a direct-connection baseline for comparison, and to use logging services and monitoring alerts to continuously retain metrics such as usage and finish_reason, so the diagnosis process is reproducible.