fix(models): refresh OpenRouter prices from the models API (inkling cache price) (#230)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -222,9 +222,9 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
|
||||
supportsVision: false,
|
||||
},
|
||||
// -- OpenRouter (gateway: OpenAI-compatible protocol, preset base URL). Prices re-read in
|
||||
// one pass on 2026-08-03 from the models API (/api/v1/models): cache_read stores the
|
||||
// published input_cache_read (falling back to the input price for the few rows without
|
||||
// one — qwen3.6-35b-a3b, thinkingmachines/inkling and the :free rows); cache_write stores
|
||||
// one pass on 2026-08-07 from the models API (/api/v1/models; the API is authoritative
|
||||
// where a model's web page disagrees): cache_read stores the published input_cache_read
|
||||
// (falling back to the input price for the few rows without one — the :free rows); cache_write stores
|
||||
// input_cache_write only when it is a genuine per-token write premium (the Anthropic, GPT
|
||||
// and qwen3.8-max rows, 1.25x input) —
|
||||
// Gemini's field is an hourly cache-STORAGE rate, not a per-token price, so those rows
|
||||
@@ -297,7 +297,7 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
|
||||
displayName: "DeepSeek V4 Flash",
|
||||
provider: "openrouter",
|
||||
contextWindow: 1000000,
|
||||
pricing: usd(0.028, 0.14, 0.28),
|
||||
pricing: usd(0.01764, 0.0882, 0.1764),
|
||||
supportsVision: false,
|
||||
clientType: "openai",
|
||||
baseUrl: OPENROUTER_BASE_URL,
|
||||
@@ -387,7 +387,7 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
|
||||
displayName: "Kimi K2.6",
|
||||
provider: "openrouter",
|
||||
contextWindow: 262144,
|
||||
pricing: usd(0.2, 0.6, 3.41),
|
||||
pricing: usd(0.0992, 0.589, 2.48),
|
||||
supportsVision: true,
|
||||
clientType: "openai",
|
||||
baseUrl: OPENROUTER_BASE_URL,
|
||||
@@ -473,13 +473,11 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
|
||||
baseUrl: OPENROUTER_BASE_URL,
|
||||
},
|
||||
{
|
||||
// Neither the OpenRouter page nor AgentHub's registry publishes a cache price for this
|
||||
// model, so cache_read repeats the input price (no discount assumed).
|
||||
modelId: "qwen/qwen3.6-35b-a3b",
|
||||
displayName: "Qwen 3.6 35B A3B",
|
||||
provider: "openrouter",
|
||||
contextWindow: 262144,
|
||||
pricing: usd(0.14, 0.14, 1),
|
||||
pricing: usd(0.05, 0.14, 1),
|
||||
supportsVision: true,
|
||||
clientType: "openai",
|
||||
baseUrl: OPENROUTER_BASE_URL,
|
||||
@@ -507,14 +505,13 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
|
||||
},
|
||||
{
|
||||
// Thinking Machines Lab's Inkling (released 2026-07-14): multimodal (image + audio
|
||||
// input). Specs and pricing from its OpenRouter page (2026-08-06), which publishes no
|
||||
// cached-input price, so cache_read repeats the input price (no discount assumed; see
|
||||
// the block comment above).
|
||||
// input). Specs from its OpenRouter page; pricing from the models API (2026-08-07),
|
||||
// which publishes $1 input (the page shows $0.95) and a $0.17 cached-input price.
|
||||
modelId: "thinkingmachines/inkling",
|
||||
displayName: "Inkling",
|
||||
provider: "openrouter",
|
||||
contextWindow: 1000000,
|
||||
pricing: usd(0.95, 0.95, 4.05),
|
||||
pricing: usd(0.17, 1, 4.05),
|
||||
supportsVision: true,
|
||||
clientType: "openai",
|
||||
baseUrl: OPENROUTER_BASE_URL,
|
||||
@@ -544,7 +541,7 @@ export const MODEL_CATALOG: ModelCatalogEntry[] = [
|
||||
displayName: "GLM-5.2",
|
||||
provider: "openrouter",
|
||||
contextWindow: 1000000,
|
||||
pricing: usd(0.221, 1.19, 3.74),
|
||||
pricing: usd(0.1261, 0.679, 2.134),
|
||||
supportsVision: false,
|
||||
clientType: "openai",
|
||||
baseUrl: OPENROUTER_BASE_URL,
|
||||
|
||||
Reference in New Issue
Block a user