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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Refresh capabilities to `command-code@1.93.2`: Gemini 4 Neon and Inkling 2 Mini gain image input, reasoning and selectable efforts. Add Inkling 2 Mini display pricing ($0.075 input / $0.30 output / $0.015 cache read per million tokens, no published cache-write rate) and remove pricing and capabilities for the retired Inkling 2 Small free model. The Provider API still advertises 105 models; existing prices and endpoint routing rules are unchanged.

## 0.8.7 - 2026-11-20

- On Pi, use `/commandcode-zdr on` or `/commandcode-zdr off` to change the zero-data-retention opt-in for the next request and persist it in the agent directory's `settings.json`. Project settings cannot override this global setting. `/commandcode-zdr` shows the effective state, which is also included in status and diagnostics; the quota command uses the current opt-in. `CMD_ZDR=1` and its legacy alias `COMMANDCODE_ZDR=1` still take precedence and remain the only opt-in on Oh My Pi. ZDR stays off by default. ([#227](https://github.com/patlux/pi-commandcode-provider/pull/227))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,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.91.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.93.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
14 changes: 8 additions & 6 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.91.1"
export const COMMAND_CODE_CLI_VERSION = "1.93.2"

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

/**
* Generated from command-code@1.91.1 by `npm run sync:commandcode-catalog`.
* Generated from command-code@1.93.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 @@ -39,6 +39,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
"google/gemini-3.8-flash": ["text", "image"],
"google/gemini-4-argon": ["text", "image"],
"google/gemini-4-carbon": ["text", "image"],
"google/gemini-4-neon": ["text", "image"],
"gpt-5.3-codex": ["text", "image"],
"gpt-5.4": ["text", "image"],
"gpt-5.4-mini": ["text", "image"],
Expand Down Expand Up @@ -88,7 +89,7 @@ export const MODEL_INPUT_MODALITIES: Readonly<Record<string, readonly CommandCod
"tencent/hy4": ["text", "image"],
"tencent/hy4-flash": ["text", "image"],
"thinkingmachines/inkling": ["text", "image"],
"thinkingmachines/inkling-2-small:free": ["text", "image"],
"thinkingmachines/inkling-2-mini": ["text", "image"],
"thinkingmachines/inkling-small": ["text", "image"],
"xai/grok-4.5": ["text", "image"],
"xai/grok-4.6": ["text", "image"],
Expand Down Expand Up @@ -127,6 +128,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
"google/gemini-3.8-flash": true,
"google/gemini-4-argon": true,
"google/gemini-4-carbon": true,
"google/gemini-4-neon": true,
"gpt-5.3-codex": true,
"gpt-5.4": true,
"gpt-5.4-mini": true,
Expand Down Expand Up @@ -185,7 +187,7 @@ export const MODEL_REASONING: Readonly<Record<string, true>> = {
"tencent/hy4-flash": true,
"tencent/hy4-preview": true,
"thinkingmachines/inkling": true,
"thinkingmachines/inkling-2-small:free": true,
"thinkingmachines/inkling-2-mini": true,
"thinkingmachines/inkling-small": true,
"xai/grok-4.5": true,
"xai/grok-4.6": true,
Expand Down Expand Up @@ -223,6 +225,7 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
"google/gemini-3.8-flash": ["low", "medium", "high"],
"google/gemini-4-argon": ["low", "medium", "high"],
"google/gemini-4-carbon": ["low", "medium", "high"],
"google/gemini-4-neon": ["low", "medium", "high", "xhigh"],
"gpt-5.3-codex": ["low", "medium", "high", "xhigh"],
"gpt-5.4": ["low", "medium", "high", "xhigh"],
"gpt-5.4-mini": ["low", "medium", "high"],
Expand Down Expand Up @@ -266,7 +269,7 @@ export const MODEL_EFFORTS: Readonly<Record<string, readonly CommandCodeReasonin
"tencent/hy4": ["low", "medium", "high"],
"tencent/hy4-flash": ["off", "high"],
"tencent/hy4-preview": ["low", "medium", "high"],
"thinkingmachines/inkling-2-small:free": ["low", "medium", "high", "max"],
"thinkingmachines/inkling-2-mini": ["off", "low", "medium", "high", "max"],
"xai/grok-4.5": ["low", "medium", "high"],
"xai/grok-4.6": ["low", "medium", "high", "xhigh"],
"xai/grok-4.7": ["low", "medium", "high", "xhigh"],
Expand All @@ -284,7 +287,6 @@ export const MODEL_MAX_OUTPUT_TOKENS: Readonly<Record<string, number>> = {
"Qwen/Qwen3.8-Max-Prime": 131_072,
"Qwen/Qwen3.8-Omni-Flash": 131_072,
"stealth/glyph-cluster:free": 256_000,
"thinkingmachines/inkling-2-small:free": 131_072,
"z-ai/glm-5.3-flash": 131_072,
"z-ai/glm-5.3-flashx": 131_072,
}
10 changes: 2 additions & 8 deletions 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-20"
export const PRICING_LAST_VERIFIED = "2026-11-23"

export const ZERO_MODEL_COST: CommandCodeModelCost = {
input: 0,
Expand All @@ -43,13 +43,6 @@ export const MODEL_COSTS: Readonly<Record<string, CommandCodeModelCost>> = {
"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.
"thinkingmachines/inkling-2-small:free": {
input: 0,
output: 0,
cacheRead: 0,
cacheWrite: 0,
},

// Open and open-weight models
"inclusionai/ling-3.1-flash-1019": { input: 0.3, output: 0.9, cacheRead: 0.06, cacheWrite: 0 },
Expand Down Expand Up @@ -206,6 +199,7 @@ export const MODEL_COSTS: Readonly<Record<string, CommandCodeModelCost>> = {
cacheWrite: 0,
},
"sakana/fugu-ultra": { input: 5, output: 30, cacheRead: 0.5, cacheWrite: 0 },
"thinkingmachines/inkling-2-mini": { input: 0.075, output: 0.3, cacheRead: 0.015, cacheWrite: 0 },
"thinkingmachines/inkling": { input: 1, output: 4.05, cacheRead: 0.17, cacheWrite: 0 },
"thinkingmachines/inkling-small": {
input: 0.5,
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/commandcode-model-ids.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"fetchedAt": "2026-11-20T08:54:12.058Z",
"fetchedAt": "2026-11-23T18:59:57.466Z",
"source": "https://api.commandcode.ai/provider/v1/models",
"modelIds": [
"claude-sonnet-5-5",
Expand Down Expand Up @@ -86,7 +86,7 @@
"nvidia/nemotron-3.5-super-vl",
"thinkingmachines/inkling",
"thinkingmachines/inkling-small",
"thinkingmachines/inkling-2-small:free",
"thinkingmachines/inkling-2-mini",
"recursive/flint-v1.0:free",
"stealth/glyph-cluster:free",
"inclusionai/ling-3.1-flash",
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/commandcode-pricing.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"verifiedAt": "2026-11-20",
"verifiedAt": "2026-11-23",
"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 @@ -26,7 +26,6 @@
"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],
"ornith/ornith-1.5-122b": [0.16, 0.64, 0.02, 0],
"inclusionai/ling-3.1-flash": [0.3, 0.9, 0.06, 0],
Expand Down Expand Up @@ -81,6 +80,7 @@
"nvidia/nemotron-3.5-super-vl": [0.2, 0.5, 0.04, 0],
"nvidia/nemotron-3-ultra-550b-a55b": [0.6, 2.4, 0.12, 0],
"sakana/fugu-ultra": [5, 30, 0.5, 0],
"thinkingmachines/inkling-2-mini": [0.075, 0.3, 0.015, 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],
Expand Down
20 changes: 15 additions & 5 deletions tests/test-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ describe("commandCodeModelsFromApiResponse()", () => {
})

it("routes each model to the wire its endpoints advertise", () => {
assert.equal(
apiForModelId("thinkingmachines/inkling-2-mini", ["/chat/completions"]),
"openai-completions",
)
assert.equal(
apiForModelId("google/gemini-4-neon", ["/chat/completions", "/responses"]),
"openai-responses",
)
assert.equal(apiForModelId("claude-sonnet-4-6"), "anthropic-messages")
assert.equal(apiForModelId("claude-sonnet-4-6", ["/messages"]), "anthropic-messages")
// Claude never moves off Messages, even if a catalog lists Responses by mistake.
Expand Down Expand Up @@ -174,8 +182,9 @@ describe("commandCodeModelsFromApiResponse()", () => {
const effortsById = {
"claude-fable-5-2": ["low", "medium", "high", "xhigh", "max"],
"google/gemini-4-carbon": ["low", "medium", "high"],
"google/gemini-4-neon": ["low", "medium", "high", "xhigh"],
"meta/muse-ember": ["low", "medium", "high", "xhigh", "max"],
"thinkingmachines/inkling-2-small:free": ["low", "medium", "high", "max"],
"thinkingmachines/inkling-2-mini": ["off", "low", "medium", "high", "max"],
}
for (const [id, efforts] of Object.entries(effortsById)) {
assert.deepEqual(inputModalitiesForModel(id), ["text", "image"], id)
Expand All @@ -185,11 +194,12 @@ describe("commandCodeModelsFromApiResponse()", () => {
})
assert.equal(model?.reasoning, true, id)
assert.deepEqual(thinkingMetadataForModel(id)?.thinking?.efforts, efforts, id)
if (id === "thinkingmachines/inkling-2-small:free") {
assert.equal(model?.maxTokens, 131_072)
}
}
for (const id of ["reflection/beam:free", "stealth/crouton-alpha"]) {
for (const id of [
"reflection/beam:free",
"stealth/crouton-alpha",
"thinkingmachines/inkling-2-small:free",
]) {
assert.equal(MODEL_REASONING[id], undefined, id)
assert.equal(MODEL_EFFORTS[id], undefined, id)
assert.equal(MODEL_MAX_OUTPUT_TOKENS[id], undefined, id)
Expand Down
25 changes: 8 additions & 17 deletions tests/test-pricing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +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([
"recursive/flint-v1.0:free",
"stealth/glyph-cluster:free",
"thinkingmachines/inkling-2-small:free",
])
const freeModels = new Set(["recursive/flint-v1.0:free", "stealth/glyph-cluster:free"])

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

it("prices Inkling 2 Small free as free during its undated free tier", () => {
assertCost("thinkingmachines/inkling-2-small:free", {
input: 0,
output: 0,
cacheRead: 0,
it("uses the official Inkling 2 Mini rates and drops the retired free model", () => {
assertCost("thinkingmachines/inkling-2-mini", {
input: 0.075,
output: 0.3,
cacheRead: 0.015,
cacheWrite: 0,
})
assert.ok(
!TEMPORARY_PRICING.some((pricing) =>
pricing.models.includes("thinkingmachines/inkling-2-small:free"),
),
"the source publishes no fixed expiry for this free tier",
)
assert.equal(MODEL_COSTS["thinkingmachines/inkling-2-small:free"], undefined)
})

it("uses the documented base rates for context-dependent models", () => {
Expand Down Expand Up @@ -492,7 +483,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-20")
assert.equal(PRICING_LAST_VERIFIED, "2026-11-23")
})

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