You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Capability Contracts for OpenAI-Compatible Model Gateways (August 2026)
#54
OpenAI-compatible gateways are useful because they let a team use one client while testing many models. The trap is assuming that "compatible" means every route has the same behavior, cost structure, and operational contract.
For production AI applications, I think the safer unit of routing is not a model name. It is a capability contract: a small, versioned record that says what your workflow requires and what you verified before traffic moved.
I rechecked AIWave's live pricing feed on August 9, 2026. The feed returned 62 pricing rows from https://aiwave.live/api/pricing, with endpoint metadata and ratios for OpenAI-compatible routes. A few current examples:
qwen3-coder-480b-a35b-instruct: $0.0600 input, $0.1800 output per 1M tokens; no cache ratio listed
kimi-k2.6: $0.5450 input, about $2.2999 output, about $0.09343 cached input per 1M tokens
glm-5.1: $1.0500 input, about $3.3000 output, about $0.3400 cached input per 1M tokens
ernie-5.1: about $1.027397 input and output, about $0.10274 cached input per 1M tokens
Those prices are not constants to paste into code forever. They are evidence with a date. The useful engineering pattern is to store them beside the behavioral assumptions your application depends on.
The CI check should do two things. First, it should compare the contract with the current pricing and endpoint feed. If a model disappears, loses the expected endpoint type, or changes the cached input ratio your router depends on, the release should require review. Second, it should run tiny behavior probes against a staging key: one basic chat call, one streaming call if the workflow needs streaming, one structured-output probe if downstream code parses JSON, and one tool-call probe if the workflow executes tools.
This is not about benchmarking intelligence. It is about preventing silent integration drift.
The same contract also makes cost controls easier. Before sending a request, estimate cost from the checked input, output, and cached-input rates. After the response, log the workflow name, model, contract version, estimated tokens, returned usage, cached tokens if exposed, retry count, and status. Avoid logging raw prompts by default; the operational metadata is usually enough to debug routing and billing surprises.
One useful release rule is to make contract changes explicit pull requests. If a developer wants to move a workflow from deepseek-v4-flash to qwen3-coder-480b-a35b-instruct, the diff should show both the capability reason and the current price evidence. That keeps model selection out of ad hoc chat threads and puts it into reviewable engineering history.
For teams using Chinese models through an OpenAI-compatible gateway, capability contracts are a practical middle ground. You still get fast model experimentation, but production traffic moves only after the model is present in the live feed, the endpoint shape matches your client, behavior probes pass, and the dated price record is reviewed.
Compatibility is a starting point. A contract is what makes it deployable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
OpenAI-compatible gateways are useful because they let a team use one client while testing many models. The trap is assuming that "compatible" means every route has the same behavior, cost structure, and operational contract.
For production AI applications, I think the safer unit of routing is not a model name. It is a capability contract: a small, versioned record that says what your workflow requires and what you verified before traffic moved.
I rechecked AIWave's live pricing feed on August 9, 2026. The feed returned 62 pricing rows from
https://aiwave.live/api/pricing, with endpoint metadata and ratios for OpenAI-compatible routes. A few current examples:deepseek-v4-flash:$0.1030input,$0.2060output,$0.0206cached input per 1M tokensdeepseek-v4-pro:$0.54375input,$1.0875output,$0.271875cached input per 1M tokensqwen3-coder-480b-a35b-instruct:$0.0600input,$0.1800output per 1M tokens; no cache ratio listedkimi-k2.6:$0.5450input, about$2.2999output, about$0.09343cached input per 1M tokensglm-5.1:$1.0500input, about$3.3000output, about$0.3400cached input per 1M tokensernie-5.1: about$1.027397input and output, about$0.10274cached input per 1M tokensThose prices are not constants to paste into code forever. They are evidence with a date. The useful engineering pattern is to store them beside the behavioral assumptions your application depends on.
A capability contract can be simple:
The CI check should do two things. First, it should compare the contract with the current pricing and endpoint feed. If a model disappears, loses the expected endpoint type, or changes the cached input ratio your router depends on, the release should require review. Second, it should run tiny behavior probes against a staging key: one basic chat call, one streaming call if the workflow needs streaming, one structured-output probe if downstream code parses JSON, and one tool-call probe if the workflow executes tools.
This is not about benchmarking intelligence. It is about preventing silent integration drift.
The same contract also makes cost controls easier. Before sending a request, estimate cost from the checked input, output, and cached-input rates. After the response, log the workflow name, model, contract version, estimated tokens, returned usage, cached tokens if exposed, retry count, and status. Avoid logging raw prompts by default; the operational metadata is usually enough to debug routing and billing surprises.
One useful release rule is to make contract changes explicit pull requests. If a developer wants to move a workflow from
deepseek-v4-flashtoqwen3-coder-480b-a35b-instruct, the diff should show both the capability reason and the current price evidence. That keeps model selection out of ad hoc chat threads and puts it into reviewable engineering history.For teams using Chinese models through an OpenAI-compatible gateway, capability contracts are a practical middle ground. You still get fast model experimentation, but production traffic moves only after the model is present in the live feed, the endpoint shape matches your client, behavior probes pass, and the dated price record is reviewed.
Compatibility is a starting point. A contract is what makes it deployable.
All reactions