cd /news/large-language-models/two-fields-not-a-migration-moving-an… · home › topics › large-language-models › article
[ARTICLE · art-177312] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=· neutral

Two fields, not a migration: moving an OpenAI-compatible client to a cheaper endpoint

An engineer running the API side of a small LLM reseller, TapixAI, outlined a five-point checklist for migrating OpenAI-compatible clients such as Open WebUI, LibreChat and Cline to a cheaper endpoint, arguing that switching is a matter of changing the base URL and key rather than rewriting code. The checklist covers model ids in /v1/models, streaming chunk shape, billing minimums and units, token accounting via the usage block, and tool_calls support, with the author warning that agent loops can bill 30–60× the tokens of a single typed sentence.

recommendation

Before migrating, run the same prompt on both providers a week apart and compare usage blocks; if token counts differ by more than a few percent for identical text, the price comparison is invalid.

more in playbook: Controlling LLM cost
by read3 min views6 publishedNov 27, 2026

Most "cheap LLM API" comparisons are price tables. Price tables are the least useful part of the decision, because the thing that actually breaks when you switch providers is never the price — it is the model id, the streaming shape, or a minimum top-up you did not notice.

I run the API side of a small reseller, so read the honest parts below as self-interest in both directions: I want you to test your endpoint properly, and I also want to tell you when switching is a bad idea.

Open WebUI, LibreChat, Cherry Studio, LobeChat, Chatbox and Cline are all OpenAI-compatible clients. They do not call vendor SDKs. Whatever you point them at has to answer four things:

POST /v1/chat/completions with and without stream: true usage block that splits input and output tokensGET /v1/models with ids the client can render in a dropdown Everything else — routing, aggregation, retries — is the provider's problem, not yours. That is why migration is two fields (base URL and key), not a rewrite.

1. Model ids. Aggregators use prefixed ids (anthropic/claude-sonnet), a direct gateway often serves the upstream id ( claude-sonnet-4-6). If the id is not in /v1/models, the client's dropdown stays empty and the user concludes "it doesn't work". Check before blaming the client:

curl -s https://tapixai.com/v1/models -H "Authorization: Bearer $KEY" | head -c 400

2. Streaming chunk shape. Some gateways stream a single final chunk instead of many deltas. That passes in curl and feels broken in a UI that renders token by token. Ask for ~40 tokens of output and count the data: lines. Fewer than five deltas means the UI will feel frozen regardless of real latency.

3. Billing minimums and units. A $10 minimum with $3 of monthly usage is worse than a slightly higher per-token price with a $1 minimum. Also check whether cached input is discounted and whether 429s or timeouts are billed. They should not be.

Compare the same workload, not the same sticker price. For a mid-tier model, one call with 2,000 input and 500 output tokens:

What Where it comes from
input tokens billed usage.prompt_tokens , not your estimate
cached input is prompt caching supported, and does it show as a discount
minimum spend what you must pay before the first useful call
failed calls are rate-limit errors billed

Run the same prompt on both providers, one week apart, and read the usage block both times. If the numbers differ by more than a few percent for identical text, one of them counts differently and your price comparison is measuring nothing.

Cline, Continue and similar agents do not send one request. They loop: read file, propose edit, run tests, read output, retry. Every turn re-sends the conversation so far, so a 20-step task can bill 30–60× the tokens of the sentence you typed.

Two consequences:

There is a trick that beats any discount: point the mechanical turns (rename, import fix, add a log line) at a smaller model and keep the big model for planning. Most agent turns are mechanical.

tools array: the response contains tool_calls, not a paragraph explaining what it would do. If all five pass, you have migrated. If any fails, you have found a reason to stay, and that is worth more than a price table.

If you want to see the whole flow on your own key without touching config first: https://tapixai.com/start runs one real call and prints the error verbatim if it fails. Setup guides for ten clients (Cline, Open WebUI, Cherry Studio, LibreChat, n8n, SillyTavern, LobeChat, Chatbox, Dify, Continue) are at https://tapixai.com/integrations.

── more in #large-language-models 4 stories · sorted by recency
── more on @tapixai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/two-fields-not-a-mig…] indexed:0 read:3min 2026-11-27 · —