From efc713416778327384c95a0b850ecfb19e5bd5cb Mon Sep 17 00:00:00 2001 From: Dizzle <112548150+maxmad64bis@users.noreply.github.com> Date: Sat, 22 Aug 2026 19:39:12 +0200 Subject: [PATCH] fix(registry): restore models[0] default + guards; note muse-spark overlay (#11051/#11049) (#11133) Validated on the combined batch board over release/v3.8.50 tip d91238b7: static gates clean, typecheck:core clean, focused tests green. Restores the models[0] dashboard default silently changed by #11051, with narrow guards instead of a brittle full snapshot. Thank you @maxmad64bis! --- .../config/providers/registry/opencode/go/index.ts | 6 ++++-- .../config/providers/registry/opencode/zen/index.ts | 8 ++++++-- tests/unit/opencode-zen-go-shared-models.test.ts | 13 +++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/open-sse/config/providers/registry/opencode/go/index.ts b/open-sse/config/providers/registry/opencode/go/index.ts index 14304426c5..abebd92c0f 100644 --- a/open-sse/config/providers/registry/opencode/go/index.ts +++ b/open-sse/config/providers/registry/opencode/go/index.ts @@ -14,8 +14,6 @@ export const opencode_goProvider: RegistryEntry = { authPrefix: "Bearer", defaultContextLength: 200000, models: [ - ...OPENCODE_ZEN_GO_SHARED_MODELS, - // Port from decolua/9router 8efacc11: align with official Go endpoints — // glm-5.2 is now advertised and Kimi chat traffic must route through // `kimi-k2.7-code` (the live API rejects the plain `kimi-k2.7` alias for @@ -26,6 +24,10 @@ export const opencode_goProvider: RegistryEntry = { { id: "glm-5.2", name: "GLM-5.2", supportsReasoning: true }, { id: "glm-5.2-high", name: "GLM-5.2 (high effort)", supportsReasoning: true }, { id: "glm-5.2-max", name: "GLM-5.2 (max effort)", supportsReasoning: true }, + + ...OPENCODE_ZEN_GO_SHARED_MODELS, + // models[0] (glm-5.2) is the dashboard default (LlmChatCard/ProviderTestSlideOver take models[0]). + { id: "glm-5.1", name: "GLM-5.1" }, { id: "glm-5", name: "GLM-5" }, // kimi-k2.7-code declared identically on opencode-zen — see OPENCODE_ZEN_GO_SHARED_MODELS. diff --git a/open-sse/config/providers/registry/opencode/zen/index.ts b/open-sse/config/providers/registry/opencode/zen/index.ts index 76b3811e39..9fdca2fc0a 100644 --- a/open-sse/config/providers/registry/opencode/zen/index.ts +++ b/open-sse/config/providers/registry/opencode/zen/index.ts @@ -16,8 +16,6 @@ export const opencode_zenProvider: RegistryEntry = { // from the live API response so new models work without a code deploy. passthroughModels: true, models: [ - ...OPENCODE_ZEN_GO_SHARED_MODELS, - // ── Chat / Coding ────────────────────────────────────────── // #2900: big-pickle's upstream runs DeepSeek thinking mode — declare the // interleaved reasoning_content contract so follow-up/tool-use turns replay @@ -28,6 +26,10 @@ export const opencode_zenProvider: RegistryEntry = { supportsReasoning: true, interleavedField: "reasoning_content", }, + + ...OPENCODE_ZEN_GO_SHARED_MODELS, + // models[0] (big-pickle) is the dashboard default; SHARED spread kept after it. + { id: "gpt-5.6-sol", name: "GPT 5.6 Sol" }, { id: "gpt-5.6-terra", name: "GPT 5.6 Terra" }, { id: "gpt-5.6-luna", name: "GPT 5.6 Luna" }, @@ -67,6 +69,8 @@ export const opencode_zenProvider: RegistryEntry = { supportsReasoning: true, targetFormat: "openai-responses", }, + // Explicit wire-format overlay of the base opencode provider's muse-spark entry + // (targetFormat: openai-responses). Keep in sync with base on catalog syncs. { id: "muse-spark-1.2-contributor-free", name: "Muse Spark 1.2 Contributor Free", diff --git a/tests/unit/opencode-zen-go-shared-models.test.ts b/tests/unit/opencode-zen-go-shared-models.test.ts index 8c3079ad15..c1fb49e97d 100644 --- a/tests/unit/opencode-zen-go-shared-models.test.ts +++ b/tests/unit/opencode-zen-go-shared-models.test.ts @@ -24,3 +24,16 @@ test("every OPENCODE_ZEN_GO_SHARED_MODELS entry is present, unmodified, exactly test("OPENCODE_ZEN_GO_SHARED_MODELS is frozen (no accidental cross-registry mutation)", () => { assert.ok(Object.isFrozen(OPENCODE_ZEN_GO_SHARED_MODELS)); }); + +test("referenced non-shared model ids remain present", () => { + const goIds = new Set(opencode_goProvider.models.map((m) => m.id)); + const zenIds = new Set(opencode_zenProvider.models.map((m) => m.id)); + for (const id of ["minimax-m3", "glm-5.1"]) { + assert.ok(goIds.has(id) || zenIds.has(id), `expected ${id} in go or zen`); + } +}); + +test("models[0] is the intended dashboard default", () => { + assert.equal(opencode_goProvider.models[0].id, "glm-5.2"); + assert.equal(opencode_zenProvider.models[0].id, "big-pickle"); +});