P4 PR-1 internal#718 (sync): re-sync canonical providers.yaml with the colon-vocab reconcile (no behavior change) #1980

Merged
hongming merged 1 commits from feat/internal-718-p4-pr1-reconcile-colon-vocab-sync into main 2026-05-28 03:41:49 +00:00
4 changed files with 70 additions and 16 deletions
@@ -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 = "faffcbe59bb9f38c"
const Fingerprint = "cbd39dfe934302e0"
// GenProvider is the generated projection of one provider catalog entry —
// the subset a downstream consumer needs to derive + display a provider.
@@ -75,10 +75,10 @@ var Providers = []GenProvider{
// sorted for a deterministic artifact.
var Runtimes = map[string][]GenRuntimeRef{
"claude-code": {
{Name: "anthropic-oauth", Models: []string{"sonnet", "opus", "haiku"}},
{Name: "anthropic-api", Models: []string{"claude-sonnet-4-6", "claude-opus-4-7", "claude-haiku-4-5"}},
{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"}},
{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:MiniMax-M2", "minimax:MiniMax-M2.7", "minimax:MiniMax-M2.7-highspeed"}},
{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"}},
},
"codex": {
@@ -593,28 +593,73 @@ runtimes:
# claude-code: native Anthropic-API / Claude-Code endpoints. Anthropic is
# split across two manifest providers (oauth + api) because the runtime
# exposes both auth paths natively; both count as "anthropic".
#
# internal#718 P4 PR-1 (2026-05-27): the colon-namespaced BYOK form
# `vendor:model` is the legacy spelling for explicit BYOK selection that
# predates the slash-namespaced platform form `vendor/model`. Both forms
# are LIVE across the workspace-create corpus (~44 test files +
# canvas/ConfigTab default + the openclaw template's native list).
# PRECEDENT: the openclaw runtime below already lists colon-form ids
# (`moonshot:kimi-k2.6`) as the BYOK kimi-coding native set — the
# adapter understands the colon form. P4 PR-1 extends the same precedent
# to claude-code so `DeriveProvider` / `Manifest.ModelsForRuntime`
# returns true for every legitimate BYOK model in the corpus. The
# canonical slash form (`anthropic/claude-opus-4-7`) is the
# platform-managed routing form (proxy upstream lookup); the colon
# form is the legacy BYOK selection form. Both are first-class
# registry entries on the runtime's native provider set.
claude-code:
providers:
- name: anthropic-oauth
models: [sonnet, opus, haiku]
# Colon-form aliases (`anthropic:sonnet`, ...) are the legacy BYOK
# spelling for the OAuth alias path that the live corpus carries.
# Per the same P4 PR-1 precedent (see colon-form comment above),
# these are first-class registry entries — DeriveProvider resolves
# them to anthropic-oauth deterministically.
models:
- sonnet
- opus
- haiku
- anthropic:sonnet
- anthropic:opus
- anthropic:haiku
- name: anthropic-api
# BYOK versioned API ids (platform-namespaced ids live under `platform`)
# BYOK versioned API ids — bare form is the canonical id the
# Anthropic SDK accepts on the wire; colon form is the legacy
# BYOK selection spelling used across the create/test corpus
# (internal#718 P4 PR-1). Both forms route to anthropic-api.
models:
- 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
# BYOK kimi-coding gateway ids (platform-namespaced under `platform`)
# 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).
models:
- kimi-for-coding
- kimi-k2.5
- kimi-k2
- moonshot:kimi-k2.6
- moonshot:kimi-k2.5
- name: minimax
# BYOK MiniMax ids (platform-namespaced ids live under `platform`)
# 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).
models:
- MiniMax-M2
- MiniMax-M2.7
- MiniMax-M2.7-highspeed
- minimax:MiniMax-M2
- minimax:MiniMax-M2.7
- minimax:MiniMax-M2.7-highspeed
# 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
@@ -78,20 +78,29 @@ func TestModelsForRuntime_ExactModelIDs(t *testing.T) {
cases := map[string][]string{
// claude-code: anthropic (oauth aliases + versioned API ids +
// platform-namespaced) + kimi (kimi-coding gateway + platform) +
// minimax (BYOK + platform-namespaced).
// minimax (BYOK + platform-namespaced). internal#718 P4 PR-1 added
// the legacy colon-namespaced BYOK spelling (`vendor:model`) as
// first-class registry entries — the live workspace-create corpus
// uses both bare and colon forms across ~44 test files +
// canvas/ConfigTab default + the openclaw template (precedent).
"claude-code": {
// anthropic OAuth aliases
// anthropic OAuth aliases (bare + legacy colon-namespaced)
"sonnet", "opus", "haiku",
// anthropic API versioned
"claude-sonnet-4-6", "claude-opus-4-7", "claude-haiku-4-5",
"anthropic:sonnet", "anthropic:opus", "anthropic:haiku",
// anthropic API versioned (bare + legacy colon-namespaced BYOK)
"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",
// anthropic via platform proxy (namespaced)
"anthropic/claude-opus-4-7", "anthropic/claude-sonnet-4-6",
// kimi (kimi-coding gateway)
// kimi (kimi-coding gateway, bare + legacy colon-namespaced BYOK)
"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
// minimax BYOK (bare + legacy colon-namespaced)
"MiniMax-M2", "MiniMax-M2.7", "MiniMax-M2.7-highspeed",
"minimax:MiniMax-M2", "minimax:MiniMax-M2.7", "minimax:MiniMax-M2.7-highspeed",
// minimax via platform proxy
"minimax/MiniMax-M2.7", "minimax/MiniMax-M2.7-highspeed",
},
@@ -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 = "48a669210494f3fded2315eb59a5549bc7632676e6d2e29db58a67273184ce76"
const canonicalProvidersYAMLSHA256 = "73e8003062edaa4ce75bfb324be615b6e2b380f07487e3af4dc16cb644dc12bc"
func TestSyncedYAMLMatchesCanonicalSHA(t *testing.T) {
sum := sha256.Sum256(embeddedYAML)