How to verify a gateway is not a shell: five checks from the outside
Anyone can put an OpenAI-compatible endpoint in front of a queue and answer requests. The hard part is proving that a specific request actually reached the model whose name is in the model field, at the context length and price the seller advertised. The difference between a reseller and a shell is invisible in the happy path — both return a plausible paragraph — so verification has to come from…
OpenAI-compatible endpoints can be placed in front of a queue, but verifying that a specific request reaches the advertised model is challenging. The five checks for verifying a gateway are:
1. Token accounting must scale: Compare prompt_tokens moving roughly tenfold and completion_tokens staying close to constant when sending the same question with a 200-token and a 2,000-token prompt. If the counts barely move, the gateway is not tokenising what it received.
2. Streaming has cadence, not a burst: Measure the time to first token (TTFT) by timestamping each server-sent event (SSE) chunk. A real streaming upstream sends the first token seconds before the last, while a buffered relay shows every delta within the final 200 milliseconds.
3. Model-specific edges must survive: Shells route everything to one underlying model, while real upstreams handle long contexts, tool calls, and reasoning/media differently. Check two cheap checks per provider family to ensure a shell fails both.
4. The metadata surface must hold up against official docs: A real gateway should publish per-model details like context window, capability flags, official price, and source links. A shell shows a truncated model list with no tiers, separate input and output pricing, and no source links.
5. Failures are specific, and uptime is measured: A real gateway returns specific error codes and messages, while a shell returns a generic 500 error. Availability claims should be skeptical, with uptime figures varying per model rather than being 100% for every model.
These checks help detect cheap implementations and ensure the gateway accurately reflects the advertised model and pricing.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to