feat(sse): Cheaper Inference provider — chat + native Responses + images, sponsor rail 2nd (#9043)

Registers Cheaper Inference (api.cheaperinference.com) as an OSS-sponsor gateway provider.

- Canonical provider `cheaperinference` (alias `cinf`) + routing registry with 39 measured text models
- Dedicated executor: forces `store:false` on the native /v1/responses endpoint (the shared strip in
  chatCore.ts deletes `store` for every provider != openai, so without this every Responses request
  400'd) and resolves chat-vs-responses URL from the per-model targetFormat
- 3 image models (grok-imagine, nano-banana-pro, nano-banana-2), prefix-only: the two nano-banana ids
  already belong to adobe-firefly, which keeps the bare-id routing
- Resale pricing measured from GET /v1/models (30% off list); sponsor rail Kimi 1st / Cheaper
  Inference 2nd via an explicit rank map; supporter badge in 43 locales; README row

No quota card: the gateway exposes no balance API (/v1/wallet and /v1/balance both 404).

Validated live end-to-end through OmniRoute: chat, native Responses, streaming and image generation
all 200 with real content; the Firefly collision guard verified at runtime.
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-07-31 07:53:41 -03:00
committed by GitHub
parent 9b3efef806
commit 371c10ea5f
64 changed files with 1162 additions and 30 deletions

View File

@@ -81,6 +81,7 @@ const KNOWN_SVGS = new Set([
"cartesia",
"cerebras",
"charm-hyper",
"cheaperinference",
"chipotle",
"chutes",
"clarifai",

View File

@@ -22,6 +22,8 @@ export const PROVIDER_COLORS = {
qoder: { bg: "#EC4899", text: "#fff", label: "Qoder" },
fireworks: { bg: "#F97316", text: "#fff", label: "Fireworks" },
kimi: { bg: "#06B6D4", text: "#fff", label: "Kimi" },
// Dark foreground: #31f889 is a bright green, white text on it fails contrast.
cheaperinference: { bg: "#31f889", text: "#04170d", label: "Cheaper Inference" },
};
// ═══════════════════════════════════════════

View File

@@ -15,6 +15,220 @@ export const DEFAULT_PRICING_INFERENCE = {
cache_creation: 2.0,
},
},
// Cheaper Inference resale rates — captured from GET /v1/models on 2026-07-31
// (the catalog reports discount_percent "30.00" against model-maker list price).
// USD per 1M tokens. `reasoning` mirrors `output`: the gateway bills reasoning
// tokens at the output rate. Live drift is available via GET /v1/pricing/changes,
// which is intentionally not auto-synced.
cheaperinference: {
"aion-labs.aion-2-0": {
input: 0.56,
output: 1.12,
cached: 0.175,
reasoning: 1.12,
cache_creation: 0.56,
},
"claude-fable-5": {
input: 7.0,
output: 35.0,
cached: 0.84,
reasoning: 35.0,
cache_creation: 10.5,
},
"claude-haiku-4.5": {
input: 1.0,
output: 5.0,
cached: 0.1,
reasoning: 5.0,
cache_creation: 1.0,
},
"claude-opus-4-7-fast": {
input: 21.0,
output: 105.0,
cached: 2.1,
reasoning: 105.0,
cache_creation: 21.0,
},
"claude-opus-4-8-fast": {
input: 7.0,
output: 35.0,
cached: 0.7,
reasoning: 35.0,
cache_creation: 7.0,
},
"claude-opus-4.5": {
input: 3.5,
output: 17.5,
cached: 0.42,
reasoning: 17.5,
cache_creation: 3.5,
},
"claude-opus-4.6": {
input: 3.5,
output: 17.5,
cached: 0.42,
reasoning: 17.5,
cache_creation: 3.5,
},
"claude-opus-4.7": {
input: 3.5,
output: 17.5,
cached: 0.42,
reasoning: 17.5,
cache_creation: 3.5,
},
"claude-opus-4.8": {
input: 4.2,
output: 21.0,
cached: 0.42,
reasoning: 21.0,
cache_creation: 5.25,
},
"claude-opus-5": {
input: 3.5,
output: 17.5,
cached: 0.35,
reasoning: 17.5,
cache_creation: 4.375,
},
"claude-opus-5-fast": {
input: 7.0,
output: 35.0,
cached: 0.7,
reasoning: 35.0,
cache_creation: 8.75,
},
"claude-sonnet-4.5": {
input: 2.1,
output: 10.5,
cached: 0.2625,
reasoning: 10.5,
cache_creation: 3.2812,
},
"claude-sonnet-4.6": {
input: 2.1,
output: 10.5,
cached: 0.252,
reasoning: 10.5,
cache_creation: 3.15,
},
"claude-sonnet-5": {
input: 1.4,
output: 7.0,
cached: 0.14,
reasoning: 7.0,
cache_creation: 1.75,
},
"deepseek-v4-flash": {
input: 0.098,
output: 0.196,
cached: 0.0196,
reasoning: 0.196,
cache_creation: 0.098,
},
"deepseek-v4-pro": {
input: 0.3045,
output: 0.609,
cached: 0.231,
reasoning: 0.609,
cache_creation: 0.3045,
},
"gemini-2.5-flash": {
input: 0.21,
output: 1.75,
cached: 0.021,
reasoning: 1.75,
cache_creation: 0.0583,
},
"gemini-3-5-flash": {
input: 1.05,
output: 6.3,
cached: 0.1085,
reasoning: 6.3,
cache_creation: 0.0602,
},
"gemini-3-flash-preview": {
input: 0.35,
output: 2.1,
cached: 0.049,
reasoning: 2.1,
cache_creation: 0.35,
},
"gemini-3.1-flash-lite": {
input: 0.2485,
output: 1.4913,
cached: 0.0249,
reasoning: 1.4913,
cache_creation: 0.0828,
},
"gemini-3.1-pro": {
input: 2.0,
output: 12.0,
cached: 0.2,
reasoning: 12.0,
cache_creation: 0.375,
},
"gemini-3.1-pro-preview": {
input: 1.4,
output: 8.4,
cached: 0.4375,
reasoning: 8.4,
cache_creation: 1.4,
},
"glm-4.5": { input: 0.42, output: 1.54, cached: 0.077, reasoning: 1.54, cache_creation: 0.42 },
"glm-4.5-air": {
input: 0.14,
output: 0.77,
cached: 0.021,
reasoning: 0.77,
cache_creation: 0.14,
},
"glm-4.6": { input: 0.42, output: 1.54, cached: 0.21, reasoning: 1.54, cache_creation: 0.42 },
"glm-4.7": { input: 0.42, output: 1.54, cached: 0.11, reasoning: 1.54, cache_creation: 0.42 },
"glm-5": { input: 0.7, output: 2.24, cached: 0.2, reasoning: 2.24, cache_creation: 0.7 },
"glm-5.1": { input: 0.98, output: 3.08, cached: 0.2275, reasoning: 3.08, cache_creation: 0.98 },
"glm-5.2": { input: 0.77, output: 2.42, cached: 0.11, reasoning: 2.42, cache_creation: 0.77 },
"google/gemini-3.5-flash-lite": {
input: 0.3,
output: 2.5,
cached: 0.03,
reasoning: 2.5,
cache_creation: 0.3,
},
"gpt-5.4": {
input: 1.75,
output: 10.5,
cached: 0.2191,
reasoning: 10.5,
cache_creation: 1.75,
},
"gpt-5.4-mini": {
input: 0.525,
output: 3.15,
cached: 0.0656,
reasoning: 3.15,
cache_creation: 0.525,
},
"gpt-5.5": { input: 3.5, output: 21.0, cached: 0.4375, reasoning: 21.0, cache_creation: 3.5 },
"gpt-5.6-luna": { input: 0.4, output: 2.4, cached: 0.05, reasoning: 2.4, cache_creation: 0.4 },
"gpt-5.6-sol": {
input: 3.5,
output: 21.0,
cached: 0.4375,
reasoning: 21.0,
cache_creation: 3.5,
},
"gpt-5.6-terra": { input: 1.0, output: 6.0, cached: 0.125, reasoning: 6.0, cache_creation: 1.0 },
"grok-4.5": { input: 1.4, output: 4.2, cached: 0.35, reasoning: 4.2, cache_creation: 1.4 },
"kimi-k3": { input: 2.1, output: 10.5, cached: 0.2625, reasoning: 10.5, cache_creation: 2.1 },
"minimax-m2.7": {
input: 0.168,
output: 0.672,
cached: 0.0525,
reasoning: 0.672,
cache_creation: 0.168,
},
},
synthetic: {
"hf:openai/gpt-oss-120b": {
input: 0.1,

View File

@@ -3,6 +3,22 @@
* Pure data; merged by apikey/index.ts via spread (god-file decomposition; semantic split).
*/
export const APIKEY_PROVIDERS_GATEWAYS = {
// Cheaper Inference (https://cheaperinference.com) — OSS-sponsor gateway.
// Cost-ranked reseller of 42 upstream models (Anthropic/OpenAI/Google/Moonshot/
// xAI/Z.AI/DeepSeek/MiniMax) behind one OpenAI-compatible surface, with a native
// /v1/responses endpoint and 3 image models. Keys are `ir_live_…` bearer tokens.
cheaperinference: {
id: "cheaperinference",
alias: "cinf",
name: "Cheaper Inference",
icon: "savings",
color: "#31f889",
textIcon: "CI",
website: "https://cheaperinference.com",
apiHint:
"Create an API key at https://cheaperinference.com (needs the `inference` scope), then paste the ir_live_… token here.",
passthroughModels: true,
},
"charm-hyper": {
id: "charm-hyper",
alias: "charm-hyper",