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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Refresh the Command Code CLI catalog to `1.56.0`, adding image input, reasoning effort levels, a 131,072-token output limit, and reviewed display pricing for `Qwen/Qwen3.8-Omni-Flash`.

- Normalize nullable type arrays for `google/gemini-*` tools on the generate transport to avoid the gateway's `any_of` validation error (#99), preserving required fields, literal data, and schemas for unrelated models.

## 0.7.0 - 2026-09-15
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,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.54.0`; 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.56.0`; 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
8 changes: 6 additions & 2 deletions src/commandcode-catalog.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export const COMMAND_CODE_CLI_VERSION = "1.54.0"
export const COMMAND_CODE_CLI_VERSION = "1.56.0"

export type CommandCodeInputType = "text" | "image"
export type CommandCodeReasoningEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "max"

/**
* Generated from command-code@1.54.0 by `npm run sync:commandcode-catalog`.
* Generated from command-code@1.56.0 by `npm run sync:commandcode-catalog`.
* Do not edit manually.
*/
export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCodeInputType[]>> = {
Expand Down Expand Up @@ -50,6 +50,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
"Qwen/Qwen3.8-Flash": ["text", "image"],
"Qwen/Qwen3.8-Max": ["text", "image"],
"Qwen/Qwen3.8-Max-0902": ["text", "image"],
"Qwen/Qwen3.8-Omni-Flash": ["text", "image"],
"sakana/fugu-ultra": ["text", "image"],
"stepfun/Step-3.7-Flash": ["text", "image"],
"thinkingmachines/inkling": ["text", "image"],
Expand Down Expand Up @@ -109,6 +110,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
"Qwen/Qwen3.8-Flash": true,
"Qwen/Qwen3.8-Max": true,
"Qwen/Qwen3.8-Max-0902": true,
"Qwen/Qwen3.8-Omni-Flash": true,
"sakana/fugu-ultra": true,
"stepfun/Step-3.5-Flash": true,
"stepfun/Step-3.7-Flash": true,
Expand Down Expand Up @@ -161,6 +163,7 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
"Qwen/Qwen3.8-Flash": ["low", "medium", "xhigh"],
"Qwen/Qwen3.8-Max": ["low", "medium", "xhigh"],
"Qwen/Qwen3.8-Max-0902": ["low", "medium", "xhigh"],
"Qwen/Qwen3.8-Omni-Flash": ["low", "medium", "xhigh"],
"sakana/fugu-ultra": ["high", "xhigh"],
"tencent/hy4-preview": ["low", "medium", "high"],
"xai/grok-4.5": ["low", "medium", "high"],
Expand All @@ -174,5 +177,6 @@ export const MODEL_MAX_OUTPUT_TOKENS: Readonly<Record<string, number>> = {
"inclusionai/ling-3.0-flash-sante:free": 32_768,
"poolside/laguna-s-2.1-free": 32_768,
"Qwen/Qwen3.8-27B": 32_768,
"Qwen/Qwen3.8-Omni-Flash": 131_072,
"z-ai/glm-5.3-flash": 131_072,
}
3 changes: 2 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-09-15"
export const PRICING_LAST_VERIFIED = "2026-09-18"

export const ZERO_MODEL_COST: CommandCodeModelCost = {
input: 0,
Expand Down Expand Up @@ -101,6 +101,7 @@ export const MODEL_COSTS: Readonly<Record<string, CommandCodeModelCost>> = {
"Qwen/Qwen3.8-Max-0902": { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 0 },
"Qwen/Qwen3.8-27B": { input: 0.4, output: 3, cacheRead: 0.04, cacheWrite: 0 },
"Qwen/Qwen3.8-Flash": { input: 0.16, output: 0.47, cacheRead: 0.016, cacheWrite: 0 },
"Qwen/Qwen3.8-Omni-Flash": { input: 0.15, output: 0.47, cacheRead: 0.016, cacheWrite: 0 },
"Qwen/Qwen3.7-Max": { input: 2.5, output: 7.5, cacheRead: 0.5, cacheWrite: 3.13 },
"Qwen/Qwen3.7-Plus": {
input: 0.4,
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-09-15T00:04:32.535Z",
"fetchedAt": "2026-09-18T08:21:28.827Z",
"source": "https://api.commandcode.ai/provider/v1/models",
"modelIds": [
"claude-sonnet-5",
Expand Down Expand Up @@ -38,6 +38,7 @@
"MiniMaxAI/MiniMax-M2.5",
"xiaomi/mimo-v2.5-pro",
"xiaomi/mimo-v2.5",
"Qwen/Qwen3.8-Omni-Flash",
"Qwen/Qwen3.8-Max-0902",
"Qwen/Qwen3.8-Max",
"Qwen/Qwen3.8-27B",
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-09-15",
"verifiedAt": "2026-09-18",
"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 Down Expand Up @@ -39,6 +39,7 @@
"Qwen/Qwen3.8-Max-0902": [2, 6, 0.25, 0],
"Qwen/Qwen3.8-27B": [0.4, 3, 0.04, 0],
"Qwen/Qwen3.8-Flash": [0.16, 0.47, 0.016, 0],
"Qwen/Qwen3.8-Omni-Flash": [0.15, 0.47, 0.016, 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],
Expand Down
13 changes: 13 additions & 0 deletions tests/test-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ describe("commandCodeModelsFromApiResponse()", () => {
assert.equal(modelSupportsImageInput("unknown-new-model"), false)
})

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"])
assert.equal(MODEL_REASONING[id], true)
assert.deepEqual(thinkingMetadataForModel(id)?.thinking?.efforts, ["low", "medium", "xhigh"])
const models = commandCodeModelsFromApiResponse({
object: "list",
data: [{ ...API_RESPONSE.data[0], id }],
})
assert.equal(models[0]?.reasoning, true)
assert.equal(models[0]?.maxTokens, 131_072)
})

it("prefers host-resolved input modalities over the catalog snapshot", () => {
// A model published upstream after the pinned CLI release is absent from the
// generated catalog, so the host's resolved modalities must win.
Expand Down
10 changes: 8 additions & 2 deletions tests/test-pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,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-09-15T/)
assert.match(fixture.fetchedAt, /^2026-09-18T/)

const catalogIds = [...fixture.modelIds].sort()
const pricedIds = Object.keys(MODEL_COSTS).sort()
Expand Down Expand Up @@ -235,6 +235,12 @@ describe("MODEL_COSTS pricing overlay", () => {
})

it("uses reviewed rates for the September catalog additions", () => {
assertCost("Qwen/Qwen3.8-Omni-Flash", {
input: 0.15,
output: 0.47,
cacheRead: 0.016,
cacheWrite: 0,
})
assertCost("Qwen/Qwen3.8-Max-0902", { input: 2, output: 6, cacheRead: 0.25, cacheWrite: 0 })
assertCost("google/gemini-3.8-flash", {
input: 1.5,
Expand All @@ -259,7 +265,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-09-15")
assert.equal(PRICING_LAST_VERIFIED, "2026-09-18")
})

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