Verify the Model Before You Integrate a Relay
An accepted model name does not prove that the request reached the intended model.
SalpX API News covers AI model gateways, Claude and GPT integration practice, and developer tooling such as WorkBuddy.
An accepted model name does not prove that the request reached the intended model.
The danger is a mismatch between units, pre-authorization and retries.
Before topping up, verify credit units, refunds, keys, records and incident handling.
An unusual price must be decomposed into model, I/O, limits, data and refund checks.
The difference is ownership, compatibility, observability and operations.
Caching splits a prompt prefix into three prices — normal input, cache write, cache read. You only start saving on the second reuse, and one channel switch on a gateway can reset your hit rate to zero.
Streaming fixes perceived latency, but after the first token a retry means double billing. Here are the three upstream event formats, what a gateway must translate, and how to resume a broken stream.
A relay is not just a proxy. Auth, routing, rewriting, retries, billing and logging — six gates per request. Here is why changing one base_url line is enough to switch models.
One client call failed upstream, was retried, and succeeded — yet statistics counted it as one success and one failure. After the fix, site-wide failures dropped from 205 log rows to 145 requests.
Claude's native protocol differs from OpenAI's, but a gateway gives you two doors — the native messages endpoint or the OpenAI-compatible chat/completions. Here is the setup for each, plus the three places people break.
The request shape does not change between direct access and a gateway. What changes is parameter strictness, how rate limits are layered, and how retries show up on the invoice.
WorkBuddy supports custom models. Four fields — base URL, API key, model ID, protocol — connect Claude and GPT through your gateway. Here is what each field wants and how the resulting errors read.
The SalpX gateway is OpenAI-SDK compatible. Point base_url at https://www.salpx.com/v1 and you are done.