feat(pricing): refresh catalog pricing snapshot
Add the free minimax/minimax-m3-free and minimax/minimax-m2.7-free promotional variants (free through September 5, 2026) and tencent/hy4-preview, drop the retired stealth/ox-alpha, and refresh the model-id and pricing snapshots to the current 62-model catalog verified on 2026-08-28.
This commit is contained in:
+13
-3
@@ -27,7 +27,11 @@ const fixtureUrl = new URL("./fixtures/commandcode-model-ids.json", import.meta.
|
||||
const fixture = JSON.parse(await readFile(fixtureUrl, "utf-8")) as ModelCatalogSnapshot
|
||||
const pricingFixtureUrl = new URL("./fixtures/commandcode-pricing.json", import.meta.url)
|
||||
const pricingFixture = JSON.parse(await readFile(pricingFixtureUrl, "utf-8")) as PricingSnapshot
|
||||
const freeModels = new Set(["poolside/laguna-s-2.1-free", "stealth/ox-alpha"])
|
||||
const freeModels = new Set([
|
||||
"poolside/laguna-s-2.1-free",
|
||||
"minimax/minimax-m3-free",
|
||||
"minimax/minimax-m2.7-free",
|
||||
])
|
||||
|
||||
function assertCost(
|
||||
modelId: string,
|
||||
@@ -50,7 +54,7 @@ function assertCost(
|
||||
describe("MODEL_COSTS pricing overlay", () => {
|
||||
it("covers the current Command Code model catalog snapshot", () => {
|
||||
assert.equal(fixture.source, "https://api.commandcode.ai/provider/v1/models")
|
||||
assert.match(fixture.fetchedAt, /^2026-08-25T/)
|
||||
assert.match(fixture.fetchedAt, /^2026-08-28T/)
|
||||
|
||||
const catalogIds = [...fixture.modelIds].sort()
|
||||
const pricedIds = Object.keys(MODEL_COSTS).sort()
|
||||
@@ -156,6 +160,12 @@ describe("MODEL_COSTS pricing overlay", () => {
|
||||
cacheRead: 0.03,
|
||||
cacheWrite: 0,
|
||||
})
|
||||
assertCost("tencent/hy4-preview", {
|
||||
input: 0.834,
|
||||
output: 2.501,
|
||||
cacheRead: 0.042,
|
||||
cacheWrite: 0,
|
||||
})
|
||||
assertCost("google/gemini-3.7-flash", {
|
||||
input: 0.75,
|
||||
output: 3.75,
|
||||
@@ -208,7 +218,7 @@ describe("MODEL_COSTS pricing overlay", () => {
|
||||
|
||||
it("tracks pricing provenance", () => {
|
||||
assert.equal(PRICING_SOURCE_URL, "https://commandcode.ai/docs/resources/pricing-limits")
|
||||
assert.equal(PRICING_LAST_VERIFIED, "2026-08-25")
|
||||
assert.equal(PRICING_LAST_VERIFIED, "2026-08-28")
|
||||
})
|
||||
|
||||
it("fails once temporary pricing needs review", () => {
|
||||
|
||||
Reference in New Issue
Block a user