From 19aa126c1889ce1adae020c92ee9296af1562e67 Mon Sep 17 00:00:00 2001 From: core-devops Date: Thu, 4 Jun 2026 20:30:07 -0700 Subject: [PATCH] =?UTF-8?q?fix(providers):=20sync=20core=20providers.yaml?= =?UTF-8?q?=20to=20CP=20canonical=20(cp#521=20claude-code=20colon-form=20r?= =?UTF-8?q?emoval)=20=E2=80=94=20close=20cross-repo=20drift=20(core#2261?= =?UTF-8?q?=20review)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comprehensive-review HIGH finding: core's providers.yaml was STALE vs the CP canonical. cp#521 merged to CP-only AFTER the cp#529 byte-sync, removing the unroutable colon-forms moonshot:kimi-k2.* / minimax:MiniMax-* from claude-code's kimi-coding/minimax arms (claude-code's adapter can't strip those prefixes). It was never synced to core — the repo that actually runs the workspace-create enforcer. Consequence: core's enforcer ACCEPTED moonshot:kimi-k2.6 / minimax:MiniMax-M2 for claude-code (which then wedge at adapter init), while CP rejects them — the exact unroutable-id class cp#521 set out to close. The hermetic sync_canonical_test only pins core-vs-its-own-copy (passed); only the live cross-repo sync-providers-yaml CI catches this, and it's paths-filtered + token-gated, so the CP-only change slipped through. Sync core to CP verbatim: providers.yaml + runtimes_test.go now byte-identical to molecule-controlplane canonical, registry_gen regenerated, canonicalProvidersYAMLSHA256 bumped to 9eb6f97f. providers + handlers tests green; the enforcer now correctly rejects the unroutable claude-code colon-forms. core#2261 cp#521 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../internal/providers/gen/registry_gen.go | 6 ++--- .../internal/providers/providers.yaml | 22 ++++++++----------- .../internal/providers/runtimes_test.go | 9 ++++---- .../internal/providers/sync_canonical_test.go | 2 +- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/workspace-server/internal/providers/gen/registry_gen.go b/workspace-server/internal/providers/gen/registry_gen.go index 39b5c31f9..eecab787e 100644 --- a/workspace-server/internal/providers/gen/registry_gen.go +++ b/workspace-server/internal/providers/gen/registry_gen.go @@ -16,7 +16,7 @@ const SchemaVersion = 1 // Fingerprint is a stable content hash of the generated projection (schema // version + provider catalog + runtime native sets). It changes iff the // registry DATA changes (comment-only YAML edits do not churn it). -const Fingerprint = "ec6b93409e7b9cf8" +const Fingerprint = "e457249eb0fd77a2" // GenProvider is the generated projection of one provider catalog entry — // the subset a downstream consumer needs to derive + display a provider. @@ -84,8 +84,8 @@ var Runtimes = map[string][]GenRuntimeRef{ "claude-code": { {Name: "anthropic-oauth", Models: []string{"sonnet", "opus", "haiku", "anthropic:sonnet", "anthropic:opus", "anthropic:haiku"}}, {Name: "anthropic-api", Models: []string{"claude-sonnet-4-6", "claude-opus-4-7", "claude-haiku-4-5", "claude-sonnet-4-5", "anthropic:claude-sonnet-4-6", "anthropic:claude-opus-4-7", "anthropic:claude-haiku-4-5", "anthropic:claude-sonnet-4-5"}}, - {Name: "kimi-coding", Models: []string{"kimi-for-coding", "kimi-k2.5", "kimi-k2", "moonshot:kimi-k2.6", "moonshot:kimi-k2.5"}}, - {Name: "minimax", Models: []string{"MiniMax-M2", "MiniMax-M2.7", "MiniMax-M2.7-highspeed", "MiniMax-M3", "minimax:MiniMax-M2", "minimax:MiniMax-M2.7", "minimax:MiniMax-M2.7-highspeed", "minimax:MiniMax-M3"}}, + {Name: "kimi-coding", Models: []string{"kimi-for-coding", "kimi-k2.5", "kimi-k2"}}, + {Name: "minimax", Models: []string{"MiniMax-M2", "MiniMax-M2.7", "MiniMax-M2.7-highspeed", "MiniMax-M3"}}, {Name: "platform", Models: []string{"anthropic/claude-opus-4-7", "anthropic/claude-sonnet-4-6", "moonshot/kimi-k2.6", "moonshot/kimi-k2.5", "minimax/MiniMax-M2.7", "minimax/MiniMax-M2.7-highspeed", "minimax/MiniMax-M3"}}, {Name: "zai", Models: []string{}}, {Name: "deepseek", Models: []string{}}, diff --git a/workspace-server/internal/providers/providers.yaml b/workspace-server/internal/providers/providers.yaml index 6754261f2..e0540132f 100644 --- a/workspace-server/internal/providers/providers.yaml +++ b/workspace-server/internal/providers/providers.yaml @@ -827,29 +827,25 @@ runtimes: - anthropic:claude-sonnet-4-5 - name: kimi-coding # BYOK kimi-coding gateway ids — bare form is the canonical id - # the gateway routes; the colon form `moonshot:kimi-k2.*` is the - # legacy BYOK selection form (already in use on the openclaw - # native set below). claude-code's adapter accepts both - # (internal#718 P4 PR-1). + # the gateway routes. The colon form `moonshot:kimi-k2.*` was + # removed because claude-code's adapter cannot strip the + # `moonshot:` prefix — it only handles `anthropic:`/`claude:` + # (cp#521). The bare forms already cover these models. models: - kimi-for-coding - kimi-k2.5 - kimi-k2 - - moonshot:kimi-k2.6 - - moonshot:kimi-k2.5 - name: minimax - # BYOK MiniMax ids — bare form is the canonical id; colon form is - # the legacy BYOK selection spelling carried in the create corpus - # and the openclaw template (internal#718 P4 PR-1). + # BYOK MiniMax ids — bare form is the canonical id. The colon + # forms `minimax:MiniMax-*` were removed because claude-code's + # adapter cannot strip the `minimax:` prefix — it only handles + # `anthropic:`/`claude:` (cp#521). The bare forms already cover + # these models. models: - MiniMax-M2 - MiniMax-M2.7 - MiniMax-M2.7-highspeed - MiniMax-M3 - - minimax:MiniMax-M2 - - minimax:MiniMax-M2.7 - - minimax:MiniMax-M2.7-highspeed - - minimax:MiniMax-M3 # Platform-managed (no tenant key; Molecule owns billing). The # vendor/model-namespaced ids the proxy resolves to the upstream vendor. # Canonical for the template's `provider: platform` model entries — the diff --git a/workspace-server/internal/providers/runtimes_test.go b/workspace-server/internal/providers/runtimes_test.go index 99da2c962..d31897e63 100644 --- a/workspace-server/internal/providers/runtimes_test.go +++ b/workspace-server/internal/providers/runtimes_test.go @@ -117,14 +117,15 @@ func TestModelsForRuntime_ExactModelIDs(t *testing.T) { "anthropic:claude-haiku-4-5", "anthropic:claude-sonnet-4-5", // anthropic via platform proxy (namespaced) "anthropic/claude-opus-4-7", "anthropic/claude-sonnet-4-6", - // kimi (kimi-coding gateway, bare + legacy colon-namespaced BYOK) + // kimi (kimi-coding gateway, bare form only — colon-forms removed + // because claude-code's adapter cannot strip the moonshot: prefix; + // openclaw retains them natively, cp#521). "kimi-for-coding", "kimi-k2.5", "kimi-k2", - "moonshot:kimi-k2.6", "moonshot:kimi-k2.5", // kimi via platform proxy "moonshot/kimi-k2.6", "moonshot/kimi-k2.5", - // minimax BYOK (bare + legacy colon-namespaced) + // minimax BYOK (bare form only — colon-forms removed because + // claude-code's adapter cannot strip the minimax: prefix, cp#521). "MiniMax-M2", "MiniMax-M2.7", "MiniMax-M2.7-highspeed", "MiniMax-M3", - "minimax:MiniMax-M2", "minimax:MiniMax-M2.7", "minimax:MiniMax-M2.7-highspeed", "minimax:MiniMax-M3", // minimax via platform proxy "minimax/MiniMax-M2.7", "minimax/MiniMax-M2.7-highspeed", "minimax/MiniMax-M3", }, diff --git a/workspace-server/internal/providers/sync_canonical_test.go b/workspace-server/internal/providers/sync_canonical_test.go index ab15eff0e..ff67df958 100644 --- a/workspace-server/internal/providers/sync_canonical_test.go +++ b/workspace-server/internal/providers/sync_canonical_test.go @@ -29,7 +29,7 @@ import ( // canonicalProvidersYAMLSHA256 is the sha256 of the canonical providers.yaml as // synced from molecule-controlplane. Bumped deliberately on each re-sync (see // file doc). Cross-checked live by the sync-providers-yaml CI workflow. -const canonicalProvidersYAMLSHA256 = "846ddef11ec423ebf2e96b5da21bd89129dbc3f0a2d14ac086940e005c079387" +const canonicalProvidersYAMLSHA256 = "9eb6f97fc37b528c91936be4a75dd87f6c7172742b4535d76b9bb2231ee18e80" func TestSyncedYAMLMatchesCanonicalSHA(t *testing.T) { sum := sha256.Sum256(embeddedYAML) -- 2.52.0