diff --git a/AGENTS.md b/AGENTS.md index e850830..ea75476 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,6 +35,10 @@ Current honest state: - the stock public build now ships `moonshotai/Kimi-K2.6` as the recommended validated curated default, with installer-managed `limit.output = 8192` for Kilo `7.2.0` compatibility +- the managed GonkaGate provider config now writes the validated + chat-completions catalog, currently Kimi K2.6 plus Qwen3 235B A22B Instruct + 2507 FP8, so Kilo's OpenCode-style `/models` picker can switch between + validated GonkaGate models - Kilo detection now accepts `@kilocode/cli >=7.2.0` without pre-blocking future Kilo releases, while the audited compatibility baseline remains `@kilocode/cli@7.2.0` @@ -131,7 +135,8 @@ These are implementation facts today: intake, managed config writes, rollback, effective-config verification, and orchestration - `src/constants/models.ts` now exposes Kimi K2.6 as the recommended validated - production default with installer-managed `limit.output = 8192` in the + production default plus the validated Qwen3 235B A22B Instruct 2507 FP8 + catalog entry, each with installer-managed `limit.output = 8192` in the written Kilo provider config - `docs/specs/kilo-setup-prd/spec.md` is the copied Kilo setup PRD - `docs/release-readiness.md` records the current production-readiness audit diff --git a/CHANGELOG.md b/CHANGELOG.md index b946ccb..ba412ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +- Wrote the validated GonkaGate chat-completions catalog into the managed + provider config so Kilo's OpenCode-style `/models` picker can switch between + Kimi K2.6 and Qwen3 235B A22B Instruct 2507 FP8. - Accepted Kilo versions at or above `@kilocode/cli >=7.2.0` instead of pre-blocking future Kilo releases with the previous `7.2.0`-only gate. - Kept local verification blockers and mismatches visible in rollback output diff --git a/README.md b/README.md index f06e858..2375d53 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,9 @@ Current public baseline: - current transport target: `chat/completions` - curated default: `moonshotai/Kimi-K2.6` +- managed validated catalog for Kilo's OpenCode-style `/models` picker: + `moonshotai/Kimi-K2.6` and + `qwen/qwen3-235b-a22b-instruct-2507-fp8` - installer-managed `limit.output = 8192` for Kilo compatibility - no native Windows production claim yet @@ -92,12 +95,14 @@ The installer will: 1. detect `kilo`, or fall back to `kilocode` 2. verify local Kilo is at least `@kilocode/cli >=7.2.0` 3. show the curated model choice -4. choose the recommended scope automatically: +4. write the validated GonkaGate provider model catalog for Kilo's `/models` + picker +5. choose the recommended scope automatically: - inside a git repository: `project` - outside a repository: `user` -5. collect your API key through a hidden prompt -6. write the managed config and verify the result -7. return you to normal `kilo` usage +6. collect your API key through a hidden prompt +7. write the managed config and verify the result +8. return you to normal `kilo` usage On interactive reruns, the installer asks about scope only if the last installer-managed scope differs from the new recommendation. @@ -201,6 +206,9 @@ This repository intentionally stays narrow today: - current transport target: `chat/completions` - current curated default: `moonshotai/Kimi-K2.6` +- validated GonkaGate models exposed to Kilo's `/models` picker: + `moonshotai/Kimi-K2.6` and + `qwen/qwen3-235b-a22b-instruct-2507-fp8` - real-path Kilo verification is not the production default - native Windows production support is not claimed yet - future Kilo releases are not pre-blocked by version, but observed diff --git a/docs/README.md b/docs/README.md index 7d3b194..2f3eaea 100644 --- a/docs/README.md +++ b/docs/README.md @@ -22,7 +22,8 @@ Current contract documents: - [`specs/kilo-setup-prd/spec.md`](./specs/kilo-setup-prd/spec.md): copied Kilo setup PRD from the planning repository -This repository ships the Kilo installer runtime with a validated curated Kimi -K2.6 default, installer-managed `limit.output = 8192` for Kilo compatibility, -and a minimum accepted Kilo floor of `@kilocode/cli >=7.2.0` without a preset -upper version bound. +This repository ships the Kilo installer runtime with a validated curated +GonkaGate chat-completions catalog, Kimi K2.6 as the recommended default, +installer-managed `limit.output = 8192` for Kilo compatibility, and a minimum +accepted Kilo floor of `@kilocode/cli >=7.2.0` without a preset upper version +bound. diff --git a/docs/gonkagate-x-kilo.md b/docs/gonkagate-x-kilo.md index a859b0b..20eea7f 100644 --- a/docs/gonkagate-x-kilo.md +++ b/docs/gonkagate-x-kilo.md @@ -130,6 +130,9 @@ Right now the public default is deliberately small: - transport: `chat/completions` - minimum Kilo floor: `@kilocode/cli >=7.2.0` - recommended validated model: `moonshotai/Kimi-K2.6` +- validated catalog exposed to Kilo's OpenCode-style `/models` picker: + `moonshotai/Kimi-K2.6` and + `qwen/qwen3-235b-a22b-instruct-2507-fp8` - managed limits: `limit.context = 262144`, `limit.output = 8192` We are treating model support as a curated list, not as a vague "it probably diff --git a/docs/how-it-works.md b/docs/how-it-works.md index 5732f45..53d57e6 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -32,8 +32,12 @@ Current public limit: - the curated default is `moonshotai/Kimi-K2.6` with `limit.context = 262144` and `limit.output = 8192` -- broader model claims still require additional proof before they should be - added to the validated public choice set +- the written provider config includes the validated chat-completions model + catalog, currently `moonshotai/Kimi-K2.6` and + `qwen/qwen3-235b-a22b-instruct-2507-fp8`, so Kilo's OpenCode-style + `/models` picker can switch between validated GonkaGate models +- broader model claims still require additional proof before models should be + added to the validated catalog ## Install Flow @@ -50,7 +54,8 @@ Current public limit: - `GONKAGATE_API_KEY` - `--api-key-stdin` 7. Save the secret only under `~/.gonkagate/kilo/api-key`. -8. Write or update the user-level provider definition. +8. Write or update the user-level provider definition, including the validated + GonkaGate model catalog for Kilo's `/models` picker. 9. When `project` scope is chosen, write only activation settings into `.kilo/kilo.jsonc`. 10. On rerun, remove only installer-owned stale GonkaGate activation from the @@ -118,6 +123,6 @@ The repository must stay explicit about what is not yet claimed: - no GonkaGate `responses` transport claim - no production-ready native Windows claim before the native oracle-safety proof exists -- no implication that every future Kilo behavior, broader model catalog, or +- no implication that every future Kilo behavior, live GonkaGate model, or native Windows path is already proven just because the current default is public diff --git a/docs/release-readiness.md b/docs/release-readiness.md index 6fa1160..e1555f2 100644 --- a/docs/release-readiness.md +++ b/docs/release-readiness.md @@ -19,7 +19,10 @@ docs, and tests for these facts: - current GonkaGate transport claim: `chat/completions` - curated public default: `moonshotai/Kimi-K2.6` -- curated model limits: +- validated provider catalog exposed to Kilo's OpenCode-style `/models` picker: + `moonshotai/Kimi-K2.6` and + `qwen/qwen3-235b-a22b-instruct-2507-fp8` +- curated model limits for the validated catalog: `limit.context = 262144`; `limit.output = 8192` - managed secret path: `~/.gonkagate/kilo/api-key` - project scope stays secret-free and still depends on a compatible @@ -37,9 +40,12 @@ Moonshot metadata checked on 2026-04-29: - the model card documents OpenAI-compatible chat completions access through Moonshot's API - the API docs describe the supported request path as `POST /v1/chat/completions` -- the package writes `limit.output = 8192` as the installer-managed Kilo - compatibility clamp because Kilo `7.2.0` requires a numeric output limit in - custom model config +- the package writes `limit.output = 8192` for validated catalog entries as + the installer-managed Kilo compatibility clamp because Kilo `7.2.0` requires + a numeric output limit in custom model config +- the April 14, 2026 Kilo compatibility spike captured + `qwen/qwen3-235b-a22b-instruct-2507-fp8` as a validated + chat-completions model with a 262K context window and `maxTokens` 8192 - npm registry metadata checked on 2026-04-29 showed `@kilocode/cli` patch releases in the `7.2.x` line, including `7.2.14`, with both `kilo` and `kilocode` binaries still exposed by the wrapper package @@ -53,7 +59,7 @@ The repository must continue to avoid these claims: - no claim that GonkaGate `responses` transport works today - no claim that real-path Kilo verification is the production default - no claim that native Windows production support is proven -- no claim that every future Kilo behavior or additional GonkaGate model is +- no claim that every future Kilo behavior or live GonkaGate model is proven just because the current curated default is shipped ## Remaining Follow-Up Items @@ -69,5 +75,5 @@ repository-only pass: Those items do not change the current package contract: the publishable surface remains the minimum Kilo `7.2.0` floor without an upper version bound, the -validated Kimi curated default, and the current non-Windows verification policy -documented above. +validated GonkaGate chat-completions catalog with Kimi as the recommended +default, and the current non-Windows verification policy documented above. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 7dc9184..02e6dd0 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -17,6 +17,19 @@ If you see a config error mentioning you are likely running a stale build that predates the required Kilo 7.2.0 output-limit fix. +## Why Does `/models` Show Only One GonkaGate Model? + +Current builds write the validated GonkaGate chat-completions catalog into +`provider.gonkagate.models`, so Kilo's OpenCode-style `/models` picker should +show both `moonshotai/Kimi-K2.6` and +`qwen/qwen3-235b-a22b-instruct-2507-fp8`. + +If `/models` still shows only one GonkaGate model, rerun the installer from a +current build so the user-level `provider.gonkagate` definition is refreshed. +Also check for a higher-precedence Kilo layer such as project config, +`KILO_CONFIG`, `KILO_CONFIG_DIR`, or `KILO_CONFIG_CONTENT` defining its own +`provider.gonkagate.models` object. + ## The CLI Says Setup Is Blocked Common reasons: diff --git a/docs/user-guide.md b/docs/user-guide.md index fb64b50..2990dd4 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -25,6 +25,9 @@ Today the public package is intentionally narrow: - current transport target: `chat/completions` - current curated default: `moonshotai/Kimi-K2.6` +- validated GonkaGate catalog for Kilo's OpenCode-style `/models` picker: + `moonshotai/Kimi-K2.6` and + `qwen/qwen3-235b-a22b-instruct-2507-fp8` - managed model limits: `limit.context = 262144`, `limit.output = 8192` - no native Windows production claim yet @@ -57,12 +60,14 @@ The installer will then: 1. Detect `kilo`, or fall back to `kilocode`. 2. Check the minimum supported Kilo floor. 3. Offer the curated GonkaGate model choice. -4. Choose the recommended scope automatically: +4. Write the validated GonkaGate provider model catalog for Kilo's `/models` + picker. +5. Choose the recommended scope automatically: - inside a git repository: `project` - outside a repository: `user` -5. Prompt for the GonkaGate API key using a hidden input. -6. Write the managed config and verify the result. -7. Return you to normal `kilo` usage. +6. Prompt for the GonkaGate API key using a hidden input. +7. Write the managed config and verify the result. +8. Return you to normal `kilo` usage. Interactive reruns ask about scope only when the previous installer-managed scope differs from the new recommendation. diff --git a/src/constants/contract.ts b/src/constants/contract.ts index 6b2bdd1..c9e2a8d 100644 --- a/src/constants/contract.ts +++ b/src/constants/contract.ts @@ -5,7 +5,7 @@ export const CONTRACT_METADATA = { packageName: "@gonkagate/kilo-setup", publicEntrypoint: "npx @gonkagate/kilo-setup", publicState: - "Installer runtime is shipped with a validated curated Kimi K2.6 default for @kilocode/cli >=7.2.0 installs, with installer-managed limit.output = 8192 for compatibility.", + "Installer runtime is shipped with a validated curated GonkaGate chat-completions catalog for @kilocode/cli >=7.2.0 installs, with Kimi K2.6 as the recommended default and installer-managed limit.output = 8192 for compatibility.", secondaryBinName: "gonkagate-kilo", upstreamKilo: { checkedAt: "2026-04-29", diff --git a/src/install/README.md b/src/install/README.md index e9ee14b..705752b 100644 --- a/src/install/README.md +++ b/src/install/README.md @@ -11,12 +11,15 @@ Start here: seams testable - `secrets.ts`, `scope.ts`, and `state.ts` own managed secret/config/install- state writes +- `managed-provider-config.ts` writes the validated GonkaGate + chat-completions model catalog into the Kilo/OpenCode-compatible provider + shape while keeping activation in the top-level `model` setting - `managed-write-transaction.ts` and `rollback.ts` restore installer-owned writes when durable verification fails - `verify-effective.ts`, `verify-layers.ts`, and related helpers implement the durable/current-session Kilo proof path with redacted diagnostics -The current stock runtime is still honestly blocked before writes because the -default curated Kilo registry has no validated production model yet. Keep -Kilo-specific behavior here and do not import OpenCode env vars or config -targets as runtime defaults. +The current stock runtime ships a validated curated Kimi K2.6 default plus the +validated Qwen3 235B A22B Instruct 2507 FP8 catalog entry. Keep Kilo-specific +behavior here and do not import OpenCode env vars or config targets as runtime +defaults. diff --git a/src/install/managed-provider-config.ts b/src/install/managed-provider-config.ts index 0867753..eb70012 100644 --- a/src/install/managed-provider-config.ts +++ b/src/install/managed-provider-config.ts @@ -6,10 +6,12 @@ import { } from "../constants/gateway.js"; import { getCuratedModelByKey, + getValidatedModels, type CuratedModel, type CuratedModelCompatibility, type CuratedModelKey, type CuratedModelLimits, + type ValidatedCuratedModel, } from "../constants/models.js"; import type { JsonObject } from "../json.js"; @@ -27,6 +29,40 @@ export function buildManagedProviderConfig( modelKey: CuratedModelKey, ): JsonObject { const model = resolveCuratedModel(modelKey); + const providerModels = createManagedProviderModels(model); + const models: JsonObject = {}; + + for (const providerModel of providerModels) { + models[providerModel.key] = createManagedModelConfig(providerModel); + } + + return { + models, + name: GONKAGATE_PROVIDER_NAME, + npm: model.adapterPackage, + options: createManagedProviderOptions(model), + }; +} + +function createManagedProviderModels( + selectedModel: CuratedModel, +): readonly ValidatedCuratedModel[] { + const providerModels = getValidatedModels().filter( + (model) => + model.transport === selectedModel.transport && + model.adapterPackage === selectedModel.adapterPackage, + ); + + if (providerModels.some((model) => model.key === selectedModel.key)) { + return providerModels; + } + + throw new Error( + `Validated model catalog does not include selected model: ${selectedModel.key}`, + ); +} + +function createManagedModelConfig(model: ValidatedCuratedModel): JsonObject { const runtimeCompatibility = model.runtimeCompatibility as | CuratedModelCompatibility | undefined; @@ -60,6 +96,13 @@ export function buildManagedProviderConfig( Object.assign(modelConfig, modelOptions); } + return modelConfig; +} + +function createManagedProviderOptions(model: CuratedModel): JsonObject { + const runtimeCompatibility = model.runtimeCompatibility as + | CuratedModelCompatibility + | undefined; const providerOptions: JsonObject = { apiKey: GONKAGATE_SECRET_FILE_REFERENCE, baseURL: GONKAGATE_BASE_URL, @@ -69,14 +112,7 @@ export function buildManagedProviderConfig( Object.assign(providerOptions, runtimeCompatibility.providerOptions); } - return { - models: { - [model.key]: modelConfig, - }, - name: GONKAGATE_PROVIDER_NAME, - npm: model.adapterPackage, - options: providerOptions, - }; + return providerOptions; } function resolveCuratedModel(modelKey: CuratedModelKey): CuratedModel { diff --git a/test/install/scope.test.ts b/test/install/scope.test.ts index 59d2e4a..91c4894 100644 --- a/test/install/scope.test.ts +++ b/test/install/scope.test.ts @@ -68,6 +68,8 @@ test("user scope writes provider and activation to user config and removes owned userConfigText, /"model": "gonkagate\/qwen3-235b-a22b-instruct-2507-fp8"/, ); + assert.match(userConfigText, /"kimi-k2\.6"/); + assert.match(userConfigText, /"qwen3-235b-a22b-instruct-2507-fp8"/); assert.doesNotMatch(userConfigText, /small_model/); assert.doesNotMatch(projectConfigText, /"model": "gonkagate\//); assert.match(projectConfigText, /"small_model": "custom\/small"/); diff --git a/test/package-contract.test.ts b/test/package-contract.test.ts index d46c18f..512f95c 100644 --- a/test/package-contract.test.ts +++ b/test/package-contract.test.ts @@ -165,3 +165,19 @@ test("managed provider config includes the required Kilo output token limit", () assert.equal(providerConfig.models["kimi-k2.6"]?.limit?.context, 262144); assert.equal(providerConfig.models["kimi-k2.6"]?.limit?.output, 8192); }); + +test("managed provider config exposes the validated catalog for model switching", () => { + const providerConfig = buildManagedProviderConfig("kimi-k2.6") as { + models: Record; + }; + + assert.deepEqual(Object.keys(providerConfig.models), [ + "kimi-k2.6", + "qwen3-235b-a22b-instruct-2507-fp8", + ]); + assert.equal(providerConfig.models["kimi-k2.6"]?.id, "moonshotai/Kimi-K2.6"); + assert.equal( + providerConfig.models["qwen3-235b-a22b-instruct-2507-fp8"]?.id, + "qwen/qwen3-235b-a22b-instruct-2507-fp8", + ); +});