fix(models): align Command Code catalog metadata
This commit is contained in:
+9
-3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"fetchedAt": "2026-08-22T21:19:37.782Z",
|
||||
"fetchedAt": "2026-08-25T13:32:11.631Z",
|
||||
"source": "https://api.commandcode.ai/provider/v1/models",
|
||||
"modelIds": [
|
||||
"claude-sonnet-5",
|
||||
@@ -18,6 +18,7 @@
|
||||
"gpt-5.4-mini",
|
||||
"deepseek/deepseek-v4-pro",
|
||||
"deepseek/deepseek-v4-flash",
|
||||
"deepseek/deepseek-v4-flash-vision-exp",
|
||||
"moonshotai/Kimi-K3",
|
||||
"moonshotai/Kimi-K2.7-Code",
|
||||
"moonshotai/Kimi-K2.7-Code-Highspeed",
|
||||
@@ -34,6 +35,7 @@
|
||||
"xiaomi/mimo-v2.5-pro",
|
||||
"xiaomi/mimo-v2.5",
|
||||
"Qwen/Qwen3.8-Max",
|
||||
"Qwen/Qwen3.8-27B",
|
||||
"Qwen/Qwen3.7-Max",
|
||||
"Qwen/Qwen3.7-Plus",
|
||||
"Qwen/Qwen3.7-Flash",
|
||||
@@ -42,6 +44,7 @@
|
||||
"stepfun/Step-3.7-Flash",
|
||||
"stepfun/Step-3.5-Flash",
|
||||
"tencent/hy3-paid",
|
||||
"google/gemini-3.7-flash",
|
||||
"google/gemini-3.6-flash",
|
||||
"google/gemini-3.5-flash",
|
||||
"google/gemini-3.5-flash-lite",
|
||||
@@ -50,9 +53,12 @@
|
||||
"nvidia/nemotron-3-ultra-550b-a55b",
|
||||
"thinkingmachines/inkling",
|
||||
"thinkingmachines/inkling-small",
|
||||
"stealth/ox-alpha",
|
||||
"poolside/laguna-s-2.1-free",
|
||||
"inclusionai/ling-3.0-flash-free",
|
||||
"meta/muse-spark-1.1",
|
||||
"xai/grok-4.5"
|
||||
"meta/muse-spark-1.2",
|
||||
"meta/muse-spark-1.2-contributor",
|
||||
"xai/grok-4.5",
|
||||
"xai/grok-4.6"
|
||||
]
|
||||
}
|
||||
|
||||
+19
-12
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"verifiedAt": "2026-08-22",
|
||||
"verifiedAt": "2026-08-25",
|
||||
"source": "https://commandcode.ai/docs/resources/pricing-limits",
|
||||
"tierPolicy": "Use request-wide input tiers; the highest threshold exceeded by input plus cache tokens applies to the full request.",
|
||||
"tiers": {
|
||||
@@ -7,12 +7,13 @@
|
||||
"Qwen/Qwen3.7-Flash": [
|
||||
[32000, 0.1, 0.4, 0.02, 0.125],
|
||||
[256000, 0.2, 0.8, 0.04, 0.25]
|
||||
]
|
||||
],
|
||||
"xai/grok-4.6": [[200000, 4, 12, 1, 0]]
|
||||
},
|
||||
"costs": {
|
||||
"poolside/laguna-s-2.1-free": [0, 0, 0, 0],
|
||||
"inclusionai/ling-3.0-flash-free": [0, 0, 0, 0],
|
||||
"tencent/hy3-paid": [0.14, 0.58, 0.035, 0],
|
||||
"deepseek/deepseek-v4-pro": [0.66, 1.98, 0.022, 0],
|
||||
"deepseek/deepseek-v4-flash": [0.22, 0.66, 0.007, 0],
|
||||
"deepseek/deepseek-v4-flash-vision-exp": [0.22, 0.66, 0.007, 0],
|
||||
"moonshotai/Kimi-K3": [3, 15, 0.3, 0],
|
||||
"moonshotai/Kimi-K2.7-Code": [0.95, 4, 0.19, 0],
|
||||
"moonshotai/Kimi-K2.7-Code-Highspeed": [1.9, 8, 0.38, 0],
|
||||
@@ -26,9 +27,10 @@
|
||||
"MiniMaxAI/MiniMax-M3": [0.3, 1.2, 0.06, 0],
|
||||
"MiniMaxAI/MiniMax-M2.7": [0.3, 1.2, 0.06, 0],
|
||||
"MiniMaxAI/MiniMax-M2.5": [0.3, 1.2, 0.03, 0],
|
||||
"deepseek/deepseek-v4-pro": [0.66, 1.98, 0.022, 0],
|
||||
"deepseek/deepseek-v4-flash": [0.22, 0.66, 0.007, 0],
|
||||
"xiaomi/mimo-v2.5-pro": [0.435, 0.87, 0.0036, 0],
|
||||
"xiaomi/mimo-v2.5": [0.14, 0.28, 0.0028, 0],
|
||||
"Qwen/Qwen3.8-Max": [2, 6, 0.25, 2.5],
|
||||
"Qwen/Qwen3.8-27B": [0.4, 3, 0.04, 0],
|
||||
"Qwen/Qwen3.7-Max": [2.5, 7.5, 0.5, 3.13],
|
||||
"Qwen/Qwen3.7-Plus": [0.4, 1.6, 0.08, 0.5],
|
||||
"Qwen/Qwen3.7-Flash": [0.03, 0.13, 0.006, 0.038],
|
||||
@@ -36,13 +38,12 @@
|
||||
"Qwen/Qwen3.6-Plus": [0.5, 3, 0.1, 0],
|
||||
"stepfun/Step-3.7-Flash": [0.2, 1.15, 0.04, 0],
|
||||
"stepfun/Step-3.5-Flash": [0.1, 0.3, 0.02, 0],
|
||||
"xiaomi/mimo-v2.5-pro": [0.435, 0.87, 0.0036, 0],
|
||||
"xiaomi/mimo-v2.5": [0.14, 0.28, 0.0028, 0],
|
||||
"tencent/hy3-paid": [0.14, 0.58, 0.035, 0],
|
||||
"nvidia/nemotron-3-ultra-550b-a55b": [0.6, 2.4, 0.12, 0],
|
||||
"sakana/fugu-ultra": [5, 30, 0.5, 0],
|
||||
"thinkingmachines/inkling": [1, 4.05, 0.17, 0],
|
||||
"thinkingmachines/inkling-small": [0.5, 1.2, 0.1, 0],
|
||||
"meta/muse-spark-1.1": [1.25, 4.25, 0.15, 0],
|
||||
"poolside/laguna-s-2.1-free": [0, 0, 0, 0],
|
||||
"stealth/ox-alpha": [0, 0, 0, 0],
|
||||
"claude-sonnet-5": [2, 10, 0.2, 2.5],
|
||||
"claude-sonnet-4-6": [3, 15, 0.3, 3.75],
|
||||
"claude-fable-5": [10, 50, 1, 12.5],
|
||||
@@ -57,10 +58,16 @@
|
||||
"gpt-5.4": [2.5, 15, 0.25, 0],
|
||||
"gpt-5.3-codex": [2, 8, 0.5, 0],
|
||||
"gpt-5.4-mini": [0.75, 4.5, 0.075, 0],
|
||||
"google/gemini-3.7-flash": [0.75, 3.75, 0.075, 0.04167],
|
||||
"google/gemini-3.6-flash": [1.5, 7.5, 0.15, 0],
|
||||
"google/gemini-3.5-flash": [1.5, 9, 0.15, 0],
|
||||
"google/gemini-3.5-flash-lite": [0.3, 2.5, 0.03, 0],
|
||||
"google/gemini-3.1-flash-lite": [0.25, 1.5, 0.03, 0],
|
||||
"xai/grok-4.5": [2, 6, 0.5, 0]
|
||||
"sakana/fugu-ultra": [5, 30, 0.5, 0],
|
||||
"meta/muse-spark-1.1": [1.25, 4.25, 0.15, 0],
|
||||
"meta/muse-spark-1.2": [1.25, 4.25, 0.15, 0],
|
||||
"meta/muse-spark-1.2-contributor": [0.1, 0.2, 0.002, 0],
|
||||
"xai/grok-4.5": [2, 6, 0.5, 0],
|
||||
"xai/grok-4.6": [2, 6, 0.5, 0]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
commandCodeModelMetadataFromContents,
|
||||
diffModelMetadata,
|
||||
hasModelMetadataDiff,
|
||||
parseBundleModelCapabilities,
|
||||
parseKnownTextOnlyModelIds,
|
||||
parseModelsReference,
|
||||
parsePackageVersion,
|
||||
@@ -21,7 +22,7 @@ const MODELS_REFERENCE = `
|
||||
`
|
||||
|
||||
const CLI_BUNDLE =
|
||||
'const catalog=new Set(["text-model"]),__name(isKnownTextOnlyModel,"isKnownTextOnlyModel")'
|
||||
'const V={id:"vision-model",inputModalities:["text","image"],reasoning:!0,reasoningEfforts:["low","high"],maxOutputTokens:32768},T={id:"text-model",inputModalities:["text"]},catalog=new Set(["text-model"]),__name(isKnownTextOnlyModel,"isKnownTextOnlyModel")'
|
||||
|
||||
describe("Command Code model metadata checker", () => {
|
||||
it("parses model ids and reasoning efforts from the generated reference", () => {
|
||||
@@ -42,29 +43,39 @@ describe("Command Code model metadata checker", () => {
|
||||
assert.throws(() => parsePackageVersion("latest"), /one semantic version/)
|
||||
})
|
||||
|
||||
it("derives image support by excluding known text-only models", () => {
|
||||
it("derives image, reasoning, effort, and output-limit metadata", () => {
|
||||
assert.deepEqual(parseBundleModelCapabilities(CLI_BUNDLE, ["text-model", "vision-model"]), {
|
||||
reasoningModelIds: ["vision-model"],
|
||||
maxOutputTokens: { "vision-model": 32_768 },
|
||||
})
|
||||
assert.deepEqual(commandCodeModelMetadataFromContents(MODELS_REFERENCE, CLI_BUNDLE), {
|
||||
imageModelIds: ["vision-model"],
|
||||
reasoningModelIds: ["vision-model"],
|
||||
reasoningEfforts: { "vision-model": ["low", "high"] },
|
||||
maxOutputTokens: { "vision-model": 32_768 },
|
||||
})
|
||||
})
|
||||
|
||||
it("reports additions, removals, and changed reasoning efforts", () => {
|
||||
const current: CommandCodeModelMetadata = {
|
||||
imageModelIds: ["removed-image", "stable-image"],
|
||||
reasoningModelIds: ["removed-reasoning", "stable-reasoning"],
|
||||
reasoningEfforts: {
|
||||
"changed-reasoning": ["low"],
|
||||
"removed-reasoning": ["high"],
|
||||
"stable-reasoning": ["low", "high"],
|
||||
"changed-effort": ["low"],
|
||||
"removed-effort": ["high"],
|
||||
"stable-effort": ["low", "high"],
|
||||
},
|
||||
maxOutputTokens: { "changed-output": 1, "removed-output": 2, "stable-output": 3 },
|
||||
}
|
||||
const upstream: CommandCodeModelMetadata = {
|
||||
imageModelIds: ["added-image", "stable-image"],
|
||||
reasoningModelIds: ["added-reasoning", "stable-reasoning"],
|
||||
reasoningEfforts: {
|
||||
"added-reasoning": ["max"],
|
||||
"changed-reasoning": ["low", "high"],
|
||||
"stable-reasoning": ["low", "high"],
|
||||
"added-effort": ["max"],
|
||||
"changed-effort": ["low", "high"],
|
||||
"stable-effort": ["low", "high"],
|
||||
},
|
||||
maxOutputTokens: { "added-output": 4, "changed-output": 5, "stable-output": 3 },
|
||||
}
|
||||
|
||||
const diff = diffModelMetadata(current, upstream)
|
||||
@@ -75,7 +86,12 @@ describe("Command Code model metadata checker", () => {
|
||||
removedImageModelIds: ["removed-image"],
|
||||
addedReasoningModelIds: ["added-reasoning"],
|
||||
removedReasoningModelIds: ["removed-reasoning"],
|
||||
changedReasoningModelIds: ["changed-reasoning"],
|
||||
addedEffortModelIds: ["added-effort"],
|
||||
removedEffortModelIds: ["removed-effort"],
|
||||
changedEffortModelIds: ["changed-effort"],
|
||||
addedMaxOutputModelIds: ["added-output"],
|
||||
removedMaxOutputModelIds: ["removed-output"],
|
||||
changedMaxOutputModelIds: ["changed-output"],
|
||||
})
|
||||
assert.equal(hasModelMetadataDiff(diff), true)
|
||||
})
|
||||
@@ -83,7 +99,9 @@ describe("Command Code model metadata checker", () => {
|
||||
it("reports CLI version drift even when model metadata is unchanged", () => {
|
||||
const metadata: CommandCodeModelMetadata = {
|
||||
imageModelIds: ["vision-model"],
|
||||
reasoningModelIds: ["vision-model"],
|
||||
reasoningEfforts: { "vision-model": ["low"] },
|
||||
maxOutputTokens: { "vision-model": 32_768 },
|
||||
}
|
||||
|
||||
const diff = diffModelMetadata(metadata, metadata, "1.32.2", "1.33.0")
|
||||
@@ -96,10 +114,12 @@ describe("Command Code model metadata checker", () => {
|
||||
assert.equal(
|
||||
renderCommandCodeCatalog("1.33.0", {
|
||||
imageModelIds: ["b-model", "a-model"],
|
||||
reasoningModelIds: ["c-model", "a-model"],
|
||||
reasoningEfforts: {
|
||||
"b-model": ["high", "max"],
|
||||
"a-model": ["low"],
|
||||
},
|
||||
maxOutputTokens: { "b-model": 32_768 },
|
||||
}),
|
||||
`export const COMMAND_CODE_CLI_VERSION = "1.33.0"
|
||||
|
||||
@@ -115,10 +135,19 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
|
||||
"b-model": ["text", "image"],
|
||||
}
|
||||
|
||||
export const MODEL_REASONING: Readonly<Record<string, true>> = {
|
||||
"a-model": true,
|
||||
"c-model": true,
|
||||
}
|
||||
|
||||
export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasoningEffort[]>> = {
|
||||
"a-model": ["low"],
|
||||
"b-model": ["high", "max"],
|
||||
}
|
||||
|
||||
export const MODEL_MAX_OUTPUT_TOKENS: Readonly<Record<string, number>> = {
|
||||
"b-model": 32_768,
|
||||
}
|
||||
`,
|
||||
)
|
||||
assert.equal(
|
||||
|
||||
+44
-3
@@ -16,6 +16,8 @@ import {
|
||||
loadCommandCodeModels,
|
||||
MODEL_EFFORTS,
|
||||
MODEL_INPUT_MODALITIES,
|
||||
MODEL_MAX_OUTPUT_TOKENS,
|
||||
MODEL_REASONING,
|
||||
modelSupportsImageInput,
|
||||
thinkingLevelMapForEfforts,
|
||||
thinkingMetadataForModel,
|
||||
@@ -41,7 +43,7 @@ const EXPECTED_MODELS: readonly CommandCodeModel[] = [
|
||||
id: "Qwen/Qwen3.7-Max",
|
||||
name: "Qwen 3.7 Max (CC)",
|
||||
api: "openai-completions",
|
||||
reasoning: false,
|
||||
reasoning: true,
|
||||
contextWindow: 1_000_000,
|
||||
maxTokens: 65_536,
|
||||
},
|
||||
@@ -124,17 +126,55 @@ describe("commandCodeModelsFromApiResponse()", () => {
|
||||
}
|
||||
})
|
||||
|
||||
it("marks only known reasoning models as reasoning-capable", () => {
|
||||
it("tracks reasoning independently from selectable effort levels", () => {
|
||||
const models = commandCodeModelsFromApiResponse({
|
||||
object: "list",
|
||||
data: [
|
||||
{ ...API_RESPONSE.data[0], id: "deepseek/deepseek-v4-flash" },
|
||||
{ ...API_RESPONSE.data[0], id: "moonshotai/Kimi-K3" },
|
||||
{ ...API_RESPONSE.data[0], id: "new-model-without-metadata" },
|
||||
],
|
||||
})
|
||||
|
||||
assert.equal(models[0]?.reasoning, true)
|
||||
assert.equal(models[1]?.reasoning, false)
|
||||
assert.equal(models[1]?.reasoning, true)
|
||||
assert.deepEqual(thinkingMetadataForModel("moonshotai/Kimi-K3"), {
|
||||
thinkingLevelMap: {
|
||||
minimal: null,
|
||||
low: null,
|
||||
medium: null,
|
||||
high: null,
|
||||
xhigh: null,
|
||||
max: null,
|
||||
},
|
||||
})
|
||||
assert.equal(models[2]?.reasoning, false)
|
||||
assert.equal(Object.keys(MODEL_REASONING).length, 48)
|
||||
})
|
||||
|
||||
it("uses model-specific output limits from the CLI catalog", () => {
|
||||
const models = commandCodeModelsFromApiResponse({
|
||||
object: "list",
|
||||
data: [
|
||||
{ ...API_RESPONSE.data[0], id: "Qwen/Qwen3.8-27B", context_length: 262_144 },
|
||||
{ ...API_RESPONSE.data[0], id: "stealth/ox-alpha", context_length: 1_048_576 },
|
||||
{
|
||||
...API_RESPONSE.data[0],
|
||||
id: "poolside/laguna-s-2.1-free",
|
||||
context_length: 256_000,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
assert.deepEqual(
|
||||
models.map(({ id, maxTokens }) => ({ id, maxTokens })),
|
||||
[
|
||||
{ id: "Qwen/Qwen3.8-27B", maxTokens: 32_768 },
|
||||
{ id: "stealth/ox-alpha", maxTokens: 131_072 },
|
||||
{ id: "poolside/laguna-s-2.1-free", maxTokens: 32_768 },
|
||||
],
|
||||
)
|
||||
assert.equal(Object.keys(MODEL_MAX_OUTPUT_TOKENS).length, 3)
|
||||
})
|
||||
|
||||
it(`uses the command-code@${COMMAND_CODE_CLI_VERSION} reasoning effort catalog`, () => {
|
||||
@@ -151,6 +191,7 @@ describe("commandCodeModelsFromApiResponse()", () => {
|
||||
for (const [modelId, efforts] of Object.entries(MODEL_EFFORTS)) {
|
||||
const metadata = thinkingMetadataForModel(modelId)
|
||||
assert.ok(metadata, `${modelId} should have reasoning metadata`)
|
||||
assert.ok(metadata.thinking)
|
||||
assert.equal(metadata.thinking.mode, "effort")
|
||||
assert.deepEqual(metadata.thinking.efforts, efforts)
|
||||
assert.deepEqual(
|
||||
|
||||
+30
-3
@@ -27,7 +27,7 @@ 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", "inclusionai/ling-3.0-flash-free"])
|
||||
const freeModels = new Set(["poolside/laguna-s-2.1-free", "stealth/ox-alpha"])
|
||||
|
||||
function assertCost(
|
||||
modelId: string,
|
||||
@@ -50,7 +50,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-22T/)
|
||||
assert.match(fixture.fetchedAt, /^2026-08-25T/)
|
||||
|
||||
const catalogIds = [...fixture.modelIds].sort()
|
||||
const pricedIds = Object.keys(MODEL_COSTS).sort()
|
||||
@@ -138,6 +138,24 @@ describe("MODEL_COSTS pricing overlay", () => {
|
||||
cacheRead: 0.03,
|
||||
cacheWrite: 0,
|
||||
})
|
||||
assertCost("Qwen/Qwen3.8-27B", {
|
||||
input: 0.4,
|
||||
output: 3,
|
||||
cacheRead: 0.04,
|
||||
cacheWrite: 0,
|
||||
})
|
||||
assertCost("google/gemini-3.7-flash", {
|
||||
input: 0.75,
|
||||
output: 3.75,
|
||||
cacheRead: 0.075,
|
||||
cacheWrite: 0.04167,
|
||||
})
|
||||
assertCost("meta/muse-spark-1.2-contributor", {
|
||||
input: 0.1,
|
||||
output: 0.2,
|
||||
cacheRead: 0.002,
|
||||
cacheWrite: 0,
|
||||
})
|
||||
})
|
||||
|
||||
it("uses the documented base rates for context-dependent models", () => {
|
||||
@@ -165,11 +183,20 @@ describe("MODEL_COSTS pricing overlay", () => {
|
||||
cacheRead: 0.02,
|
||||
cacheWrite: 0.25,
|
||||
})
|
||||
assert.deepEqual(MODEL_COSTS["xai/grok-4.6"]?.tiers, [
|
||||
{
|
||||
inputTokensAbove: 200_000,
|
||||
input: 4,
|
||||
output: 12,
|
||||
cacheRead: 1,
|
||||
cacheWrite: 0,
|
||||
},
|
||||
])
|
||||
})
|
||||
|
||||
it("tracks pricing provenance", () => {
|
||||
assert.equal(PRICING_SOURCE_URL, "https://commandcode.ai/docs/resources/pricing-limits")
|
||||
assert.equal(PRICING_LAST_VERIFIED, "2026-08-22")
|
||||
assert.equal(PRICING_LAST_VERIFIED, "2026-08-25")
|
||||
})
|
||||
|
||||
it("fails once temporary pricing needs review", () => {
|
||||
|
||||
Reference in New Issue
Block a user