Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

feat(models): 分离官方刊例价并用于订阅价值估算 (#4303)

Dash2128cd45e08e
diff --git a/apps/desktop/src/main/maker-host/active-catalog.ts b/apps/desktop/src/main/maker-host/active-catalog.ts
index 31a985d82b..d46585a69d 100644
--- a/apps/desktop/src/main/maker-host/active-catalog.ts
+++ b/apps/desktop/src/main/maker-host/active-catalog.ts
@@ -357,7 +357,7 @@ function preserveNonGrok46DiscoveryEfforts(
models: readonly CatalogModel[],
discovered: readonly XaiDiscoveredModel[],
): CatalogModel[] {
- if ((base ?? BUNDLED_CATALOG).modelRegistry?.schemaVersion === 4) return [...models];
+ if (((base ?? BUNDLED_CATALOG).modelRegistry?.schemaVersion ?? 0) >= 4) return [...models];
const byId = new Map(discovered.map((entry) => [entry.id, entry]));
return models.map((model) => {
const entry = byId.get(model.id) ?? byId.get(`xai/${model.id}`);
@@ -836,7 +836,7 @@ function assembleRoot(
});
}
const registry = (base ?? BUNDLED_CATALOG).modelRegistry;
- if (registry?.schemaVersion === 4) {
+ if ((registry?.schemaVersion ?? 0) >= 4) {
const live = new Map(models.map((model) => [model.id, model]));
out = out.map((model) => {
const upstream = live.get(model.id);
@@ -874,7 +874,7 @@ function applyLayeredConsumer(
): CatalogModel {
const overlaid = applyRegistryConsumerOverlay(model, providerId, agent, model.id, plan);
const registry = (base ?? BUNDLED_CATALOG).modelRegistry;
- return registry?.schemaVersion === 4
+ return (registry?.schemaVersion ?? 0) >= 4
? applyModelMetadata(
overlaid,
resolveModelMetadata(
@@ -1188,7 +1188,7 @@ function computeMerged(): Catalog {
...(model.contextWindowMax !== undefined
? { contextWindowMax: model.contextWindowMax }
: {}),
- ...((base ?? BUNDLED_CATALOG).modelRegistry?.schemaVersion !== 4 &&
+ ...(((base ?? BUNDLED_CATALOG).modelRegistry?.schemaVersion ?? 0) < 4 &&
model.supportsFastMode === false
? { supportsFastMode: false }
: {}),
@@ -1374,7 +1374,7 @@ function computeMerged(): Catalog {
]);
const registryDefault = registryEntry ? modelDefaultEffort(registryEntry) : undefined;
const intent =
- b.modelRegistry?.schemaVersion === 4
+ (b.modelRegistry?.schemaVersion ?? 0) >= 4
? (ov.defaultEffort ?? gm.defaultEffort ?? defaultEffortForCapabilities(efforts))
: registryDefault !== undefined
? registryDefault
@@ -1495,7 +1495,7 @@ function computeMerged(): Catalog {
)?.entry
: undefined;
const intent =
- b.modelRegistry?.schemaVersion !== 4 && entry ? modelDefaultEffort(entry) : undefined;
+ (b.modelRegistry?.schemaVersion ?? 0) < 4 && entry ? modelDefaultEffort(entry) : undefined;
const defaultEffort =
intent !== undefined
? model.efforts.length === 0
@@ -1582,7 +1582,7 @@ function computeMerged(): Catalog {
let next = model;
const metadataProviderId = providerCatalogId(provider);
if (
- b.modelRegistry?.schemaVersion === 4 &&
+ (b.modelRegistry?.schemaVersion ?? 0) >= 4 &&
(provider.source !== 'user' || !!provider.auth.native) &&
(provider.id === 'xd' || agent === 'pi')
) {
diff --git a/apps/desktop/src/main/usage/__tests__/accountReferencePrice.test.ts b/apps/desktop/src/main/usage/__tests__/accountReferencePrice.test.ts
index ddf9ba6d8b..b23e15a2d6 100644
--- a/apps/desktop/src/main/usage/__tests__/accountReferencePrice.test.ts
+++ b/apps/desktop/src/main/usage/__tests__/accountReferencePrice.test.ts
@@ -76,3 +76,23 @@ it.each(['pi', 'claude-code'] as const)('uses account overrides before public pr
.toEqual({ ...base, providerId, modelId: model });
}
});
+
+it('values subscriptions from manufacturer prices even when the supplier publishes a different tariff', () => {
+ const registry = BUNDLED_CATALOG.modelRegistry!;
+ const entry = registry.models.find(model => model.id === 'openai/gpt-5.6-luna')!;
+ const route = entry.routes[0];
+ const original = route.referencePrices;
+ const official = registry.baseModels!.find(model => model.id === entry.modelRef)!.referencePriceGroups![0].prices;
+ try {
+ route.referencePrices = official.map(price => ({ ...price, inputPerMtok: 999, cacheWritePerMtok: undefined }));
+ expect(accountReferencePriceQuote('openai-account', 'gpt-5.6-luna', registry)?.inputPerMtok).toBe(999);
+ for (const agent of ['codex', 'claude-code', 'pi'] as const) {
+ expect(getCodexProviderSubscriptionValuePrice('openai-account', 'gpt-5.6-luna', {}, '2026-09-11', undefined, agent))
+ .toMatchObject({ inputPerMtok: 0.2, cacheCreatePerMtok: 0.25, providerId: 'openai-account' });
+ }
+ expect(getCodexProviderSubscriptionValuePrice('xd', 'openai/gpt-5.6-luna', {})).toBeUndefined();
+ } finally {
+ if (original === undefined) delete route.referencePrices;
+ else route.referencePrices = original;
+ }
+});
diff --git a/apps/desktop/src/main/usage/__tests__/subscriptionOfficialOverrides.test.ts b/apps/desktop/src/main/usage/__tests__/subscriptionOfficialOverrides.test.ts
new file mode 100644
index 0000000000..f3b9ff3d94
--- /dev/null
+++ b/apps/desktop/src/main/usage/__tests__/subscriptionOfficialOverrides.test.ts
@@ -0,0 +1,57 @@
+import { afterEach, expect, it, vi } from 'vitest';
+import { BUNDLED_CATALOG, type AgentKind } from '@cindy/model-providers';
+import { modelPricingKey, providerReferencePriceQuote } from '../../../shared/modelPriceQuote.js';
+import {
+ __testing,
+ type ModelPriceOverridesSnapshot,
+} from '../modelPriceOverrideStore.js';
+import {
+ getClaudeSubscriptionValuePrice,
+ getCodexProviderSubscriptionValuePrice,
+ getSubscriptionDirectValuePrice,
+} from '../referenceModelPricing.js';
+
+const registry = structuredClone(BUNDLED_CATALOG.modelRegistry!);
+vi.mock('../../maker-host/active-catalog.js', () => ({
+ getActiveCatalog: () => ({ ...BUNDLED_CATALOG, modelRegistry: registry }),
+}));
+afterEach(() => vi.useRealTimers());
+
+it.each([
+ ['codex', 'openai', 'gpt-5.6-luna', 'codex'],
+ ['claude', 'anthropic', 'claude-sonnet-4-6', 'claude-code'],
+ ['direct', 'openai', 'chatgpt/gpt-5.6-luna', 'pi'],
+ ['direct', 'xai', 'xai/grok-4.6', 'pi'],
+] as const)('rebases current and historical sparse overrides on official prices: %s %s', (path, providerId, modelId, agent: AgentKind) => {
+ vi.useFakeTimers({ toFake: ['Date'] });
+ vi.setSystemTime(new Date('2026-09-11T12:00:00Z'));
+ const official = providerReferencePriceQuote(providerId, modelId, registry, { agent, officialOnly: true })!;
+ expect(official).toBeDefined();
+ // The catalog quote is already merged against a supplier tariff. Only output
+ // was explicitly edited; the other supplier fields must not enter subscription value.
+ const supplier = { ...official, inputPerMtok: 999, cacheReadPerMtok: 888, cacheCreatePerMtok: 777 };
+ const target = { providerId, modelId, agent };
+ const baseReference = { ...supplier, cacheReadPerMtok: 888, cacheCreatePerMtok: 777 };
+ const values = { outputPerMtok: 123 };
+ const entries: ModelPriceOverridesSnapshot = {
+ [__testing.overrideKey(target)]: { ...target, values, baseReference, updatedAt: '2026-09-11' },
+ };
+ const effective = __testing.mergedQuote(target, supplier, values, baseReference)!;
+ expect(effective.inputPerMtok).toBe(999);
+ const pricing = { [providerId]: { [modelPricingKey(modelId, agent)]: effective } };
+ for (const at of [undefined, '2026-09-09']) {
+ const reference = providerReferencePriceQuote(providerId, modelId, registry, { agent, officialOnly: true, at })!;
+ const expected = __testing.mergedQuote(target, reference, values, baseReference);
+ const actual = path === 'claude'
+ ? getClaudeSubscriptionValuePrice(modelId, pricing, at, entries)
+ : path === 'direct'
+ ? getSubscriptionDirectValuePrice(modelId, agent, pricing, at, entries)
+ : getCodexProviderSubscriptionValuePrice(providerId, modelId, pricing, at, entries, agent);
+ expect(actual).toEqual(expected);
+ expect(actual?.outputPerMtok).toBe(123);
+ expect(actual?.inputPerMtok).toBe(reference.inputPerMtok);
+ expect(actual?.cacheReadPerMtok).toBe(reference.cacheReadPerMtok);
+ expect(actual?.cacheCreatePerMtok).toBe(reference.cacheCreatePerMtok);
+ expect(actual?.priority).toEqual(reference.priority);
+ }
+});
diff --git a/apps/desktop/src/main/usage/referenceModelPricing.ts b/apps/desktop/src/main/usage/referenceModelPricing.ts
index 9bdfbddbf1..5a6d0d1050 100644
--- a/apps/desktop/src/main/usage/referenceModelPricing.ts
+++ b/apps/desktop/src/main/usage/referenceModelPricing.ts
@@ -37,7 +37,7 @@ export function getReferenceModelPricing(): ModelPricingCatalog {
if (provider.auth?.method !== 'oauth' || !provider.auth.native) continue;
for (const [agent, models] of Object.entries(provider.models)) {
for (const model of models ?? []) {
- const quote = providerReferencePriceQuote(provider.id, model.id, registry, { agent: agent as AgentKind });
+ const quote = providerReferencePriceQuote(provider.id, model.id, registry, { agent: agent as AgentKind, officialOnly: true });
if (quote) (pricing[provider.id] ??= {})[modelPricingKey(model.id, agent as AgentKind)] = quote;
}
}
@@ -66,7 +66,6 @@ export function getCodexProviderSubscriptionValuePrice(
if (providerId === 'xd') return undefined;
const effective = getModelPriceQuote(pricing, providerId, modelId, agent);
if (effective?.source === 'user-override') {
- if (at === undefined) return effective;
return (
mergeStoredModelPriceOverride(
{ providerId, agent, modelId: effective.modelId },
@@ -74,7 +73,7 @@ export function getCodexProviderSubscriptionValuePrice(
providerId,
effective.modelId,
getActiveCatalog().modelRegistry,
- { agent, at },
+ { agent, at, officialOnly: true },
),
overrides,
) ?? effective
@@ -84,9 +83,9 @@ export function getCodexProviderSubscriptionValuePrice(
providerId,
modelId,
getActiveCatalog().modelRegistry,
- { agent, at },
+ { agent, at, officialOnly: true },
);
- return reference ?? (at === undefined ? effective : undefined);
+ return reference ?? ((getActiveCatalog().modelRegistry?.schemaVersion ?? 0) < 5 && at === undefined ? effective : undefined);
}
export function getCodexSubscriptionValuePrice(
@@ -104,29 +103,9 @@ export function getClaudeSubscriptionValuePrice(
at?: string | Date,
overrides?: ModelPriceOverridesSnapshot,
): ModelPriceQuote | undefined {
- const effective = getModelPriceQuote(pricing, 'anthropic', modelId, 'claude-code');
- if (effective?.source === 'user-override') {
- if (at === undefined) return effective;
- return (
- mergeStoredModelPriceOverride(
- { providerId: 'anthropic', agent: 'claude-code', modelId: effective.modelId },
- providerReferencePriceQuote(
- 'anthropic',
- effective.modelId,
- getActiveCatalog().modelRegistry,
- { agent: 'claude-code', at },
- ),
- overrides,
- ) ?? effective
- );
- }
- const reference = providerReferencePriceQuote(
- 'anthropic',
- modelId,
- getActiveCatalog().modelRegistry,
- { agent: 'claude-code', at },
+ return getCodexProviderSubscriptionValuePrice(
+ 'anthropic', modelId, pricing, at, overrides, 'claude-code',
);
- return reference ?? (at === undefined ? effective : undefined);
}
export function getSubscriptionDirectValuePrice(
@@ -143,13 +122,14 @@ export function getSubscriptionDirectValuePrice(
const effective = getModelPriceQuote(pricing, routingQuote.providerId, modelId, agent);
const quote =
effective?.source === 'user-override'
- ? at === undefined || agent === undefined
+ ? agent === undefined
? effective
: (mergeStoredModelPriceOverride(
{ providerId: effective.providerId, agent, modelId: effective.modelId },
providerReferencePriceQuote(effective.providerId, effective.modelId, registry, {
agent,
at,
+ officialOnly: true,
}),
overrides,
) ?? effective)
diff --git a/apps/desktop/src/shared/__tests__/modelPriceQuote.test.ts b/apps/desktop/src/shared/__tests__/modelPriceQuote.test.ts
index e06fa0b51b..2d0cbdb3e9 100644
--- a/apps/desktop/src/shared/__tests__/modelPriceQuote.test.ts
+++ b/apps/desktop/src/shared/__tests__/modelPriceQuote.test.ts
@@ -143,7 +143,8 @@ describe('registryPricingCatalog', () => {
it.each(['fast', 'priority'] as const)('projects declared %s prices without inventing unavailable tariffs', (variant) => {
const entry = structuredClone(BUNDLED_CATALOG.modelRegistry!.models.find((model) => model.id === 'openai/gpt-6-astra')!);
- const prices = entry.routes[0]!.referencePrices!;
+ const prices = structuredClone(BUNDLED_CATALOG.modelRegistry!.baseModels!.find(model => model.id === entry.modelRef)!.referencePriceGroups![0].prices);
+ entry.routes[0]!.referencePrices = prices;
prices.find((price) => price.variant === 'fast')!.variant = variant;
const registry: ModelRegistry = { schemaVersion: 1, updatedAt: '2026-09-04T00:00:00Z', models: [entry] };
const getQuote = (at = '2026-09-04') => providerReferencePriceQuote('openai', 'gpt-6-astra', registry, { at });
diff --git a/apps/desktop/src/shared/modelPriceQuote.ts b/apps/desktop/src/shared/modelPriceQuote.ts
index ee4eaab9ea..9ce8aca250 100644
--- a/apps/desktop/src/shared/modelPriceQuote.ts
+++ b/apps/desktop/src/shared/modelPriceQuote.ts
@@ -249,6 +249,7 @@ function referencePriceCalendarDate(value: string | Date | undefined): string {
/** Selects a dated provider reference tariff, optionally for a specific agent/input size. */
interface ReferencePriceOptions {
+ officialOnly?: boolean;
agent?: AgentKind;
inputTokens?: number;
at?: string | Date;
@@ -291,7 +292,7 @@ function referencePriceQuoteForVariant(
if (!resolved) return undefined;
const day = referencePriceCalendarDate(options.at);
const variant = options.variant ?? 'standard';
- const inputTokenPriceBands = resolved.route.referencePrices
+ const inputTokenPriceBands = resolved.prices
?.filter(
(price) =>
price.variant === variant &&
@@ -418,9 +419,9 @@ export function subscriptionDirectPriceQuote(
const routedId = exclusiveXaiCatalogModelId(modelId) ?? modelId;
let quote: ModelPriceQuote | undefined;
if (routedId.startsWith(CHATGPT_MODEL_PREFIX)) {
- quote = providerReferencePriceQuote('openai', routedId, registry, { agent, at });
+ quote = providerReferencePriceQuote('openai', routedId, registry, { agent, at, officialOnly: true });
} else if (routedId.startsWith(XAI_MODEL_PREFIX)) {
- quote = providerReferencePriceQuote('xai', routedId, registry, { agent, at });
+ quote = providerReferencePriceQuote('xai', routedId, registry, { agent, at, officialOnly: true });
}
return quote
? {
diff --git a/docs/dev-rules/model-catalog-maintenance.md b/docs/dev-rules/model-catalog-maintenance.md
index 919508cb47..2d595d006d 100644
--- a/docs/dev-rules/model-catalog-maintenance.md
+++ b/docs/dev-rules/model-catalog-maintenance.md
@@ -43,7 +43,8 @@ Catalog (version)
| Claude Code / Codex 的工作默认 | `models[].perAgent`,引擎必须被该条目 route 声明 | 不把工作预算当供应商承诺容量 |
| Pi 公共成员和 Pi 默认资料 | `providers[].models.pi`;公共资料仍按 Registry 合并 | 不从其他引擎名单复制出 Pi 路由 |
| 经核实的错误实报 | 匹配 route 的 `forceOverrides` + `overrideReason` | 不影响其他供应商,也不压过用户配置 |
-| 官方参考价及历史价区间 | `routes[].referencePrices[]` | Gateway 实价/折扣仍归其计费控制面 |
+| 厂商官方参考价及历史价区间 | `baseModels[].referencePriceGroups[].prices[]`(Registry V5) | 按市场分组,保留币种、标准/Fast、输入区间及生效日期 |
+| 接入供应商参考报价 | `routes[].referencePrices[]`;`referencePriceGroup` 指向公共型号的官方价组 | Gateway 实价/折扣仍归其计费控制面,不混填缺失字段 |
| 内置接入或新增连接模板 | `providers[]` 或 `presets[].runtimes` | 不在公共目录保存真实账号密钥 |
| 本地候选、包装、门槛、推荐 | `localModels.models` / `featuredIds` | 不自动安装、卸载、切换用户模型 |
| 某个用户的显式设置 | 本机 `model-catalog-overrides.json` 等既有偏好 | 不写回 Server;刷新保留,恢复默认删除 override |
@@ -107,3 +108,21 @@ localModels 整域缺失才用随包本地域,显式空不兜底。
| 历史型号与同步记录 | [历史记录](../model-catalog-history.md);不可当作当前状态 |
| 字段写法及可执行校验 | [五个示例](../examples/model-catalog.md) |
| 修改代码与定位测试 | [代码导航](model-catalog-runtime.md#从需求找到代码) |
+
+## 厂商参考价(Registry V5)
+
+公共型号的 `referencePriceGroups` 使用市场标识(当前为 `global` / `cn`),不是供应商 ID。
+每组 `prices` 沿用原价格结构与官方证据:币种、每百万 tokens 单价、缓存读/写及 1h 写入、
+标准/Fast 等变体、输入区间 `[minInputTokens, maxInputTokens)`、生效日期区间。
+缺字段保持未知,明确的 0 才表示零单价;缓存存储每小时费用不能写成缓存写入单价。
+
+`resolveBaseModelReferencePrice` 按公共 ID/唯一 alias 读取,不依赖供应商名单。
+多市场/币种必须明确选择到唯一有效价格;无匹配或有歧义返回未知。
+路由用 `referencePriceGroup` 明确选择所属公共型号的价格组;供应商自己的 `referencePrices`
+优先于该组,整组替换,不逐字段补齐。订阅价值估算指定 `officialOnly`,仅取厂商参考价,
+用户显式价格覆盖仍优先,账号归属不变。XD 计费继续只读 Gateway 实报。
+
+新客户端请求 `registrySchemaVersion=5`。服务端向 V1–V4 展开官方参考价到原路由字段,
+剥离新增组与引用字段;V4 保留公共资料、本地域及原覆盖语义。各版本响应有独立 ETag。
+旧服务端仍可返回旧目录,新客户端保留旧格式读取;应先部署服务端再发布客户端。
+本次只迁移已有、已核实的价格,不补猜测价格,不改变 XD 的缺价处理。
diff --git a/docs/product-rules/model-metadata-precedence.md b/docs/product-rules/model-metadata-precedence.md
index e8c455c865..3f3eacdcad 100644
--- a/docs/product-rules/model-metadata-precedence.md
+++ b/docs/product-rules/model-metadata-precedence.md
@@ -79,7 +79,7 @@ Pi 已识别的 OpenAI 订阅连接之间可复用同一运行时:每个账号
这些操作偏好不承载账号身份。新增供应商登录适配时应复用上述连接机制,登录协议、
限额接口及 Harness 执行能力仍需分别适配。
-公共字段范围是名称、说明、分组、上下文、最大输出、思考档位、默认档、Fast 与图片输入能力。Fast 通常是供应商能力,应放在路由默认值中。价格、余额、账号可用性、模型成员、协议、地址和凭证不通过公共模型继承。参考价格继续绑定原来的供应商路由,实价仍来自计费控制面。
+公共字段范围是名称、说明、分组、上下文、最大输出、思考档位、默认档、Fast 与图片输入能力。Fast 通常是供应商能力,应放在路由默认值中。价格、余额、账号可用性、模型成员、协议、地址和凭证不通过公共模型继承。Registry V5 将厂商参考价独立放在公共型号的 `referencePriceGroups`,不进入 defaults 字段继承。供应商可单独提供路由报价;订阅按厂商参考价估算,用户显式价格覆盖仍优先,实价仍来自计费控制面。
`modelRef` 只引用明确的公共型号;aliases 必须在整表唯一。新供应商没有专属条目时,仅在精确公共 ID 或明确 alias 匹配后继承公共资料。不剥任意前缀、不用模糊名称猜型号,也不继承另一供应商的强制修正。订阅桥接已有的 ID 归一规则继续适用。
diff --git a/packages/model-providers/catalog/model-registry.json b/packages/model-providers/catalog/model-registry.json
index 1710a7f399..477b7d56a1 100644
--- a/packages/model-providers/catalog/model-registry.json
+++ b/packages/model-providers/catalog/model-registry.json
@@ -1,6 +1,6 @@
{
- "schemaVersion": 4,
- "updatedAt": "2026-09-11T03:36:09.185Z",
+ "schemaVersion": 5,
+ "updatedAt": "2026-09-11T06:45:19.551Z",
"models": [
{
"id": "openai/gpt-5.6-sol",
@@ -21,107 +21,14 @@
"providerId": "openai",
"modelId": "gpt-5.6-sol",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 30,
- "cacheReadPerMtok": 0.5,
- "cacheWritePerMtok": 6.25,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-07-09",
- "effectiveUntil": "2026-08-21",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 10,
- "outputPerMtok": 45,
- "cacheReadPerMtok": 1,
- "cacheWritePerMtok": 12.5,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-07-09",
- "effectiveUntil": "2026-08-21",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 4,
- "outputPerMtok": 20,
- "cacheReadPerMtok": 0.4,
- "cacheWritePerMtok": 5,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-08-21",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
- "verifiedAt": "2026-08-28"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 8,
- "outputPerMtok": 30,
- "cacheReadPerMtok": 0.8,
- "cacheWritePerMtok": 10,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-08-21",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
- "verifiedAt": "2026-08-28"
- }
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 8,
- "outputPerMtok": 40,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 0.8,
- "cacheWritePerMtok": 10.0,
- "maxInputTokens": 272001
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 16,
- "outputPerMtok": 60.0,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 1.6,
- "cacheWritePerMtok": 20.0,
- "minInputTokens": 272001
- }
- ],
"defaults": {
"description": "GPT-5.6-Sol for coding tasks",
"group": "gpt",
"contextWindow": 1050000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"supportsFastMode": true
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -137,100 +44,6 @@
"providerId": "openai",
"modelId": "gpt-5.6-sol",
"agents": ["claude-code"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 30,
- "cacheReadPerMtok": 0.5,
- "cacheWritePerMtok": 6.25,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-07-09",
- "effectiveUntil": "2026-08-21",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 10,
- "outputPerMtok": 45,
- "cacheReadPerMtok": 1,
- "cacheWritePerMtok": 12.5,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-07-09",
- "effectiveUntil": "2026-08-21",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 4,
- "outputPerMtok": 20,
- "cacheReadPerMtok": 0.4,
- "cacheWritePerMtok": 5,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-08-21",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
- "verifiedAt": "2026-08-28"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 8,
- "outputPerMtok": 30,
- "cacheReadPerMtok": 0.8,
- "cacheWritePerMtok": 10,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-08-21",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
- "verifiedAt": "2026-08-28"
- }
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 8,
- "outputPerMtok": 40,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 0.8,
- "cacheWritePerMtok": 10.0,
- "maxInputTokens": 272001
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 16,
- "outputPerMtok": 60.0,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 1.6,
- "cacheWritePerMtok": 20.0,
- "minInputTokens": 272001
- }
- ],
"defaults": {
"name": "GPT-5.6-Sol (1M · Higher usage)",
"description": "Explicit 1M context opt-in; inputs above 272K use higher long-context rates for the entire request",
@@ -238,7 +51,8 @@
"contextWindow": 1000000,
"efforts": ["low", "medium", "high", "xhigh"],
"supportsFastMode": true
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -295,105 +109,12 @@
"providerId": "openai",
"modelId": "gpt-5.6-terra",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2.5,
- "outputPerMtok": 15,
- "cacheReadPerMtok": 0.25,
- "cacheWritePerMtok": 3.125,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-07-09",
- "effectiveUntil": "2026-07-30",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
- "verifiedAt": "2026-08-07"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 22.5,
- "cacheReadPerMtok": 0.5,
- "cacheWritePerMtok": 6.25,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-07-09",
- "effectiveUntil": "2026-07-30",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
- "verifiedAt": "2026-08-07"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2,
- "outputPerMtok": 12,
- "cacheReadPerMtok": 0.2,
- "cacheWritePerMtok": 2.5,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-07-30",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
- "verifiedAt": "2026-08-07"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 4,
- "outputPerMtok": 18,
- "cacheReadPerMtok": 0.4,
- "cacheWritePerMtok": 5,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-07-30",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
- "verifiedAt": "2026-08-07"
- }
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 4,
- "outputPerMtok": 24,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 0.4,
- "cacheWritePerMtok": 5.0,
- "maxInputTokens": 272001
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 8,
- "outputPerMtok": 36.0,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 0.8,
- "cacheWritePerMtok": 10.0,
- "minInputTokens": 272001
- }
- ],
"defaults": {
"group": "gpt",
"contextWindow": 1050000,
"supportsFastMode": true
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -438,107 +159,14 @@
"providerId": "openai",
"modelId": "gpt-5.6-luna",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1,
- "outputPerMtok": 6,
- "cacheReadPerMtok": 0.1,
- "cacheWritePerMtok": 1.25,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-07-09",
- "effectiveUntil": "2026-07-30",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
- "verifiedAt": "2026-08-07"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2,
- "outputPerMtok": 9,
- "cacheReadPerMtok": 0.2,
- "cacheWritePerMtok": 2.5,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-07-09",
- "effectiveUntil": "2026-07-30",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
- "verifiedAt": "2026-08-07"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.2,
- "outputPerMtok": 1.2,
- "cacheReadPerMtok": 0.02,
- "cacheWritePerMtok": 0.25,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-07-30",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
- "verifiedAt": "2026-08-07"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.4,
- "outputPerMtok": 1.8,
- "cacheReadPerMtok": 0.04,
- "cacheWritePerMtok": 0.5,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-07-30",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
- "verifiedAt": "2026-08-07"
- }
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 0.4,
- "outputPerMtok": 2.4,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 0.04,
- "cacheWritePerMtok": 0.5,
- "maxInputTokens": 272001
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 0.8,
- "outputPerMtok": 3.6,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 0.08,
- "cacheWritePerMtok": 1.0,
- "minInputTokens": 272001
- }
- ],
"defaults": {
"group": "gpt",
"contextWindow": 1050000,
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -595,42 +223,13 @@
"providerId": "openai",
"modelId": "gpt-5.5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 30,
- "cacheReadPerMtok": 0.5,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-04-23",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.5",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 10,
- "outputPerMtok": 45,
- "cacheReadPerMtok": 1,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-04-23",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.5",
- "verifiedAt": "2026-08-01"
- }
- }
- ],
"defaults": {
"description": "OpenAI Codex (GPT-5.5) for coding tasks",
"group": "gpt",
"contextWindow": 272000,
"supportsFastMode": true
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -682,42 +281,13 @@
"providerId": "openai",
"modelId": "gpt-5.4",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2.5,
- "outputPerMtok": 15,
- "cacheReadPerMtok": 0.25,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-03-05",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.4",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 22.5,
- "cacheReadPerMtok": 0.5,
- "minInputTokens": 272001,
- "effectiveFrom": "2026-03-05",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.4",
- "verifiedAt": "2026-08-01"
- }
- }
- ],
"defaults": {
"description": "OpenAI Codex (GPT-5.4) for coding tasks",
"group": "gpt",
"contextWindow": 272000,
"supportsFastMode": true
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -772,27 +342,13 @@
"providerId": "openai",
"modelId": "gpt-5.4-mini",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.75,
- "outputPerMtok": 4.5,
- "cacheReadPerMtok": 0.075,
- "effectiveFrom": "2026-03-17",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.4-mini",
- "verifiedAt": "2026-08-01"
- }
- }
- ],
"defaults": {
"description": "Faster, lighter Codex variant — speed-optimized for quick edits",
"group": "gpt",
"contextWindow": 272000,
"supportsFastMode": true
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -839,34 +395,7 @@
"providerId": "openai",
"modelId": "gpt-5.4-pro",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 30,
- "outputPerMtok": 180,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.4-pro",
- "verifiedAt": "2026-09-11"
- },
- "maxInputTokens": 272001
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 60,
- "outputPerMtok": 270.0,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.4-pro",
- "verifiedAt": "2026-09-11"
- },
- "minInputTokens": 272001
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -883,21 +412,7 @@
"providerId": "openai",
"modelId": "gpt-5.5-pro",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 30,
- "outputPerMtok": 180,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.5-pro",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 30
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -914,23 +429,7 @@
"providerId": "openai",
"modelId": "gpt-5.6-cyber",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 12.5,
- "outputPerMtok": 75,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.6-cyber",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 1.25,
- "cacheWritePerMtok": 15.625,
- "maxInputTokens": 272001
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -954,103 +453,10 @@
"providerId": "openai",
"modelId": "gpt-6-astra",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 10,
- "outputPerMtok": 50,
- "cacheReadPerMtok": 1,
- "cacheWritePerMtok": 12.5,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-09-04",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
- "verifiedAt": "2026-09-05"
- },
- "effectiveUntil": "2026-09-07"
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 20,
- "outputPerMtok": 100,
- "cacheReadPerMtok": 2,
- "cacheWritePerMtok": 25,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-09-04",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
- "verifiedAt": "2026-09-05"
- },
- "effectiveUntil": "2026-09-07"
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 10,
- "outputPerMtok": 50,
- "cacheReadPerMtok": 1,
- "cacheWritePerMtok": 12.5,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-09-07",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
- "verifiedAt": "2026-09-07"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 20,
- "outputPerMtok": 75,
- "cacheReadPerMtok": 2,
- "cacheWritePerMtok": 25,
- "effectiveFrom": "2026-09-07",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
- "verifiedAt": "2026-09-07"
- },
- "minInputTokens": 272001
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 20,
- "outputPerMtok": 100,
- "cacheReadPerMtok": 2,
- "cacheWritePerMtok": 25,
- "maxInputTokens": 272001,
- "effectiveFrom": "2026-09-07",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
- "verifiedAt": "2026-09-07"
- }
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 40,
- "outputPerMtok": 150,
- "cacheReadPerMtok": 4,
- "cacheWritePerMtok": 50,
- "effectiveFrom": "2026-09-07",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
- "verifiedAt": "2026-09-07"
- },
- "minInputTokens": 272001
- }
- ],
"defaults": {
"supportsFastMode": true
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1065,23 +471,7 @@
"providerId": "anthropic",
"modelId": "claude-fable-5-1",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 10,
- "outputPerMtok": 50,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-09-11"
- },
- "cacheReadPerMtok": 0.25,
- "cacheWritePerMtok": 12.5,
- "cacheWrite1hPerMtok": 20
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -1097,26 +487,10 @@
"providerId": "anthropic",
"modelId": "claude-fable-5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 10,
- "outputPerMtok": 50,
- "cacheReadPerMtok": 1,
- "cacheWritePerMtok": 12.5,
- "cacheWrite1hPerMtok": 20,
- "effectiveFrom": "2026-06-09",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1139,23 +513,7 @@
"providerId": "anthropic",
"modelId": "claude-mythos-5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 10,
- "outputPerMtok": 50,
- "cacheReadPerMtok": 1,
- "cacheWritePerMtok": 12.5,
- "cacheWrite1hPerMtok": 20,
- "effectiveFrom": "2026-06-09",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -1171,41 +529,10 @@
"providerId": "anthropic",
"modelId": "claude-opus-5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 25,
- "cacheReadPerMtok": 0.5,
- "cacheWritePerMtok": 6.25,
- "cacheWrite1hPerMtok": 10,
- "effectiveFrom": "2026-07-24",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 10,
- "outputPerMtok": 50,
- "cacheReadPerMtok": 1,
- "cacheWritePerMtok": 12.5,
- "cacheWrite1hPerMtok": 20,
- "effectiveFrom": "2026-07-24",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-08-02"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1229,41 +556,10 @@
"providerId": "anthropic",
"modelId": "claude-opus-4-8",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 25,
- "cacheReadPerMtok": 0.5,
- "cacheWritePerMtok": 6.25,
- "cacheWrite1hPerMtok": 10,
- "effectiveFrom": "2026-05-28",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- },
- {
- "currency": "USD",
- "variant": "fast",
- "inputPerMtok": 10,
- "outputPerMtok": 50,
- "cacheReadPerMtok": 1,
- "cacheWritePerMtok": 12.5,
- "cacheWrite1hPerMtok": 20,
- "effectiveFrom": "2026-05-28",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-08-02"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1288,26 +584,10 @@
"providerId": "anthropic",
"modelId": "claude-opus-4-7",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 25,
- "cacheReadPerMtok": 0.5,
- "cacheWritePerMtok": 6.25,
- "cacheWrite1hPerMtok": 10,
- "effectiveFrom": "2026-04-16",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1332,26 +612,10 @@
"providerId": "anthropic",
"modelId": "claude-opus-4-6",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 25,
- "cacheReadPerMtok": 0.5,
- "cacheWritePerMtok": 6.25,
- "cacheWrite1hPerMtok": 10,
- "effectiveFrom": "2026-02-05",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1376,26 +640,10 @@
"providerId": "anthropic",
"modelId": "claude-opus-4-5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 5,
- "outputPerMtok": 25,
- "cacheReadPerMtok": 0.5,
- "cacheWritePerMtok": 6.25,
- "cacheWrite1hPerMtok": 10,
- "effectiveFrom": "2025-11-01",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1419,26 +667,10 @@
"providerId": "anthropic",
"modelId": "claude-sonnet-5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2,
- "outputPerMtok": 10,
- "cacheReadPerMtok": 0.2,
- "cacheWritePerMtok": 2.5,
- "cacheWrite1hPerMtok": 4,
- "effectiveFrom": "2026-06-30",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-08-12"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1463,26 +695,10 @@
"providerId": "anthropic",
"modelId": "claude-sonnet-4-6",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 3,
- "outputPerMtok": 15,
- "cacheReadPerMtok": 0.3,
- "cacheWritePerMtok": 3.75,
- "cacheWrite1hPerMtok": 6,
- "effectiveFrom": "2026-02-17",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1507,26 +723,10 @@
"providerId": "anthropic",
"modelId": "claude-sonnet-4-5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 3,
- "outputPerMtok": 15,
- "cacheReadPerMtok": 0.3,
- "cacheWritePerMtok": 3.75,
- "cacheWrite1hPerMtok": 6,
- "effectiveFrom": "2025-09-29",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1551,26 +751,10 @@
"providerId": "anthropic",
"modelId": "claude-haiku-4-5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1,
- "outputPerMtok": 5,
- "cacheReadPerMtok": 0.1,
- "cacheWritePerMtok": 1.25,
- "cacheWrite1hPerMtok": 2,
- "effectiveFrom": "2025-10-01",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.claude.com/docs/en/about-claude/pricing",
- "verifiedAt": "2026-07-31"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -1594,36 +778,7 @@
"providerId": "xai",
"modelId": "xai/grok-4.6",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2,
- "outputPerMtok": 6,
- "cacheReadPerMtok": 0.5,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-08-12",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-13"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 4,
- "outputPerMtok": 12,
- "cacheReadPerMtok": 1,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-08-12",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-13"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1639,36 +794,7 @@
"providerId": "xai",
"modelId": "xai/grok-4.5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2,
- "outputPerMtok": 6,
- "cacheReadPerMtok": 0.3,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-07-08",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 4,
- "outputPerMtok": 12,
- "cacheReadPerMtok": 0.6,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-07-08",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1689,36 +815,7 @@
"providerId": "xai",
"modelId": "xai/grok-4.3",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.25,
- "outputPerMtok": 2.5,
- "cacheReadPerMtok": 0.2,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-05-15",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2.5,
- "outputPerMtok": 5,
- "cacheReadPerMtok": 0.4,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-05-15",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1735,36 +832,7 @@
"providerId": "xai",
"modelId": "xai/grok-build-0.1",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1,
- "outputPerMtok": 2,
- "cacheReadPerMtok": 0.2,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-05-15",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2,
- "outputPerMtok": 4,
- "cacheReadPerMtok": 0.4,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-05-15",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1781,36 +849,7 @@
"providerId": "xai",
"modelId": "xai/grok-4.20-multi-agent-0309",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.25,
- "outputPerMtok": 2.5,
- "cacheReadPerMtok": 0.2,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-03-09",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2.5,
- "outputPerMtok": 5,
- "cacheReadPerMtok": 0.4,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-03-09",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1827,36 +866,7 @@
"providerId": "xai",
"modelId": "xai/grok-4.20-0309-reasoning",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.25,
- "outputPerMtok": 2.5,
- "cacheReadPerMtok": 0.2,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-03-09",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2.5,
- "outputPerMtok": 5,
- "cacheReadPerMtok": 0.4,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-03-09",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1873,36 +883,7 @@
"providerId": "xai",
"modelId": "xai/grok-4.20-0309-non-reasoning",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.25,
- "outputPerMtok": 2.5,
- "cacheReadPerMtok": 0.2,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-03-09",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2.5,
- "outputPerMtok": 5,
- "cacheReadPerMtok": 0.4,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-03-09",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1919,36 +900,7 @@
"providerId": "xai",
"modelId": "xai/grok-4.20",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.25,
- "outputPerMtok": 2.5,
- "cacheReadPerMtok": 0.2,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-04-07",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2.5,
- "outputPerMtok": 5,
- "cacheReadPerMtok": 0.4,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-04-07",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/pricing",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -1965,36 +917,7 @@
"providerId": "xai",
"modelId": "xai/grok-code-fast",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1,
- "outputPerMtok": 2,
- "cacheReadPerMtok": 0.2,
- "maxInputTokens": 200000,
- "effectiveFrom": "2026-05-15",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/migration/may-15-retirement",
- "verifiedAt": "2026-08-01"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 2,
- "outputPerMtok": 4,
- "cacheReadPerMtok": 0.4,
- "minInputTokens": 200000,
- "effectiveFrom": "2026-05-15",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.x.ai/developers/migration/may-15-retirement",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-responses",
@@ -2137,38 +1060,10 @@
"providerId": "xd",
"modelId": "gemini-3.7-flash",
"agents": ["claude-code"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.75,
- "outputPerMtok": 3.75,
- "cacheReadPerMtok": 0.075,
- "effectiveFrom": "2026-08-13",
- "effectiveUntil": "2027-01-01",
- "source": {
- "kind": "provider-official",
- "url": "https://ai.google.dev/gemini-api/docs/pricing",
- "verifiedAt": "2026-08-13"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.5,
- "outputPerMtok": 7.5,
- "cacheReadPerMtok": 0.15,
- "effectiveFrom": "2027-01-01",
- "source": {
- "kind": "provider-official",
- "url": "https://ai.google.dev/gemini-api/docs/pricing",
- "verifiedAt": "2026-08-13"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "google-generative-ai",
@@ -2184,38 +1079,10 @@
"providerId": "xd",
"modelId": "gemini-3.6-flash",
"agents": ["claude-code"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.75,
- "outputPerMtok": 3.75,
- "cacheReadPerMtok": 0.075,
- "effectiveFrom": "2026-07-21",
- "effectiveUntil": "2027-01-01",
- "source": {
- "kind": "provider-official",
- "url": "https://ai.google.dev/gemini-api/docs/pricing",
- "verifiedAt": "2026-08-13"
- }
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.5,
- "outputPerMtok": 7.5,
- "cacheReadPerMtok": 0.15,
- "effectiveFrom": "2027-01-01",
- "source": {
- "kind": "provider-official",
- "url": "https://ai.google.dev/gemini-api/docs/pricing",
- "verifiedAt": "2026-08-13"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "google-generative-ai",
@@ -2233,21 +1100,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.5,
- "outputPerMtok": 9,
- "cacheReadPerMtok": 0.15,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://ai.google.dev/gemini-api/docs/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "google-generative-ai",
@@ -2302,21 +1155,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.3,
- "outputPerMtok": 2.5,
- "cacheReadPerMtok": 0.03,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://ai.google.dev/gemini-api/docs/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "google-generative-ai",
@@ -2335,21 +1174,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.25,
- "outputPerMtok": 1.5,
- "cacheReadPerMtok": 0.025,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://ai.google.dev/gemini-api/docs/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "google-generative-ai",
@@ -2437,41 +1262,13 @@
"providerId": "moonshot-kimi-cn",
"modelId": "kimi-k2.7-code",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 6.5,
- "outputPerMtok": 27,
- "cacheReadPerMtok": 1.3,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.com/docs/pricing/chat-k27-code",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "moonshot-kimi-global",
"modelId": "kimi-k2.7-code",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.95,
- "outputPerMtok": 4,
- "cacheReadPerMtok": 0.19,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.ai/docs/pricing/chat-k27-code",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2488,41 +1285,13 @@
"providerId": "moonshot-kimi-cn",
"modelId": "kimi-k2.7-code-highspeed",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 13,
- "outputPerMtok": 54,
- "cacheReadPerMtok": 2.6,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.com/docs/pricing/chat-k27-code",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "moonshot-kimi-global",
"modelId": "kimi-k2.7-code-highspeed",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.9,
- "outputPerMtok": 8,
- "cacheReadPerMtok": 0.38,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.ai/docs/pricing/chat-k27-code",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2541,21 +1310,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.95,
- "outputPerMtok": 4,
- "cacheReadPerMtok": 0.16,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.ai/docs/pricing/chat-k26",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2574,21 +1329,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.4,
- "outputPerMtok": 4.4,
- "cacheReadPerMtok": 0.26,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.z.ai/guides/overview/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2611,21 +1352,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.4,
- "outputPerMtok": 4.4,
- "cacheReadPerMtok": 0.26,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.z.ai/guides/overview/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2644,21 +1371,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.4,
- "outputPerMtok": 4.4,
- "cacheReadPerMtok": 0.26,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.z.ai/guides/overview/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2678,21 +1391,7 @@
"providerId": "zhipu-glm-global",
"modelId": "glm-5.3-flash",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.15,
- "outputPerMtok": 0.5,
- "cacheReadPerMtok": 0.03,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.z.ai/guides/overview/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2711,21 +1410,7 @@
"efforts": ["low", "medium", "high", "max"],
"defaultEffort": "medium"
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.15,
- "outputPerMtok": 0.5,
- "cacheReadPerMtok": 0.03,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://docs.z.ai/guides/overview/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2740,61 +1425,19 @@
"providerId": "xd",
"modelId": "deepseek/deepseek-v4-pro",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.32,
- "outputPerMtok": 3.96,
- "cacheReadPerMtok": 0.044,
- "effectiveFrom": "2026-08-16",
- "source": {
- "kind": "provider-official",
- "url": "https://api-docs.deepseek.com/quick_start/pricing",
- "verifiedAt": "2026-08-16"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "deepseek",
"modelId": "deepseek-v4-pro",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.435,
- "outputPerMtok": 0.87,
- "cacheReadPerMtok": 0.003625,
- "effectiveFrom": "2026-07-31",
- "source": {
- "kind": "provider-official",
- "url": "https://api-docs.deepseek.com/quick_start/pricing",
- "verifiedAt": "2026-08-05"
- },
- "effectiveUntil": "2026-08-16"
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 1.32,
- "outputPerMtok": 3.96,
- "cacheReadPerMtok": 0.044,
- "effectiveFrom": "2026-08-16",
- "source": {
- "kind": "provider-official",
- "url": "https://api-docs.deepseek.com/quick_start/pricing",
- "verifiedAt": "2026-08-16"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2809,89 +1452,19 @@
"providerId": "xd",
"modelId": "deepseek/deepseek-v4-flash",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.44,
- "outputPerMtok": 1.32,
- "cacheReadPerMtok": 0.014,
- "effectiveFrom": "2026-08-16",
- "source": {
- "kind": "provider-official",
- "url": "https://api-docs.deepseek.com/quick_start/pricing",
- "verifiedAt": "2026-08-16"
- },
- "effectiveUntil": "2026-09-11"
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.3,
- "outputPerMtok": 1.2,
- "cacheReadPerMtok": 0.006,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://api-docs.deepseek.com/quick_start/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
},
{
"providerId": "deepseek",
"modelId": "deepseek-v4-flash",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.14,
- "outputPerMtok": 0.28,
- "cacheReadPerMtok": 0.0028,
- "effectiveFrom": "2026-07-31",
- "source": {
- "kind": "provider-official",
- "url": "https://api-docs.deepseek.com/quick_start/pricing",
- "verifiedAt": "2026-08-05"
- },
- "effectiveUntil": "2026-08-16"
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.44,
- "outputPerMtok": 1.32,
- "cacheReadPerMtok": 0.014,
- "effectiveFrom": "2026-08-16",
- "source": {
- "kind": "provider-official",
- "url": "https://api-docs.deepseek.com/quick_start/pricing",
- "verifiedAt": "2026-08-16"
- },
- "effectiveUntil": "2026-09-11"
- },
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.3,
- "outputPerMtok": 1.2,
- "cacheReadPerMtok": 0.006,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://api-docs.deepseek.com/quick_start/pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ],
"defaults": {
"supportsFastMode": false
- }
+ },
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -2908,21 +1481,7 @@
"providerId": "openai",
"modelId": "gpt-5.4-nano",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.2,
- "outputPerMtok": 1.25,
- "cacheReadPerMtok": 0.02,
- "effectiveFrom": "2026-03-17",
- "source": {
- "kind": "provider-official",
- "url": "https://developers.openai.com/api/docs/models/gpt-5.4-nano",
- "verifiedAt": "2026-08-01"
- }
- }
- ]
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -2984,43 +1543,13 @@
"providerId": "minimax-cn",
"modelId": "MiniMax-M2.7",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 2.1,
- "outputPerMtok": 8.4,
- "cacheReadPerMtok": 0.42,
- "cacheWritePerMtok": 2.625,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "minimax-global",
"modelId": "MiniMax-M2.7",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.3,
- "outputPerMtok": 1.2,
- "cacheReadPerMtok": 0.06,
- "cacheWritePerMtok": 0.375,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -3037,43 +1566,13 @@
"providerId": "minimax-cn",
"modelId": "MiniMax-M2.7-highspeed",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 4.2,
- "outputPerMtok": 16.8,
- "cacheReadPerMtok": 0.42,
- "cacheWritePerMtok": 2.625,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "minimax-global",
"modelId": "MiniMax-M2.7-highspeed",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.6,
- "outputPerMtok": 2.4,
- "cacheReadPerMtok": 0.06,
- "cacheWritePerMtok": 0.375,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -3090,43 +1589,13 @@
"providerId": "minimax-cn",
"modelId": "MiniMax-M2.5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 2.1,
- "outputPerMtok": 8.4,
- "cacheReadPerMtok": 0.21,
- "cacheWritePerMtok": 2.625,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "minimax-global",
"modelId": "MiniMax-M2.5",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.3,
- "outputPerMtok": 1.2,
- "cacheReadPerMtok": 0.03,
- "cacheWritePerMtok": 0.375,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -3143,43 +1612,13 @@
"providerId": "minimax-cn",
"modelId": "MiniMax-M2.5-highspeed",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 4.2,
- "outputPerMtok": 16.8,
- "cacheReadPerMtok": 0.21,
- "cacheWritePerMtok": 2.625,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "minimax-global",
"modelId": "MiniMax-M2.5-highspeed",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.6,
- "outputPerMtok": 2.4,
- "cacheReadPerMtok": 0.03,
- "cacheWritePerMtok": 0.375,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -3196,43 +1635,13 @@
"providerId": "minimax-cn",
"modelId": "MiniMax-M2.1",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 2.1,
- "outputPerMtok": 8.4,
- "cacheReadPerMtok": 0.21,
- "cacheWritePerMtok": 2.625,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "minimax-global",
"modelId": "MiniMax-M2.1",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.3,
- "outputPerMtok": 1.2,
- "cacheReadPerMtok": 0.03,
- "cacheWritePerMtok": 0.375,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -3249,43 +1658,13 @@
"providerId": "minimax-cn",
"modelId": "MiniMax-M2.1-highspeed",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 4.2,
- "outputPerMtok": 16.8,
- "cacheReadPerMtok": 0.21,
- "cacheWritePerMtok": 2.625,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "minimax-global",
"modelId": "MiniMax-M2.1-highspeed",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.6,
- "outputPerMtok": 2.4,
- "cacheReadPerMtok": 0.03,
- "cacheWritePerMtok": 0.375,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -3302,43 +1681,13 @@
"providerId": "minimax-cn",
"modelId": "MiniMax-M2",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 2.1,
- "outputPerMtok": 8.4,
- "cacheReadPerMtok": 0.21,
- "cacheWritePerMtok": 2.625,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "minimax-global",
"modelId": "MiniMax-M2",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 0.3,
- "outputPerMtok": 1.2,
- "cacheReadPerMtok": 0.03,
- "cacheWritePerMtok": 0.375,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "anthropic-messages",
@@ -3356,21 +1705,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 20,
- "outputPerMtok": 100,
- "cacheReadPerMtok": 2,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.com/docs/pricing/chat-k3",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "moonshot-kimi-global",
@@ -3379,21 +1714,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 3,
- "outputPerMtok": 15,
- "cacheReadPerMtok": 0.3,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.ai/docs/pricing/chat-k3",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -3467,20 +1788,7 @@
"providerId": "aliyun-model-studio-cn",
"modelId": "qwen3.8-flash",
"agents": ["claude-code", "codex"],
- "referencePrices": [
- {
- "currency": "CNY",
- "variant": "standard",
- "inputPerMtok": 0.8,
- "outputPerMtok": 2.7,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://help.aliyun.com/zh/model-studio/model-pricing",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "cn"
},
{
"providerId": "aliyun-model-studio-global",
@@ -3598,21 +1906,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 3,
- "outputPerMtok": 15,
- "cacheReadPerMtok": 0.3,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.ai/docs/pricing/chat-k3",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
},
{
"providerId": "xd",
@@ -3621,21 +1915,7 @@
"defaults": {
"supportsFastMode": false
},
- "referencePrices": [
- {
- "currency": "USD",
- "variant": "standard",
- "inputPerMtok": 3,
- "outputPerMtok": 15,
- "cacheReadPerMtok": 0.3,
- "effectiveFrom": "2026-09-11",
- "source": {
- "kind": "provider-official",
- "url": "https://platform.kimi.ai/docs/pricing/chat-k3",
- "verifiedAt": "2026-09-11"
- }
- }
- ]
+ "referencePriceGroup": "global"
}
],
"nativeApi": "openai-completions",
@@ -4176,57 +2456,424 @@
"defaultEffort": "medium",
"name": "GPT-5.6-Sol",
"efforts": ["low", "medium", "high", "xhigh", "max"]
- }
- },
- {
- "id": "openai/gpt-5.6-terra",
- "aliases": [
- "gpt-5.6-terra",
- "xd/gpt-5.6-terra",
- "xd/codex-gpt-5.6-terra",
- "codex/gpt-5.6-terra"
- ],
- "defaults": {
- "name": "GPT-5.6-Terra",
- "description": "GPT-5.6-Terra for coding tasks",
- "maxOutputTokens": 128000,
- "efforts": ["low", "medium", "high", "xhigh", "max"],
- "defaultEffort": "medium"
- }
- },
- {
- "id": "openai/gpt-5.6-luna",
- "aliases": [
- "gpt-5.6-luna",
- "xd/gpt-5.6-luna",
- "xd/codex-gpt-5.6-luna",
- "codex/gpt-5.6-luna"
- ],
- "defaults": {
- "name": "GPT-5.6-Luna",
- "efforts": ["low", "medium", "high", "xhigh", "max"],
- "defaultEffort": "medium"
- }
- },
- {
- "id": "openai/gpt-5.5",
- "aliases": ["gpt-5.5", "xd/gpt-5.5", "xd/codex-gpt-5.5", "codex/gpt-5.5"],
- "defaults": {
- "name": "GPT-5.5",
- "maxOutputTokens": 128000,
- "efforts": ["low", "medium", "high", "xhigh"],
- "defaultEffort": "medium"
- }
- },
- {
- "id": "openai/gpt-5.4",
- "aliases": ["gpt-5.4", "xd/gpt-5.4", "xd/codex-gpt-5.4", "codex/gpt-5.4"],
- "defaults": {
- "name": "GPT-5.4",
- "maxOutputTokens": 128000,
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 30,
+ "cacheReadPerMtok": 0.5,
+ "cacheWritePerMtok": 6.25,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-07-09",
+ "effectiveUntil": "2026-08-21",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 10,
+ "outputPerMtok": 45,
+ "cacheReadPerMtok": 1,
+ "cacheWritePerMtok": 12.5,
+ "minInputTokens": 272001,
+ "effectiveFrom": "2026-07-09",
+ "effectiveUntil": "2026-08-21",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 4,
+ "outputPerMtok": 20,
+ "cacheReadPerMtok": 0.4,
+ "cacheWritePerMtok": 5,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-08-21",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
+ "verifiedAt": "2026-08-28"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 8,
+ "outputPerMtok": 30,
+ "cacheReadPerMtok": 0.8,
+ "cacheWritePerMtok": 10,
+ "minInputTokens": 272001,
+ "effectiveFrom": "2026-08-21",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
+ "verifiedAt": "2026-08-28"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 8,
+ "outputPerMtok": 40,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 0.8,
+ "cacheWritePerMtok": 10.0,
+ "maxInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 16,
+ "outputPerMtok": 60.0,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 1.6,
+ "cacheWritePerMtok": 20.0,
+ "minInputTokens": 272001
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "openai/gpt-5.6-terra",
+ "aliases": [
+ "gpt-5.6-terra",
+ "xd/gpt-5.6-terra",
+ "xd/codex-gpt-5.6-terra",
+ "codex/gpt-5.6-terra"
+ ],
+ "defaults": {
+ "name": "GPT-5.6-Terra",
+ "description": "GPT-5.6-Terra for coding tasks",
+ "maxOutputTokens": 128000,
+ "efforts": ["low", "medium", "high", "xhigh", "max"],
+ "defaultEffort": "medium"
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2.5,
+ "outputPerMtok": 15,
+ "cacheReadPerMtok": 0.25,
+ "cacheWritePerMtok": 3.125,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-07-09",
+ "effectiveUntil": "2026-07-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
+ "verifiedAt": "2026-08-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 22.5,
+ "cacheReadPerMtok": 0.5,
+ "cacheWritePerMtok": 6.25,
+ "minInputTokens": 272001,
+ "effectiveFrom": "2026-07-09",
+ "effectiveUntil": "2026-07-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
+ "verifiedAt": "2026-08-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 12,
+ "cacheReadPerMtok": 0.2,
+ "cacheWritePerMtok": 2.5,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-07-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
+ "verifiedAt": "2026-08-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 4,
+ "outputPerMtok": 18,
+ "cacheReadPerMtok": 0.4,
+ "cacheWritePerMtok": 5,
+ "minInputTokens": 272001,
+ "effectiveFrom": "2026-07-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
+ "verifiedAt": "2026-08-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 4,
+ "outputPerMtok": 24,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 0.4,
+ "cacheWritePerMtok": 5.0,
+ "maxInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 8,
+ "outputPerMtok": 36.0,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 0.8,
+ "cacheWritePerMtok": 10.0,
+ "minInputTokens": 272001
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "openai/gpt-5.6-luna",
+ "aliases": [
+ "gpt-5.6-luna",
+ "xd/gpt-5.6-luna",
+ "xd/codex-gpt-5.6-luna",
+ "codex/gpt-5.6-luna"
+ ],
+ "defaults": {
+ "name": "GPT-5.6-Luna",
+ "efforts": ["low", "medium", "high", "xhigh", "max"],
+ "defaultEffort": "medium"
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1,
+ "outputPerMtok": 6,
+ "cacheReadPerMtok": 0.1,
+ "cacheWritePerMtok": 1.25,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-07-09",
+ "effectiveUntil": "2026-07-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
+ "verifiedAt": "2026-08-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 9,
+ "cacheReadPerMtok": 0.2,
+ "cacheWritePerMtok": 2.5,
+ "minInputTokens": 272001,
+ "effectiveFrom": "2026-07-09",
+ "effectiveUntil": "2026-07-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
+ "verifiedAt": "2026-08-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.2,
+ "outputPerMtok": 1.2,
+ "cacheReadPerMtok": 0.02,
+ "cacheWritePerMtok": 0.25,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-07-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
+ "verifiedAt": "2026-08-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.4,
+ "outputPerMtok": 1.8,
+ "cacheReadPerMtok": 0.04,
+ "cacheWritePerMtok": 0.5,
+ "minInputTokens": 272001,
+ "effectiveFrom": "2026-07-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
+ "verifiedAt": "2026-08-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 0.4,
+ "outputPerMtok": 2.4,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 0.04,
+ "cacheWritePerMtok": 0.5,
+ "maxInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 0.8,
+ "outputPerMtok": 3.6,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 0.08,
+ "cacheWritePerMtok": 1.0,
+ "minInputTokens": 272001
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "openai/gpt-5.5",
+ "aliases": ["gpt-5.5", "xd/gpt-5.5", "xd/codex-gpt-5.5", "codex/gpt-5.5"],
+ "defaults": {
+ "name": "GPT-5.5",
+ "maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 30,
+ "cacheReadPerMtok": 0.5,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-04-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.5",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 10,
+ "outputPerMtok": 45,
+ "cacheReadPerMtok": 1,
+ "minInputTokens": 272001,
+ "effectiveFrom": "2026-04-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.5",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "openai/gpt-5.4",
+ "aliases": ["gpt-5.4", "xd/gpt-5.4", "xd/codex-gpt-5.4", "codex/gpt-5.4"],
+ "defaults": {
+ "name": "GPT-5.4",
+ "maxOutputTokens": 128000,
+ "efforts": ["low", "medium", "high", "xhigh"],
+ "defaultEffort": "medium"
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2.5,
+ "outputPerMtok": 15,
+ "cacheReadPerMtok": 0.25,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-03-05",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.4",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 22.5,
+ "cacheReadPerMtok": 0.5,
+ "minInputTokens": 272001,
+ "effectiveFrom": "2026-03-05",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.4",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "openai/gpt-5.4-mini",
@@ -4241,7 +2888,27 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.75,
+ "outputPerMtok": 4.5,
+ "cacheReadPerMtok": 0.075,
+ "effectiveFrom": "2026-03-17",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.4-mini",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "openai/gpt-5.4-pro",
@@ -4254,7 +2921,40 @@
"maxOutputTokens": 128000,
"efforts": ["medium", "high", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 30,
+ "outputPerMtok": 180,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.4-pro",
+ "verifiedAt": "2026-09-11"
+ },
+ "maxInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 60,
+ "outputPerMtok": 270.0,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.4-pro",
+ "verifiedAt": "2026-09-11"
+ },
+ "minInputTokens": 272001
+ }
+ ]
+ }
+ ]
},
{
"id": "openai/gpt-5.5-pro",
@@ -4267,7 +2967,27 @@
"maxOutputTokens": 128000,
"efforts": ["medium", "high", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 30,
+ "outputPerMtok": 180,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.5-pro",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 30
+ }
+ ]
+ }
+ ]
},
{
"id": "openai/gpt-5.6-cyber",
@@ -4280,7 +3000,29 @@
"maxOutputTokens": 128000,
"efforts": [],
"defaultEffort": null
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 12.5,
+ "outputPerMtok": 75,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.6-cyber",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 1.25,
+ "cacheWritePerMtok": 15.625,
+ "maxInputTokens": 272001
+ }
+ ]
+ }
+ ]
},
{
"id": "openai/gpt-6-astra",
@@ -4293,7 +3035,106 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 10,
+ "outputPerMtok": 50,
+ "cacheReadPerMtok": 1,
+ "cacheWritePerMtok": 12.5,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-09-04",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
+ "verifiedAt": "2026-09-05"
+ },
+ "effectiveUntil": "2026-09-07"
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 20,
+ "outputPerMtok": 100,
+ "cacheReadPerMtok": 2,
+ "cacheWritePerMtok": 25,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-09-04",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
+ "verifiedAt": "2026-09-05"
+ },
+ "effectiveUntil": "2026-09-07"
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 10,
+ "outputPerMtok": 50,
+ "cacheReadPerMtok": 1,
+ "cacheWritePerMtok": 12.5,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-09-07",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
+ "verifiedAt": "2026-09-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 20,
+ "outputPerMtok": 75,
+ "cacheReadPerMtok": 2,
+ "cacheWritePerMtok": 25,
+ "effectiveFrom": "2026-09-07",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
+ "verifiedAt": "2026-09-07"
+ },
+ "minInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 20,
+ "outputPerMtok": 100,
+ "cacheReadPerMtok": 2,
+ "cacheWritePerMtok": 25,
+ "maxInputTokens": 272001,
+ "effectiveFrom": "2026-09-07",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
+ "verifiedAt": "2026-09-07"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 40,
+ "outputPerMtok": 150,
+ "cacheReadPerMtok": 4,
+ "cacheWritePerMtok": 50,
+ "effectiveFrom": "2026-09-07",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-6-astra",
+ "verifiedAt": "2026-09-07"
+ },
+ "minInputTokens": 272001
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-fable-5-1",
@@ -4306,7 +3147,29 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 10,
+ "outputPerMtok": 50,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-09-11"
+ },
+ "cacheReadPerMtok": 0.25,
+ "cacheWritePerMtok": 12.5,
+ "cacheWrite1hPerMtok": 20
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-fable-5",
@@ -4319,7 +3182,29 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 10,
+ "outputPerMtok": 50,
+ "cacheReadPerMtok": 1,
+ "cacheWritePerMtok": 12.5,
+ "cacheWrite1hPerMtok": 20,
+ "effectiveFrom": "2026-06-09",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-mythos-5",
@@ -4331,7 +3216,29 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 10,
+ "outputPerMtok": 50,
+ "cacheReadPerMtok": 1,
+ "cacheWritePerMtok": 12.5,
+ "cacheWrite1hPerMtok": 20,
+ "effectiveFrom": "2026-06-09",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-opus-5",
@@ -4344,7 +3251,44 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 25,
+ "cacheReadPerMtok": 0.5,
+ "cacheWritePerMtok": 6.25,
+ "cacheWrite1hPerMtok": 10,
+ "effectiveFrom": "2026-07-24",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 10,
+ "outputPerMtok": 50,
+ "cacheReadPerMtok": 1,
+ "cacheWritePerMtok": 12.5,
+ "cacheWrite1hPerMtok": 20,
+ "effectiveFrom": "2026-07-24",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-08-02"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-opus-4-8",
@@ -4357,7 +3301,44 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 25,
+ "cacheReadPerMtok": 0.5,
+ "cacheWritePerMtok": 6.25,
+ "cacheWrite1hPerMtok": 10,
+ "effectiveFrom": "2026-05-28",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 10,
+ "outputPerMtok": 50,
+ "cacheReadPerMtok": 1,
+ "cacheWritePerMtok": 12.5,
+ "cacheWrite1hPerMtok": 20,
+ "effectiveFrom": "2026-05-28",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-08-02"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-opus-4-7",
@@ -4370,7 +3351,29 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 25,
+ "cacheReadPerMtok": 0.5,
+ "cacheWritePerMtok": 6.25,
+ "cacheWrite1hPerMtok": 10,
+ "effectiveFrom": "2026-04-16",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-opus-4-6",
@@ -4383,7 +3386,29 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 25,
+ "cacheReadPerMtok": 0.5,
+ "cacheWritePerMtok": 6.25,
+ "cacheWrite1hPerMtok": 10,
+ "effectiveFrom": "2026-02-05",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-opus-4-5",
@@ -4396,7 +3421,29 @@
"maxOutputTokens": 64000,
"efforts": ["low", "medium", "high"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 5,
+ "outputPerMtok": 25,
+ "cacheReadPerMtok": 0.5,
+ "cacheWritePerMtok": 6.25,
+ "cacheWrite1hPerMtok": 10,
+ "effectiveFrom": "2025-11-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-sonnet-5",
@@ -4409,7 +3456,29 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 10,
+ "cacheReadPerMtok": 0.2,
+ "cacheWritePerMtok": 2.5,
+ "cacheWrite1hPerMtok": 4,
+ "effectiveFrom": "2026-06-30",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-08-12"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-sonnet-4-6",
@@ -4422,7 +3491,29 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 3,
+ "outputPerMtok": 15,
+ "cacheReadPerMtok": 0.3,
+ "cacheWritePerMtok": 3.75,
+ "cacheWrite1hPerMtok": 6,
+ "effectiveFrom": "2026-02-17",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-sonnet-4-5",
@@ -4434,7 +3525,29 @@
"contextWindow": 200000,
"maxOutputTokens": 64000,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 3,
+ "outputPerMtok": 15,
+ "cacheReadPerMtok": 0.3,
+ "cacheWritePerMtok": 3.75,
+ "cacheWrite1hPerMtok": 6,
+ "effectiveFrom": "2025-09-29",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "anthropic/claude-haiku-4-5",
@@ -4446,7 +3559,29 @@
"contextWindow": 200000,
"maxOutputTokens": 64000,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1,
+ "outputPerMtok": 5,
+ "cacheReadPerMtok": 0.1,
+ "cacheWritePerMtok": 1.25,
+ "cacheWrite1hPerMtok": 2,
+ "effectiveFrom": "2025-10-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-07-31"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-4.6",
@@ -4458,7 +3593,42 @@
"contextWindow": 500000,
"efforts": ["low", "medium", "high", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 6,
+ "cacheReadPerMtok": 0.5,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-08-12",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-13"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 4,
+ "outputPerMtok": 12,
+ "cacheReadPerMtok": 1,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-08-12",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-13"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-4.5",
@@ -4470,7 +3640,42 @@
"contextWindow": 500000,
"efforts": ["low", "medium", "high"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 6,
+ "cacheReadPerMtok": 0.3,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-07-08",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 4,
+ "outputPerMtok": 12,
+ "cacheReadPerMtok": 0.6,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-07-08",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-4.3",
@@ -4482,7 +3687,42 @@
"contextWindow": 1000000,
"efforts": ["low", "medium", "high"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.25,
+ "outputPerMtok": 2.5,
+ "cacheReadPerMtok": 0.2,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-05-15",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2.5,
+ "outputPerMtok": 5,
+ "cacheReadPerMtok": 0.4,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-05-15",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-build-0.1",
@@ -4493,7 +3733,42 @@
"group": "grok",
"contextWindow": 256000,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1,
+ "outputPerMtok": 2,
+ "cacheReadPerMtok": 0.2,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-05-15",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 4,
+ "cacheReadPerMtok": 0.4,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-05-15",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-4.20-multi-agent-0309",
@@ -4505,7 +3780,42 @@
"contextWindow": 1000000,
"efforts": ["low", "medium", "high", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.25,
+ "outputPerMtok": 2.5,
+ "cacheReadPerMtok": 0.2,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-03-09",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2.5,
+ "outputPerMtok": 5,
+ "cacheReadPerMtok": 0.4,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-03-09",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-4.20-0309-reasoning",
@@ -4516,7 +3826,42 @@
"group": "grok",
"contextWindow": 1000000,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.25,
+ "outputPerMtok": 2.5,
+ "cacheReadPerMtok": 0.2,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-03-09",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2.5,
+ "outputPerMtok": 5,
+ "cacheReadPerMtok": 0.4,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-03-09",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-4.20-0309-non-reasoning",
@@ -4527,7 +3872,42 @@
"group": "grok",
"contextWindow": 1000000,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.25,
+ "outputPerMtok": 2.5,
+ "cacheReadPerMtok": 0.2,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-03-09",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2.5,
+ "outputPerMtok": 5,
+ "cacheReadPerMtok": 0.4,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-03-09",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-4.20",
@@ -4539,7 +3919,42 @@
"contextWindow": 1000000,
"efforts": ["low", "medium", "high", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.25,
+ "outputPerMtok": 2.5,
+ "cacheReadPerMtok": 0.2,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-04-07",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2.5,
+ "outputPerMtok": 5,
+ "cacheReadPerMtok": 0.4,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-04-07",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/pricing",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xai/grok-code-fast",
@@ -4550,7 +3965,42 @@
"group": "grok",
"contextWindow": 256000,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1,
+ "outputPerMtok": 2,
+ "cacheReadPerMtok": 0.2,
+ "maxInputTokens": 200000,
+ "effectiveFrom": "2026-05-15",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/migration/may-15-retirement",
+ "verifiedAt": "2026-08-01"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 4,
+ "cacheReadPerMtok": 0.4,
+ "minInputTokens": 200000,
+ "effectiveFrom": "2026-05-15",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.x.ai/developers/migration/may-15-retirement",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "google/gemini-3.7-flash",
@@ -4563,7 +4013,41 @@
"maxOutputTokens": 65536,
"efforts": ["low", "medium", "high"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.75,
+ "outputPerMtok": 3.75,
+ "cacheReadPerMtok": 0.075,
+ "effectiveFrom": "2026-08-13",
+ "effectiveUntil": "2027-01-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-08-13"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.5,
+ "outputPerMtok": 7.5,
+ "cacheReadPerMtok": 0.15,
+ "effectiveFrom": "2027-01-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-08-13"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "google/gemini-3.6-flash",
@@ -4576,7 +4060,41 @@
"maxOutputTokens": 65536,
"efforts": ["minimal", "low", "medium", "high"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.75,
+ "outputPerMtok": 3.75,
+ "cacheReadPerMtok": 0.075,
+ "effectiveFrom": "2026-07-21",
+ "effectiveUntil": "2027-01-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-08-13"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.5,
+ "outputPerMtok": 7.5,
+ "cacheReadPerMtok": 0.15,
+ "effectiveFrom": "2027-01-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-08-13"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "google/gemini-3.5-flash",
@@ -4589,7 +4107,27 @@
"maxOutputTokens": 65536,
"efforts": ["minimal", "low", "medium", "high"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.5,
+ "outputPerMtok": 9,
+ "cacheReadPerMtok": 0.15,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "google/gemini-3.1-pro-preview",
@@ -4628,7 +4166,27 @@
"maxOutputTokens": 65536,
"efforts": ["minimal", "low", "medium", "high"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.3,
+ "outputPerMtok": 2.5,
+ "cacheReadPerMtok": 0.03,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "google/gemini-3.1-flash-lite",
@@ -4641,7 +4199,27 @@
"maxOutputTokens": 65536,
"efforts": ["minimal", "low", "medium", "high"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.25,
+ "outputPerMtok": 1.5,
+ "cacheReadPerMtok": 0.025,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "bytedance-seed/seed-2.1-pro",
@@ -4699,7 +4277,45 @@
"group": "china",
"contextWindow": 262144,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 6.5,
+ "outputPerMtok": 27,
+ "cacheReadPerMtok": 1.3,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.com/docs/pricing/chat-k27-code",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.95,
+ "outputPerMtok": 4,
+ "cacheReadPerMtok": 0.19,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.ai/docs/pricing/chat-k27-code",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "moonshotai/kimi-k2.7-code-highspeed",
@@ -4710,7 +4326,45 @@
"group": "china",
"contextWindow": 262144,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 13,
+ "outputPerMtok": 54,
+ "cacheReadPerMtok": 2.6,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.com/docs/pricing/chat-k27-code",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.9,
+ "outputPerMtok": 8,
+ "cacheReadPerMtok": 0.38,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.ai/docs/pricing/chat-k27-code",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "moonshotai/kimi-k2.6",
@@ -4721,7 +4375,27 @@
"group": "china",
"contextWindow": 262144,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.95,
+ "outputPerMtok": 4,
+ "cacheReadPerMtok": 0.16,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.ai/docs/pricing/chat-k26",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "z-ai/glm-5.1",
@@ -4733,7 +4407,27 @@
"contextWindow": 200000,
"maxOutputTokens": 131072,
"efforts": []
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.4,
+ "outputPerMtok": 4.4,
+ "cacheReadPerMtok": 0.26,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.z.ai/guides/overview/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "z-ai/glm-5.2",
@@ -4746,7 +4440,27 @@
"maxOutputTokens": 131072,
"efforts": ["minimal", "high", "max"],
"defaultEffort": "high"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.4,
+ "outputPerMtok": 4.4,
+ "cacheReadPerMtok": 0.26,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.z.ai/guides/overview/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "z-ai/glm-5.3",
@@ -4759,7 +4473,27 @@
"maxOutputTokens": 131072,
"efforts": ["low", "high", "max"],
"defaultEffort": "high"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.4,
+ "outputPerMtok": 4.4,
+ "cacheReadPerMtok": 0.26,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.z.ai/guides/overview/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "z-ai/glm-5.3-flash",
@@ -4772,7 +4506,27 @@
"maxOutputTokens": 131072,
"efforts": ["low", "high", "max"],
"defaultEffort": "high"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.15,
+ "outputPerMtok": 0.5,
+ "cacheReadPerMtok": 0.03,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.z.ai/guides/overview/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xd/z-ai-glm-5.3-flash",
@@ -4785,7 +4539,27 @@
"maxOutputTokens": 131072,
"defaultEffort": "high",
"efforts": ["low", "high", "max"]
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.15,
+ "outputPerMtok": 0.5,
+ "cacheReadPerMtok": 0.03,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://docs.z.ai/guides/overview/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "deepseek/deepseek-v4-pro",
@@ -4798,7 +4572,41 @@
"maxOutputTokens": 384000,
"efforts": ["low", "high", "max"],
"defaultEffort": "high"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.435,
+ "outputPerMtok": 0.87,
+ "cacheReadPerMtok": 0.003625,
+ "effectiveFrom": "2026-07-31",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://api-docs.deepseek.com/quick_start/pricing",
+ "verifiedAt": "2026-08-05"
+ },
+ "effectiveUntil": "2026-08-16"
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.32,
+ "outputPerMtok": 3.96,
+ "cacheReadPerMtok": 0.044,
+ "effectiveFrom": "2026-08-16",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://api-docs.deepseek.com/quick_start/pricing",
+ "verifiedAt": "2026-08-16"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "deepseek/deepseek-v4-flash",
@@ -4811,7 +4619,55 @@
"maxOutputTokens": 384000,
"efforts": ["low", "high", "max"],
"defaultEffort": "high"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.14,
+ "outputPerMtok": 0.28,
+ "cacheReadPerMtok": 0.0028,
+ "effectiveFrom": "2026-07-31",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://api-docs.deepseek.com/quick_start/pricing",
+ "verifiedAt": "2026-08-05"
+ },
+ "effectiveUntil": "2026-08-16"
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.44,
+ "outputPerMtok": 1.32,
+ "cacheReadPerMtok": 0.014,
+ "effectiveFrom": "2026-08-16",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://api-docs.deepseek.com/quick_start/pricing",
+ "verifiedAt": "2026-08-16"
+ },
+ "effectiveUntil": "2026-09-11"
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.3,
+ "outputPerMtok": 1.2,
+ "cacheReadPerMtok": 0.006,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://api-docs.deepseek.com/quick_start/pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "openai/gpt-5.4-nano",
@@ -4824,7 +4680,27 @@
"maxOutputTokens": 128000,
"efforts": ["low", "medium", "high", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.2,
+ "outputPerMtok": 1.25,
+ "cacheReadPerMtok": 0.02,
+ "effectiveFrom": "2026-03-17",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/models/gpt-5.4-nano",
+ "verifiedAt": "2026-08-01"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "minimax/minimax-m3",
@@ -4842,7 +4718,47 @@
"name": "MiniMax M2.7",
"group": "china",
"contextWindow": 204800
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 2.1,
+ "outputPerMtok": 8.4,
+ "cacheReadPerMtok": 0.42,
+ "cacheWritePerMtok": 2.625,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.3,
+ "outputPerMtok": 1.2,
+ "cacheReadPerMtok": 0.06,
+ "cacheWritePerMtok": 0.375,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "minimax/minimax-m2.7-highspeed",
@@ -4851,7 +4767,47 @@
"name": "MiniMax M2.7 Highspeed",
"group": "china",
"contextWindow": 204800
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 4.2,
+ "outputPerMtok": 16.8,
+ "cacheReadPerMtok": 0.42,
+ "cacheWritePerMtok": 2.625,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.6,
+ "outputPerMtok": 2.4,
+ "cacheReadPerMtok": 0.06,
+ "cacheWritePerMtok": 0.375,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "minimax/minimax-m2.5",
@@ -4860,7 +4816,47 @@
"name": "MiniMax M2.5",
"group": "china",
"contextWindow": 204800
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 2.1,
+ "outputPerMtok": 8.4,
+ "cacheReadPerMtok": 0.21,
+ "cacheWritePerMtok": 2.625,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.3,
+ "outputPerMtok": 1.2,
+ "cacheReadPerMtok": 0.03,
+ "cacheWritePerMtok": 0.375,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "minimax/minimax-m2.5-highspeed",
@@ -4869,7 +4865,47 @@
"name": "MiniMax M2.5 Highspeed",
"group": "china",
"contextWindow": 204800
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 4.2,
+ "outputPerMtok": 16.8,
+ "cacheReadPerMtok": 0.21,
+ "cacheWritePerMtok": 2.625,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.6,
+ "outputPerMtok": 2.4,
+ "cacheReadPerMtok": 0.03,
+ "cacheWritePerMtok": 0.375,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "minimax/minimax-m2.1",
@@ -4878,7 +4914,47 @@
"name": "MiniMax M2.1",
"group": "china",
"contextWindow": 204800
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 2.1,
+ "outputPerMtok": 8.4,
+ "cacheReadPerMtok": 0.21,
+ "cacheWritePerMtok": 2.625,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.3,
+ "outputPerMtok": 1.2,
+ "cacheReadPerMtok": 0.03,
+ "cacheWritePerMtok": 0.375,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "minimax/minimax-m2.1-highspeed",
@@ -4887,7 +4963,47 @@
"name": "MiniMax M2.1 Highspeed",
"group": "china",
"contextWindow": 204800
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 4.2,
+ "outputPerMtok": 16.8,
+ "cacheReadPerMtok": 0.21,
+ "cacheWritePerMtok": 2.625,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.6,
+ "outputPerMtok": 2.4,
+ "cacheReadPerMtok": 0.03,
+ "cacheWritePerMtok": 0.375,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "minimax/minimax-m2",
@@ -4896,7 +5012,47 @@
"name": "MiniMax M2",
"group": "china",
"contextWindow": 204800
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 2.1,
+ "outputPerMtok": 8.4,
+ "cacheReadPerMtok": 0.21,
+ "cacheWritePerMtok": 2.625,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimaxi.com/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.3,
+ "outputPerMtok": 1.2,
+ "cacheReadPerMtok": 0.03,
+ "cacheWritePerMtok": 0.375,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.minimax.io/docs/guides/pricing-paygo",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "moonshotai/kimi-k3",
@@ -4908,7 +5064,45 @@
"maxOutputTokens": 1048576,
"efforts": ["low", "high", "max"],
"defaultEffort": "high"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 20,
+ "outputPerMtok": 100,
+ "cacheReadPerMtok": 2,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.com/docs/pricing/chat-k3",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ },
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 3,
+ "outputPerMtok": 15,
+ "cacheReadPerMtok": 0.3,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.ai/docs/pricing/chat-k3",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "qwen/qwen3.6-plus",
@@ -4955,7 +5149,26 @@
"maxOutputTokens": 131072,
"efforts": ["low", "medium", "xhigh"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 0.8,
+ "outputPerMtok": 2.7,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://help.aliyun.com/zh/model-studio/model-pricing",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "qwen/qwen3.7-plus",
@@ -5029,7 +5242,27 @@
"maxOutputTokens": 1048576,
"efforts": ["low", "medium", "high", "max"],
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 3,
+ "outputPerMtok": 15,
+ "cacheReadPerMtok": 0.3,
+ "effectiveFrom": "2026-09-11",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.ai/docs/pricing/chat-k3",
+ "verifiedAt": "2026-09-11"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xd/deepseek-deepseek-v4-flash-vision-exp",
diff --git a/packages/model-providers/src/__tests__/modelReferencePrices.test.ts b/packages/model-providers/src/__tests__/modelReferencePrices.test.ts
new file mode 100644
index 0000000000..3190302b74
--- /dev/null
+++ b/packages/model-providers/src/__tests__/modelReferencePrices.test.ts
@@ -0,0 +1,185 @@
+import { describe, expect, it } from "vitest";
+import { parseModelRegistry } from "../modelAccessValidator.js";
+import { referencePricesForRoute } from "../modelMetadataLayers.js";
+import type { ModelRegistry } from "../modelAccessBean.js";
+
+export function pricedRegistry(): ModelRegistry {
+ return {
+ schemaVersion: 5,
+ updatedAt: "2026-09-11T00:00:00.000Z",
+ baseModels: [
+ {
+ id: "maker/model",
+ aliases: ["model"],
+ defaults: {},
+ referencePriceGroups: [
+ {
+ id: "global",
+ prices: [
+ {
+ currency: "USD",
+ variant: "standard",
+ inputPerMtok: 2,
+ outputPerMtok: 10,
+ cacheWritePerMtok: 2.5,
+ effectiveFrom: "2026-09-01",
+ source: {
+ kind: "provider-official",
+ url: "https://example.test/prices",
+ verifiedAt: "2026-09-01",
+ },
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ models: [
+ {
+ id: "entry",
+ name: "Model",
+ modelRef: "maker/model",
+ routes: [
+ {
+ providerId: "supplier",
+ modelId: "wire-model",
+ agents: ["codex"],
+ referencePriceGroup: "global",
+ },
+ ],
+ },
+ ],
+ };
+}
+
+describe("V5 model reference tariffs", () => {
+ it("validates public tariffs independently of supplier membership", () => {
+ const r = pricedRegistry();
+ expect(parseModelRegistry(r).ok).toBe(true);
+ r.models = [];
+ expect(parseModelRegistry(r).ok).toBe(true);
+ r.baseModels![0].referencePriceGroups![0].prices[0].cacheWritePerMtok = -1;
+ expect(parseModelRegistry(r).ok).toBe(false);
+ });
+ it("rejects unsupported fields in older versions and dangling group references", () => {
+ const r = pricedRegistry();
+ expect(parseModelRegistry({ ...r, schemaVersion: 4 }).ok).toBe(false);
+ r.models[0].routes[0].referencePriceGroup = "missing";
+ expect(parseModelRegistry(r).ok).toBe(false);
+ delete r.models[0].routes[0].referencePriceGroup;
+ expect(parseModelRegistry(r).ok).toBe(true);
+ });
+ it("rejects duplicate groups, overlapping tariffs and misspelled fields", () => {
+ for (const kind of ["duplicate", "overlap", "unknown"] as const) {
+ const r = pricedRegistry();
+ const groups = r.baseModels![0].referencePriceGroups!;
+ if (kind === "duplicate") groups.push(structuredClone(groups[0]));
+ if (kind === "overlap")
+ groups[0].prices.push(structuredClone(groups[0].prices[0]));
+ if (kind === "unknown") Object.assign(groups[0], { typo: true });
+ expect(parseModelRegistry(r).ok, kind).toBe(false);
+ }
+ });
+ it("keeps supplier and manufacturer prices separate without filling missing cache rates", () => {
+ const r = pricedRegistry(),
+ entry = r.models[0],
+ route = entry.routes[0];
+ const official = referencePricesForRoute(r, entry, route)!;
+ route.referencePrices = [{ ...official[0], inputPerMtok: 9 }];
+ delete route.referencePrices[0].cacheWritePerMtok;
+ expect(referencePricesForRoute(r, entry, route)?.[0].inputPerMtok).toBe(9);
+ expect(
+ referencePricesForRoute(r, entry, route)?.[0].cacheWritePerMtok,
+ ).toBeUndefined();
+ expect(referencePricesForRoute(r, entry, route, true)).toEqual(official);
+ route.referencePrices = [];
+ expect(referencePricesForRoute(r, entry, route)).toEqual([]);
+ expect(referencePricesForRoute(r, entry, route, true)).toEqual(official);
+ delete route.referencePriceGroup;
+ expect(referencePricesForRoute(r, entry, route, true)).toBeUndefined();
+ });
+});
+
+import {
+ resolveBaseModelReferencePrice,
+ resolveModelReferencePrice,
+} from "../modelRegistry.js";
+import { BUNDLED_CATALOG } from "../builtin.js";
+
+it("selects by public identity, market, currency, historical date and input band", () => {
+ const r = structuredClone(BUNDLED_CATALOG.modelRegistry!);
+ r.models = [];
+ const options = { at: "2026-09-11" };
+ expect(
+ resolveBaseModelReferencePrice(r, "gpt-5.6-luna", options)?.price,
+ ).toMatchObject({ inputPerMtok: 0.2, cacheWritePerMtok: 0.25 });
+ expect(
+ resolveBaseModelReferencePrice(r, "openai/gpt-5.6-luna", {
+ ...options,
+ variant: "fast",
+ inputTokens: 272001,
+ })?.price,
+ ).toMatchObject({ inputPerMtok: 0.8, cacheWritePerMtok: 1 });
+ expect(
+ resolveBaseModelReferencePrice(r, "openai/gpt-5.6-luna", {
+ at: "2026-07-29",
+ })?.price.inputPerMtok,
+ ).toBe(1);
+ expect(
+ resolveBaseModelReferencePrice(r, "minimax/minimax-m2.7", options),
+ ).toBeUndefined();
+ expect(
+ resolveBaseModelReferencePrice(r, "minimax/minimax-m2.7", {
+ ...options,
+ priceGroup: "cn",
+ })?.price.currency,
+ ).toBe("CNY");
+ expect(
+ resolveBaseModelReferencePrice(r, "minimax/minimax-m2.7", {
+ ...options,
+ currency: "USD",
+ })?.price.inputPerMtok,
+ ).toBe(0.3);
+ expect(resolveBaseModelReferencePrice(r, "unknown", options)).toBeUndefined();
+ expect(
+ resolveBaseModelReferencePrice(r, "openai/gpt-5.6-cyber", {
+ ...options,
+ inputTokens: 272001,
+ }),
+ ).toBeUndefined();
+});
+it("does not select arbitrarily between markets with the same currency", () => {
+ const r = pricedRegistry();
+ const groups = r.baseModels![0].referencePriceGroups!;
+ groups.push({ ...groups[0], id: "other-market" });
+ expect(
+ resolveBaseModelReferencePrice(r, "model", { currency: "USD" }),
+ ).toBeUndefined();
+ expect(
+ resolveBaseModelReferencePrice(r, "model", { priceGroup: "global" })?.price
+ .inputPerMtok,
+ ).toBe(2);
+});
+it("uses route identity to find official pricing while preserving legacy catalogs", () => {
+ const r = pricedRegistry(),
+ route = r.models[0].routes[0];
+ route.referencePrices = [
+ { ...r.baseModels![0].referencePriceGroups![0].prices[0], inputPerMtok: 8 },
+ ];
+ expect(
+ resolveModelReferencePrice(r, "supplier", "wire-model")?.price.inputPerMtok,
+ ).toBe(8);
+ expect(
+ resolveModelReferencePrice(r, "supplier", "wire-model", {
+ officialOnly: true,
+ })?.price.inputPerMtok,
+ ).toBe(2);
+ expect(
+ resolveModelReferencePrice(
+ { ...r, schemaVersion: 4 },
+ "supplier",
+ "wire-model",
+ { officialOnly: true },
+ )?.price.inputPerMtok,
+ ).toBe(8);
+});
diff --git a/packages/model-providers/src/__tests__/modelRegistryConsistency.test.ts b/packages/model-providers/src/__tests__/modelRegistryConsistency.test.ts
index 0be46ad154..085d7dec13 100644
--- a/packages/model-providers/src/__tests__/modelRegistryConsistency.test.ts
+++ b/packages/model-providers/src/__tests__/modelRegistryConsistency.test.ts
@@ -1,5 +1,6 @@
import {
expandedRegistryEntries,
+ referencePricesForRoute,
resolveModelMetadata,
} from "../modelMetadataLayers.js";
import { describe, expect, it } from "vitest";
@@ -41,9 +42,13 @@ function effectiveWindow(
}
/** 按 (currency, variant, effectiveFrom) 分组 —— 组内 band 构成一条完整价格轴。 */
-function bandGroups(route: ModelRegistryRoute): ModelReferencePrice[][] {
+function bandGroups(
+ entry: ModelRegistryEntry,
+ route: ModelRegistryRoute,
+): ModelReferencePrice[][] {
const groups = new Map<string, ModelReferencePrice[]>();
- for (const price of route.referencePrices ?? []) {
+ for (const price of referencePricesForRoute(rawRegistry, entry, route) ??
+ []) {
const key = `${price.currency}|${price.variant}|${price.effectiveFrom}`;
const group = groups.get(key);
if (group) group.push(price);
@@ -115,7 +120,7 @@ describe("model registry data consistency", () => {
it("price bands tile the input axis without gaps or overlaps", () => {
for (const entry of registry.models) {
for (const route of entry.routes) {
- for (const group of bandGroups(route)) {
+ for (const group of bandGroups(entry, route)) {
const label = `${entry.id} @ ${route.providerId}`;
// 第一条必须从 0 起 —— 否则低输入段无价可循
expect(
@@ -150,7 +155,7 @@ describe("model registry data consistency", () => {
]);
for (const entry of registry.models) {
for (const route of entry.routes) {
- for (const group of bandGroups(route)) {
+ for (const group of bandGroups(entry, route)) {
for (const band of group) {
const lo = band.minInputTokens ?? 0;
if (lo === 0) continue;
@@ -186,7 +191,7 @@ describe("model registry data consistency", () => {
// 要么窗口虚高(#1429 主形态),要么漏了长上下文价档 —— 两者都必须在数据层修。
for (const entry of registry.models) {
for (const route of entry.routes) {
- for (const group of bandGroups(route)) {
+ for (const group of bandGroups(entry, route)) {
const top = group[group.length - 1]!;
if (top.maxInputTokens === undefined) continue;
// Cyber's model page and consolidated pricing table disagree on long-input
diff --git a/packages/model-providers/src/__tests__/source-registry.test.ts b/packages/model-providers/src/__tests__/source-registry.test.ts
index 2070c79c09..7e187539b5 100644
--- a/packages/model-providers/src/__tests__/source-registry.test.ts
+++ b/packages/model-providers/src/__tests__/source-registry.test.ts
@@ -115,7 +115,7 @@ describe("resolveCatalogUrl", () => {
expect(
resolveCatalogUrl({ baseUrl: "https://model-access.example.com/" }),
).toBe(
- "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=4",
+ "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=5",
);
});
it("builds the migration OSS fallback URL", () => {
@@ -1042,7 +1042,7 @@ describe("loadCatalog", () => {
);
expect(fetchText).toHaveBeenNthCalledWith(
1,
- "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=4",
+ "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=5",
15_000,
);
expect(fetchText).toHaveBeenNthCalledWith(
@@ -1102,7 +1102,7 @@ describe("loadCatalog", () => {
);
expect(fetchText).toHaveBeenNthCalledWith(
1,
- "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=4",
+ "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=5",
15_000,
);
expect(fetchText).toHaveBeenNthCalledWith(
@@ -1160,7 +1160,7 @@ describe("loadCatalog", () => {
);
expect(fetchText).toHaveBeenNthCalledWith(
1,
- "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=4",
+ "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=5",
15_000,
);
expect(fetchText).toHaveBeenNthCalledWith(
@@ -1189,7 +1189,7 @@ describe("loadCatalog", () => {
);
expect(fetchText).toHaveBeenCalledTimes(1);
expect(fetchText).toHaveBeenCalledWith(
- "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=4",
+ "https://model-access.example.com/api/model-catalog/catalog?registrySchemaVersion=5",
15_000,
);
expect(cat.version).toBe(BUNDLED_CATALOG.version);
diff --git a/packages/model-providers/src/catalog.ts b/packages/model-providers/src/catalog.ts
index 112b89b254..20fce570cc 100644
--- a/packages/model-providers/src/catalog.ts
+++ b/packages/model-providers/src/catalog.ts
@@ -822,11 +822,11 @@ export function parseCatalog(input: string | unknown): Catalog {
for (const provider of catalog.providers) {
for (const field of ['imageModels', 'videoModels', 'audioModels', 'embeddingModels'] as const)
validateMediaModels(provider.id, field, provider[field], field === 'audioModels' ? '' : field.replace('Models', 'Defaults'),
- field === 'imageModels' ? provider.imageDefaults : field === 'videoModels' ? provider.videoDefaults : field === 'embeddingModels' ? provider.embeddingDefaults : undefined, catalog.modelRegistry?.schemaVersion === 4);
+ field === 'imageModels' ? provider.imageDefaults : field === 'videoModels' ? provider.videoDefaults : field === 'embeddingModels' ? provider.embeddingDefaults : undefined, (catalog.modelRegistry?.schemaVersion ?? 0) >= 4);
}
const projected = { ...catalog, providers: catalog.providers.map((provider) =>
projectProviderMediaModels(provider, catalog.modelRegistry, { addDeclared: true })) };
- for (const provider of projected.providers) validateProvider(provider, catalog.modelRegistry?.schemaVersion === 4);
+ for (const provider of projected.providers) validateProvider(provider, (catalog.modelRegistry?.schemaVersion ?? 0) >= 4);
validateModelConsistency(projected);
// 远端下发目录与 bundled 同格式:静态条目的窗口是产品侧写定的真实上限,标记为已核实
// (幂等;条目自己表过态时尊重原值)。动态发现的模型不经这里 —— 见 withVerifiedStaticWindows。
diff --git a/packages/model-providers/src/index.ts b/packages/model-providers/src/index.ts
index 74e918505b..09298cbad8 100644
--- a/packages/model-providers/src/index.ts
+++ b/packages/model-providers/src/index.ts
@@ -94,6 +94,7 @@ export {
findModelRegistryRoute,
resolveModelNativeApi,
resolveModelReferencePrice,
+ resolveBaseModelReferencePrice,
} from "./modelRegistry.js";
export { modelRegistryCanonicalJson } from "./modelRegistryCanonical.js";
export {
@@ -104,6 +105,8 @@ export {
export type {
ResolvedModelReferencePrice,
ResolveModelReferencePriceOptions,
+ ResolveBaseModelReferencePriceOptions,
+ ModelReferencePriceSelection,
ModelRegistryRevisionRelation,
ModelRegistrySnapshotDecision,
} from "./modelRegistry.js";
diff --git a/packages/model-providers/src/modelAccessBean.ts b/packages/model-providers/src/modelAccessBean.ts
index be945ccfd1..bb6bb0759a 100644
--- a/packages/model-providers/src/modelAccessBean.ts
+++ b/packages/model-providers/src/modelAccessBean.ts
@@ -56,6 +56,7 @@ export const MODEL_REGISTRY_LEGACY_SCHEMA_VERSION = 1 as const;
export const MODEL_REGISTRY_SCHEMA_VERSION = 2 as const;
export const MODEL_REGISTRY_V3_SCHEMA_VERSION = 3 as const;
export const MODEL_REGISTRY_V4_SCHEMA_VERSION = 4 as const;
+export const MODEL_REGISTRY_V5_SCHEMA_VERSION = 5 as const;
export const MODEL_NATIVE_APIS = [
"anthropic-messages",
"openai-responses",
@@ -107,7 +108,15 @@ export interface ModelReferencePrice {
source: ModelReferencePriceSource;
}
+/** A manufacturer's tariff for a named market, independent of any reseller. */
+export interface ModelReferencePriceGroup {
+ id: string;
+ prices: ModelReferencePrice[];
+}
+
export interface ModelRegistryRoute {
+ /** V5: explicitly selects a tariff on the entry's public model. */
+ referencePriceGroup?: string;
defaults?: ModelMetadata;
forceOverrides?: ModelMetadata;
overrideReason?: string;
@@ -185,7 +194,8 @@ export interface ModelRegistry extends ModelRegistryBase {
| typeof MODEL_REGISTRY_LEGACY_SCHEMA_VERSION
| typeof MODEL_REGISTRY_SCHEMA_VERSION
| typeof MODEL_REGISTRY_V3_SCHEMA_VERSION
- | typeof MODEL_REGISTRY_V4_SCHEMA_VERSION;
+ | typeof MODEL_REGISTRY_V4_SCHEMA_VERSION
+ | typeof MODEL_REGISTRY_V5_SCHEMA_VERSION;
baseModels?: BaseModel[];
localModels?: LocalModelCatalog;
models: ModelRegistryEntry[];
diff --git a/packages/model-providers/src/modelAccessValidator.ts b/packages/model-providers/src/modelAccessValidator.ts
index ad9d83e921..39e90812e0 100644
--- a/packages/model-providers/src/modelAccessValidator.ts
+++ b/packages/model-providers/src/modelAccessValidator.ts
@@ -19,6 +19,7 @@ import {
MODEL_REGISTRY_SCHEMA_VERSION,
MODEL_REGISTRY_V3_SCHEMA_VERSION,
MODEL_REGISTRY_V4_SCHEMA_VERSION,
+ MODEL_REGISTRY_V5_SCHEMA_VERSION,
MODEL_NATIVE_APIS,
MODEL_REGISTRY_STATUSES,
type ListModelsResponse,
@@ -957,6 +958,47 @@ function referencePriceError(value: unknown, path: string): string | null {
return null;
}
+function referencePricesError(value: unknown, path: string): string | null {
+ if (!Array.isArray(value)) return `${path} must be an array`;
+ for (const [index, price] of value.entries()) {
+ const error = referencePriceError(price, `${path}[${index}]`);
+ if (error) return error;
+ for (let previousIndex = 0; previousIndex < index; previousIndex++) {
+ const previous = value[previousIndex];
+ if (
+ isPlainObject(price) &&
+ isPlainObject(previous) &&
+ referencePriceRangesOverlap(previous, price)
+ )
+ return `${path}[${index}] overlaps referencePrices[${previousIndex}] for the same currency and variant`;
+ }
+ }
+ return null;
+}
+
+function referencePriceGroupsError(value: unknown): string | null {
+ if (!Array.isArray(value) || value.length > 32)
+ return "baseModel.referencePriceGroups must be an array of at most 32 groups";
+ const ids = new Set<string>();
+ for (const group of value) {
+ if (
+ !isPlainObject(group) ||
+ unknownFieldError(group, ["id", "prices"], "referencePriceGroup") ||
+ !isSafeSlug(group.id)
+ )
+ return "baseModel.referencePriceGroups contains an invalid group";
+ if (ids.has(group.id))
+ return "baseModel.referencePriceGroups ids must be unique";
+ ids.add(group.id);
+ const error = referencePricesError(
+ group.prices,
+ `baseModel.referencePriceGroups.${group.id}.prices`,
+ );
+ if (error) return error;
+ }
+ return null;
+}
+
function registryRouteError(
value: unknown,
path: string,
@@ -969,6 +1011,7 @@ function registryRouteError(
schemaVersion >= 4
? [
...MODEL_REGISTRY_ROUTE_FIELDS,
+ ...(schemaVersion >= 5 ? ["referencePriceGroup"] : []),
"defaults",
"forceOverrides",
"overrideReason",
@@ -1027,25 +1070,16 @@ function registryRouteError(
if (media && Array.isArray(value.agents) && value.agents.length !== 0) {
return `${path}.agents must be empty for a media model`;
}
- if (value.referencePrices !== undefined) {
- if (!Array.isArray(value.referencePrices)) {
- return `${path}.referencePrices must be an array when present`;
- }
- for (const [index, price] of value.referencePrices.entries()) {
- error = referencePriceError(price, `${path}.referencePrices[${index}]`);
- if (error) return error;
- for (let previousIndex = 0; previousIndex < index; previousIndex += 1) {
- const previous = value.referencePrices[previousIndex];
- if (
- isPlainObject(price) &&
- isPlainObject(previous) &&
- referencePriceRangesOverlap(previous, price)
- ) {
- return `${path}.referencePrices[${index}] overlaps referencePrices[${previousIndex}] for the same currency and variant`;
- }
- }
- }
- }
+ if (
+ value.referencePriceGroup !== undefined &&
+ !isSafeSlug(value.referencePriceGroup)
+ )
+ return `${path}.referencePriceGroup must be a non-empty slug`;
+ if (value.referencePrices !== undefined)
+ return referencePricesError(
+ value.referencePrices,
+ `${path}.referencePrices`,
+ );
return null;
}
@@ -1234,7 +1268,8 @@ export function parseModelRegistry(
if (!isPlainObject(value)) return fail("modelRegistry must be an object");
const unknownField = unknownFieldError(
value,
- value.schemaVersion === MODEL_REGISTRY_V4_SCHEMA_VERSION
+ value.schemaVersion === MODEL_REGISTRY_V4_SCHEMA_VERSION ||
+ value.schemaVersion === MODEL_REGISTRY_V5_SCHEMA_VERSION
? [
...MODEL_REGISTRY_FIELDS,
"nativeApiRules",
@@ -1251,9 +1286,10 @@ export function parseModelRegistry(
value.schemaVersion !== MODEL_REGISTRY_LEGACY_SCHEMA_VERSION &&
value.schemaVersion !== MODEL_REGISTRY_SCHEMA_VERSION &&
value.schemaVersion !== MODEL_REGISTRY_V3_SCHEMA_VERSION &&
- value.schemaVersion !== MODEL_REGISTRY_V4_SCHEMA_VERSION
+ value.schemaVersion !== MODEL_REGISTRY_V4_SCHEMA_VERSION &&
+ value.schemaVersion !== MODEL_REGISTRY_V5_SCHEMA_VERSION
) {
- return fail("modelRegistry.schemaVersion must be 1, 2, 3 or 4");
+ return fail("modelRegistry.schemaVersion must be 1, 2, 3, 4 or 5");
}
if (!isIsoTimestamp(value.updatedAt)) {
return fail("modelRegistry.updatedAt must be an ISO timestamp");
@@ -1307,7 +1343,16 @@ export function parseModelRegistry(
for (const base of value.baseModels) {
if (
!isPlainObject(base) ||
- unknownFieldError(base, ["id", "aliases", "defaults"], "baseModel") ||
+ unknownFieldError(
+ base,
+ [
+ "id",
+ "aliases",
+ "defaults",
+ ...(value.schemaVersion >= 5 ? ["referencePriceGroups"] : []),
+ ],
+ "baseModel",
+ ) ||
typeof base.id !== "string" ||
!base.id ||
base.id.length > 256 ||
@@ -1319,6 +1364,10 @@ export function parseModelRegistry(
!validModelMetadata(base.defaults)
)
return fail("modelRegistry.baseModels contains invalid data");
+ if (base.referencePriceGroups !== undefined) {
+ const error = referencePriceGroupsError(base.referencePriceGroups);
+ if (error) return fail(error);
+ }
baseIds.add(base.id);
if (
base.defaults.efforts !== undefined &&
@@ -1377,6 +1426,21 @@ export function parseModelRegistry(
value.schemaVersion < 4,
);
if (error) return fail(error);
+ const referenceEntry = model as ModelRegistryEntry;
+ for (const route of referenceEntry.routes) {
+ if (route.referencePriceGroup !== undefined) {
+ const base = (
+ value.baseModels as
+ import("./modelMetadataLayers.js").BaseModel[] | undefined
+ )?.find((base) => base.id === referenceEntry.modelRef);
+ if (
+ !base?.referencePriceGroups?.some(
+ (group) => group.id === route.referencePriceGroup,
+ )
+ )
+ return fail("modelRegistry.route.referencePriceGroup is unresolved");
+ }
+ }
const typed = model as ModelRegistryEntry;
for (const effective of expandedRegistryEntries({
...(value as unknown as ModelRegistry),
diff --git a/packages/model-providers/src/modelMetadataLayers.ts b/packages/model-providers/src/modelMetadataLayers.ts
index 96facf76a2..e9b0b6b657 100644
--- a/packages/model-providers/src/modelMetadataLayers.ts
+++ b/packages/model-providers/src/modelMetadataLayers.ts
@@ -4,6 +4,7 @@ import type {
ModelRegistryEntry,
ModelRegistryRoute,
ModelEffort,
+ ModelReferencePriceGroup,
} from "./modelAccessBean.js";
/** Data only. Membership, credentials, routing and billed prices never inherit. */
@@ -25,6 +26,8 @@ export interface BaseModel {
id: string;
aliases: string[];
defaults: ModelMetadata;
+ /** V5 manufacturer reference tariffs; never actual account billing. */
+ referencePriceGroups?: ModelReferencePriceGroup[];
}
export const MODEL_METADATA_FIELDS = [
"mode",
@@ -430,3 +433,22 @@ export function runtimeUserModelMetadata(
: {}),
});
}
+
+/** Select a whole tariff; missing cache fields never borrow from another source. */
+export function referencePricesForRoute(
+ registry: ModelRegistry,
+ entry: ModelRegistryEntry,
+ route: ModelRegistryRoute,
+ officialOnly = false,
+) {
+ // Before V5 the official tariff lived on the route.
+ if (
+ registry.schemaVersion < 5 ||
+ (!officialOnly && route.referencePrices !== undefined)
+ )
+ return route.referencePrices;
+ if (!entry.modelRef || !route.referencePriceGroup) return undefined;
+ return findBaseModel(registry, entry.modelRef)?.referencePriceGroups?.find(
+ (group) => group.id === route.referencePriceGroup,
+ )?.prices;
+}
diff --git a/packages/model-providers/src/modelRegistry.ts b/packages/model-providers/src/modelRegistry.ts
index a7520a36b8..6eae66ba57 100644
--- a/packages/model-providers/src/modelRegistry.ts
+++ b/packages/model-providers/src/modelRegistry.ts
@@ -1,4 +1,8 @@
-import { registryEntryDefaults } from "./modelMetadataLayers.js";
+import {
+ registryEntryDefaults,
+ findBaseModel,
+ referencePricesForRoute,
+} from "./modelMetadataLayers.js";
import { modelRegistryCanonicalJson } from "./modelRegistryCanonical.js";
import type {
ModelAccessV2Agent,
@@ -113,15 +117,24 @@ export interface ResolvedModelReferencePrice {
entry: ModelRegistryEntry;
route: ModelRegistryRoute;
price: ModelReferencePrice;
+ prices: ModelReferencePrice[];
}
-export interface ResolveModelReferencePriceOptions {
- agent?: ModelAccessV2Agent;
+export interface ModelReferencePriceSelection {
+ currency?: import("./modelAccessBean.js").ModelCurrency;
inputTokens?: number;
variant?: ModelPriceVariant;
/** ISO date or Date; defaults to the current day. */
at?: string | Date;
}
+export interface ResolveBaseModelReferencePriceOptions extends ModelReferencePriceSelection {
+ priceGroup?: string;
+}
+export interface ResolveModelReferencePriceOptions extends ModelReferencePriceSelection {
+ /** Subscription value uses manufacturer tariffs even when a route has its own price. */
+ officialOnly?: boolean;
+ agent?: ModelAccessV2Agent;
+}
function calendarDate(value: string | Date | undefined): string {
if (value instanceof Date) return value.toISOString().slice(0, 10);
@@ -200,7 +213,7 @@ export function findModelRegistryRoute(
modelId,
agent,
)[0];
- if (!matched || registry?.schemaVersion !== 4) return matched;
+ if (!matched || !registry || registry.schemaVersion < 4) return matched;
return {
route: matched.route,
entry: {
@@ -229,36 +242,65 @@ export function resolveModelReferencePrice(
modelId,
options.agent,
);
+ if (!registry) return undefined;
+ for (const matched of matches) {
+ const prices = referencePricesForRoute(
+ registry,
+ matched.entry,
+ matched.route,
+ options.officialOnly,
+ );
+ const price = selectReferencePrice(prices, options);
+ if (price && prices) return { ...matched, price, prices };
+ }
+ return undefined;
+}
+
+/** Reads a manufacturer's price without requiring any supplier route or account. */
+export function resolveBaseModelReferencePrice(
+ registry: ModelRegistry | null | undefined,
+ modelId: string,
+ options: ResolveBaseModelReferencePriceOptions = {},
+) {
+ const model = findBaseModel(registry ?? undefined, modelId);
+ const groups =
+ model?.referencePriceGroups?.filter(
+ (group) =>
+ options.priceGroup === undefined || group.id === options.priceGroup,
+ ) ?? [];
+ const matches = groups.flatMap((group) => {
+ const price = selectReferencePrice(group.prices, options);
+ return price ? [{ model: model!, group, price, prices: group.prices }] : [];
+ });
+ // Market/currency ambiguity is unknown, never array order or a currency conversion.
+ return matches.length === 1 ? matches[0] : undefined;
+}
+
+function selectReferencePrice(
+ prices: ModelReferencePrice[] | undefined,
+ options: ModelReferencePriceSelection,
+): ModelReferencePrice | undefined {
const day = calendarDate(options.at);
const inputTokens = options.inputTokens;
const variant = options.variant ?? "standard";
- for (const matched of matches) {
- const prices = matched.route.referencePrices
- ?.filter((price) => {
- if (price.variant !== variant) return false;
- if (day < price.effectiveFrom) return false;
- if (price.effectiveUntil !== undefined && day >= price.effectiveUntil)
- return false;
- if (inputTokens === undefined) return (price.minInputTokens ?? 0) === 0;
- if (
- price.minInputTokens !== undefined &&
- inputTokens < price.minInputTokens
- )
- return false;
- if (
- price.maxInputTokens !== undefined &&
- inputTokens >= price.maxInputTokens
- )
- return false;
- return true;
- })
- .sort(
- (a, b) =>
- b.effectiveFrom.localeCompare(a.effectiveFrom) ||
- (b.minInputTokens ?? 0) - (a.minInputTokens ?? 0),
+ const matches =
+ prices?.filter((price) => {
+ if (
+ price.variant !== variant ||
+ (options.currency && price.currency !== options.currency)
+ )
+ return false;
+ if (
+ day < price.effectiveFrom ||
+ (price.effectiveUntil !== undefined && day >= price.effectiveUntil)
+ )
+ return false;
+ if (inputTokens === undefined) return (price.minInputTokens ?? 0) === 0;
+ return (
+ inputTokens >= (price.minInputTokens ?? 0) &&
+ (price.maxInputTokens === undefined ||
+ inputTokens < price.maxInputTokens)
);
- const price = prices?.[0];
- if (price) return { ...matched, price };
- }
- return undefined;
+ }) ?? [];
+ return matches.length === 1 ? matches[0] : undefined;
}
diff --git a/packages/model-providers/src/source.ts b/packages/model-providers/src/source.ts
index baffbf81c2..55ef9f0608 100644
--- a/packages/model-providers/src/source.ts
+++ b/packages/model-providers/src/source.ts
@@ -22,7 +22,7 @@ import type { AgentKind, Catalog, Provider, ProviderPreset } from "./types.js";
/** 公共模型目录 API 路径。发布版由 model-access-server 匿名提供完整 Catalog。 */
export const CATALOG_API_PATH =
- "/api/model-catalog/catalog?registrySchemaVersion=4";
+ "/api/model-catalog/catalog?registrySchemaVersion=5";
/** 旧客户端目录的 OSS 相对路径。迁移期作为公共 API 失败后的兼容回退。 */
export const CATALOG_CFG_PATH = "/cfg/providers.json";
@@ -124,7 +124,7 @@ export function resolveCatalogUrl(cfg: CatalogSourceConfig): string | null {
try {
const url = new URL(explicit);
if (url.pathname.endsWith("/api/model-catalog/catalog")) {
- url.searchParams.set("registrySchemaVersion", "4");
+ url.searchParams.set("registrySchemaVersion", "5");
return url.toString();
}
} catch {
diff --git a/packages/model-providers/src/user-provider.ts b/packages/model-providers/src/user-provider.ts
index f710654815..6d2f29078b 100644
--- a/packages/model-providers/src/user-provider.ts
+++ b/packages/model-providers/src/user-provider.ts
@@ -299,11 +299,11 @@ function toCatalogModel(
? []
: (CUSTOM_EFFORTS[agent] ?? []);
const registryEfforts =
- m.reasoning !== undefined || modelRegistry?.schemaVersion === 4
+ m.reasoning !== undefined || (modelRegistry?.schemaVersion ?? 0) >= 4
? undefined
: registryEffortMetadata(modelRegistry, m.id, agent);
const supportsFastMode =
- modelRegistry?.schemaVersion !== 4 &&
+ (modelRegistry?.schemaVersion ?? 0) < 4 &&
registrySupportsFastMode(modelRegistry, m.id, agent);
const effectiveEfforts = registryEfforts?.efforts ?? efforts;
const defaultEffort =
@@ -342,7 +342,7 @@ function toCatalogModel(
};
const user = runtimeUserModelMetadata(m);
const resolved =
- modelRegistry?.schemaVersion === 4 ||
+ (modelRegistry?.schemaVersion ?? 0) >= 4 ||
m.discoveredMetadata ||
providerDefaults
? resolveModelMetadata(