Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Unreleased

- Add reviewed display pricing for the two Provider API additions published after the previous snapshot: `Qwen/Qwen4-Max` at $1.50 input / $4.50 output / $0.075 cache read / $1.875 cache write per million tokens, and `tencent/hy4-flash` at $0.07 / $0.281 / $0.003 with no cache-write charge. Both values come from the official pricing page rows `qwen-4-max` and `tencent/hy4-flash`, publish no long-context tier, and carry no promotion. No model left the API in this window. Refresh the 100-model API and pricing snapshots to 2026-11-16; the pricing check reports no drift. Static capability metadata stays at `command-code@1.89.1`, which does not list either model, so both remain text-only without reasoning or effort flags until upstream ships them.
- Add reviewed display pricing for the two Provider API additions: `Qwen/Qwen4-Max` at $1.50 input / $4.50 output / $0.075 cache read / $1.875 cache write per million tokens, and `tencent/hy4-flash` at $0.07 / $0.281 / $0.003 with no cache-write charge. Both values come from the official pricing page rows `qwen-4-max` and `tencent/hy4-flash`, publish no long-context tier, and carry no promotion. ([#220](https://github.com/patlux/pi-commandcode-provider/pull/220))
- Refresh the capability snapshot to `command-code@1.89.2`: advertise image input, reasoning and selectable efforts for `Qwen/Qwen4-Max` (`off`, `low`, `high`, `xhigh`) and `tencent/hy4-flash` (`off`, `high`). Add text-only reasoning for `recursive/flint-v1.0:free`, with no selectable effort metadata. All three retain the default 65,536-token output limit, capped by context size, and use Responses when advertised by the API. Add Flint's reviewed zero display prices while its undated free tier lasts, and refresh the 101-model API and pricing snapshots to 2026-11-17. No model left the API; existing prices, endpoint routing rules and model-specific output limits are unchanged.

## 0.8.4 - 2026-11-15

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ The following environment variables are intended for tests, local mocks, and com

## Image input

The provider advertises image input only for models marked with the `image` input modality in the official Command Code CLI model catalog. The capability snapshot currently follows `command-code@1.89.1`; unknown models default to text-only until their upstream metadata is reviewed. A daily GitHub Actions job synchronizes the CLI version, image capabilities, reasoning flags, reasoning efforts, and model-specific output limits with the latest published CLI package, also dropping manual effort overrides that upstream has published itself, and opens or updates a reviewable pull request when they change. Pricing remains manually reviewed because temporary promotions and long-context tiers require explicit review.
The provider advertises image input only for models marked with the `image` input modality in the official Command Code CLI model catalog. The capability snapshot currently follows `command-code@1.89.2`; unknown models default to text-only until their upstream metadata is reviewed. A daily GitHub Actions job synchronizes the CLI version, image capabilities, reasoning flags, reasoning efforts, and model-specific output limits with the latest published CLI package, also dropping manual effort overrides that upstream has published itself, and opens or updates a reviewable pull request when they change. Pricing remains manually reviewed because temporary promotions and long-context tiers require explicit review.

For vision-capable models, Pi's native provider adapters forward image blocks from user messages and tool results using the documented OpenAI or Anthropic message schema. Unknown and text-only models remain marked text-only in Pi.

Expand Down
11 changes: 9 additions & 2 deletions src/commandcode-catalog.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const COMMAND_CODE_CLI_VERSION = "1.89.1"
export const COMMAND_CODE_CLI_VERSION = "1.89.2"

export type CommandCodeInputType = "text" | "image"
export type CommandCodeReasoningEffort =
Expand All @@ -11,7 +11,7 @@ export type CommandCodeReasoningEffort =
| "max"

/**
* Generated from command-code@1.89.1 by `npm run sync:commandcode-catalog`.
* Generated from command-code@1.89.2 by `npm run sync:commandcode-catalog`.
* Do not edit manually.
*/
export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCodeInputType[]>> = {
Expand Down Expand Up @@ -79,9 +79,11 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
"Qwen/Qwen3.8-Max-0902": ["text", "image"],
"Qwen/Qwen3.8-Max-Prime": ["text", "image"],
"Qwen/Qwen3.8-Omni-Flash": ["text", "image"],
"Qwen/Qwen4-Max": ["text", "image"],
"sakana/fugu-ultra": ["text", "image"],
"stepfun/Step-3.7-Flash": ["text", "image"],
"stepfun/Step-5-Preview": ["text", "image"],
"tencent/hy4-flash": ["text", "image"],
"thinkingmachines/inkling": ["text", "image"],
"thinkingmachines/inkling-2-small:free": ["text", "image"],
"thinkingmachines/inkling-small": ["text", "image"],
Expand Down Expand Up @@ -166,12 +168,15 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
"Qwen/Qwen3.8-Max-0902": true,
"Qwen/Qwen3.8-Max-Prime": true,
"Qwen/Qwen3.8-Omni-Flash": true,
"Qwen/Qwen4-Max": true,
"recursive/flint-v1.0:free": true,
"sakana/fugu-ultra": true,
"stealth/glyph-cluster:free": true,
"stepfun/Step-3.5-Flash": true,
"stepfun/Step-3.7-Flash": true,
"stepfun/Step-5-Preview": true,
"tencent/hy3-paid": true,
"tencent/hy4-flash": true,
"tencent/hy4-preview": true,
"thinkingmachines/inkling": true,
"thinkingmachines/inkling-2-small:free": true,
Expand Down Expand Up @@ -246,9 +251,11 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
"Qwen/Qwen3.8-Max-0902": ["low", "medium", "xhigh"],
"Qwen/Qwen3.8-Max-Prime": ["low", "medium", "xhigh"],
"Qwen/Qwen3.8-Omni-Flash": ["low", "medium", "xhigh"],
"Qwen/Qwen4-Max": ["off", "low", "high", "xhigh"],
"sakana/fugu-ultra": ["high", "xhigh"],
"stealth/glyph-cluster:free": ["low", "medium", "high", "xhigh"],
"stepfun/Step-5-Preview": ["low", "medium", "high"],
"tencent/hy4-flash": ["off", "high"],
"tencent/hy4-preview": ["low", "medium", "high"],
"thinkingmachines/inkling-2-small:free": ["low", "medium", "high", "max"],
"xai/grok-4.5": ["low", "medium", "high"],
Expand Down
4 changes: 3 additions & 1 deletion src/pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface TemporaryPricing {
}

export const PRICING_SOURCE_URL = "https://commandcode.ai/docs/resources/pricing-limits"
export const PRICING_LAST_VERIFIED = "2026-11-16"
export const PRICING_LAST_VERIFIED = "2026-11-17"

export const ZERO_MODEL_COST: CommandCodeModelCost = {
input: 0,
Expand All @@ -39,6 +39,8 @@ export const ZERO_MODEL_COST: CommandCodeModelCost = {
*/
export const MODEL_COSTS: Readonly<Record<string, CommandCodeModelCost>> = {
// Free models
// Free while the free tier lasts; no fixed expiry is published.
"recursive/flint-v1.0:free": { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
// Free while the stealth preview lasts; no fixed expiry is published.
"stealth/glyph-cluster:free": { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
// Free while the free tier lasts; no fixed expiry is published.
Expand Down
3 changes: 2 additions & 1 deletion tests/fixtures/commandcode-model-ids.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"fetchedAt": "2026-11-16T09:22:58.757Z",
"fetchedAt": "2026-11-17T08:30:20.471Z",
"source": "https://api.commandcode.ai/provider/v1/models",
"modelIds": [
"claude-sonnet-5-5",
Expand Down Expand Up @@ -87,6 +87,7 @@
"thinkingmachines/inkling",
"thinkingmachines/inkling-small",
"thinkingmachines/inkling-2-small:free",
"recursive/flint-v1.0:free",
"stealth/glyph-cluster:free",
"inclusionai/ling-3.1-flash",
"inclusionai/ling-3.1-flash-1019",
Expand Down
3 changes: 2 additions & 1 deletion tests/fixtures/commandcode-pricing.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"verifiedAt": "2026-11-16",
"verifiedAt": "2026-11-17",
"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": {
Expand All @@ -22,6 +22,7 @@
"xai/grok-4.7": [[200000, 4, 12, 1, 0]]
},
"costs": {
"recursive/flint-v1.0:free": [0, 0, 0, 0],
"stealth/glyph-cluster:free": [0, 0, 0, 0],
"thinkingmachines/inkling-2-small:free": [0, 0, 0, 0],
"inclusionai/ling-3.1-flash-1019": [0.3, 0.9, 0.06, 0],
Expand Down
57 changes: 57 additions & 0 deletions tests/test-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,63 @@ describe("commandCodeModelsFromApiResponse()", () => {
}
})

for (const { id, name, contextLength, input, efforts } of [
{
id: "Qwen/Qwen4-Max",
name: "Qwen 4 Max",
contextLength: 1_000_000,
input: ["text", "image"],
efforts: ["off", "low", "high", "xhigh"],
},
{
id: "tencent/hy4-flash",
name: "Tencent Hy4 Flash",
contextLength: 1_024_000,
input: ["text", "image"],
efforts: ["off", "high"],
},
{
id: "recursive/flint-v1.0:free",
name: "Flint",
contextLength: 262_144,
input: ["text"],
efforts: undefined,
},
]) {
it(`advertises the command-code@1.89.2 capabilities and API routing for ${id}`, () => {
assert.deepEqual(inputModalitiesForModel(id), input)
assert.equal(MODEL_REASONING[id], true)
assert.deepEqual(MODEL_EFFORTS[id], efforts)
assert.deepEqual(thinkingMetadataForModel(id)?.thinking?.efforts, efforts)
assert.ok(thinkingMetadataForModel(id), "reasoning metadata must be registered")
assert.equal(MODEL_MAX_OUTPUT_TOKENS[id], undefined, "use the default output limit")
for (const contextWindow of [contextLength, 16_384]) {
const models = commandCodeModelsFromApiResponse({
object: "list",
data: [
{
...API_RESPONSE.data[0],
id,
name,
context_length: contextWindow,
supported_endpoints: ["/chat/completions", "/responses"],
},
],
})
assert.deepEqual(models, [
{
id,
name: `${name} (CC)`,
api: "openai-responses",
reasoning: true,
contextWindow,
maxTokens: Math.min(65_536, contextWindow),
},
])
}
})
}

it("advertises Qwen 3.8 Omni Flash capabilities from the CLI catalog", () => {
const id = "Qwen/Qwen3.8-Omni-Flash"
assert.deepEqual(inputModalitiesForModel(id), ["text", "image"])
Expand Down
9 changes: 9 additions & 0 deletions tests/test-pricing-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,15 @@ describe("pricing rate and context validation", () => {

describe("pricing page id matching", () => {
it("derives page id candidates from API ids and aliases", () => {
assert.deepEqual(pricingPageIdCandidates("Qwen/Qwen4-Max"), ["qwen/qwen4-max", "qwen-4-max"])
assert.deepEqual(pricingPageIdCandidates("tencent/hy4-flash"), [
"tencent/hy4-flash",
"hy4-flash",
])
assert.deepEqual(pricingPageIdCandidates("recursive/flint-v1.0:free"), [
"recursive/flint-v1.0:free",
"flint-v1.0:free",
])
assert.deepEqual(pricingPageIdCandidates("tencent/hy4-preview"), [
"tencent/hy4-preview",
"hy4-preview",
Expand Down
21 changes: 19 additions & 2 deletions tests/test-pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(["stealth/glyph-cluster:free", "thinkingmachines/inkling-2-small:free"])
const freeModels = new Set([
"recursive/flint-v1.0:free",
"stealth/glyph-cluster:free",
"thinkingmachines/inkling-2-small:free",
])

function assertCost(
modelId: string,
Expand Down Expand Up @@ -282,6 +286,19 @@ describe("MODEL_COSTS pricing overlay", () => {
})
})

it("prices Flint as free during its undated free tier", () => {
assertCost("recursive/flint-v1.0:free", {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
})
assert.ok(
!TEMPORARY_PRICING.some((pricing) => pricing.models.includes("recursive/flint-v1.0:free")),
"the source publishes no fixed expiry for this free tier",
)
})

it("prices Inkling 2 Small free as free during its undated free tier", () => {
assertCost("thinkingmachines/inkling-2-small:free", {
input: 0,
Expand Down Expand Up @@ -475,7 +492,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-11-16")
assert.equal(PRICING_LAST_VERIFIED, "2026-11-17")
})

it("fails once temporary pricing needs review", () => {
Expand Down
Loading