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!
This commit is contained in:
Dizzle
2026-08-22 19:39:12 +02:00
committed by GitHub
parent b44f22a949
commit efc7134167
3 changed files with 23 additions and 4 deletions

View File

@@ -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.

View File

@@ -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",

View File

@@ -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");
});