From 1019a8e2c6327ef4ea370193237bc707fe9d5c50 Mon Sep 17 00:00:00 2001 From: hongming Date: Thu, 4 Jun 2026 01:49:20 -0700 Subject: [PATCH] =?UTF-8?q?chore(providers):=20byte-sync=20=E2=80=94=20dro?= =?UTF-8?q?p=20transitional=20vertex:=20arm=20(cp#514)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Byte-sync mirror of molecule-controlplane's cp#514 (chore: remove transitional vertex: arm from google-adk). Copies the canonical providers.yaml verbatim, regenerates workspace-server's registry_gen.go projection, re-pins canonicalProvidersYAMLSHA256, and flips the mirrored TestVertexProviderRegistered runtime-arm assertions. The standalone keyless `vertex` provider (^vertex: namespace) is unchanged; only the transitional `vertex:gemini-2.5-pro` selectable arm on the google-adk runtime is removed. A saved `vertex:gemini-*` model still resolves harmlessly. Synced pair with the CP PR (sync-providers-yaml + verify-providers-gen gates) — must merge TOGETHER with it. Verified the two providers.yaml are byte-identical (sha256 8e19aaf8a2a37cdd109184ae80ca223ce0a0ce0ed30299a52aa990271da5af7a). Refs molecule-controlplane#514 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../internal/providers/gen/registry_gen.go | 3 +- .../internal/providers/providers.yaml | 6 ---- .../internal/providers/providers_test.go | 33 ++++++++++++------- .../internal/providers/sync_canonical_test.go | 2 +- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/workspace-server/internal/providers/gen/registry_gen.go b/workspace-server/internal/providers/gen/registry_gen.go index f4501f13a..c4c6ae637 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 = "a491f5ff8a17ef59" +const Fingerprint = "ae33546c8fba3474" // GenProvider is the generated projection of one provider catalog entry — // the subset a downstream consumer needs to derive + display a provider. @@ -91,7 +91,6 @@ var Runtimes = map[string][]GenRuntimeRef{ "google-adk": { {Name: "platform", Models: []string{"platform:gemini-2.5-pro", "platform:gemini-2.5-flash"}}, {Name: "google", Models: []string{"gemini-2.5-pro", "gemini-2.5-flash"}}, - {Name: "vertex", Models: []string{"vertex:gemini-2.5-pro"}}, }, "hermes": { {Name: "kimi-coding", Models: []string{"kimi-coding/kimi-k2"}}, diff --git a/workspace-server/internal/providers/providers.yaml b/workspace-server/internal/providers/providers.yaml index 1514ab5de..db5269883 100644 --- a/workspace-server/internal/providers/providers.yaml +++ b/workspace-server/internal/providers/providers.yaml @@ -869,9 +869,3 @@ runtimes: models: - gemini-2.5-pro - gemini-2.5-flash - # DEPRECATED transitional: vertex: ids stay registered until templates - # move to platform: (superseded by the platform arm above). Remove in a - # cleanup once no template references vertex:gemini-*. - - name: vertex - models: - - vertex:gemini-2.5-pro \ No newline at end of file diff --git a/workspace-server/internal/providers/providers_test.go b/workspace-server/internal/providers/providers_test.go index 8613b7100..7ce25f0a0 100644 --- a/workspace-server/internal/providers/providers_test.go +++ b/workspace-server/internal/providers/providers_test.go @@ -249,11 +249,17 @@ func TestGoogleADKRuntimeRegistered(t *testing.T) { } // TestVertexProviderRegistered locks the keyless Vertex provider variant in the -// providers.yaml SSOT. google-adk serves Gemini via Vertex AI with ADC/WIF -// (no API key); the registry must model that as a first-class "vertex" provider -// (auth_env GOOGLE_APPLICATION_CREDENTIALS, ^vertex: namespace) distinct from -// the API-key "google" vendor, and the google-adk runtime must offer both arms. -// See project_canvas_runtime_dropdown_ssot_fix. +// providers.yaml SSOT. google-adk serves platform-managed Gemini via the LLM +// proxy -> Vertex AI with server-side WIF (no on-box key); the registry must +// still model the keyless "vertex" provider (auth_env GOOGLE_APPLICATION_CREDENTIALS, +// ^vertex: namespace) as a first-class entry distinct from the API-key "google" +// vendor, so the proxy can still route/bill any Vertex-upstream request that +// carries a `vertex:` id. The TRANSITIONAL `vertex:` arm on the google-adk +// RUNTIME (the selectable model set) was removed in cp#514 now that templates +// default to `platform:`; the runtime offers only the `platform` + API-key +// `google` arms. A saved `vertex:gemini-*` model still RESOLVES harmlessly via +// this standalone provider (it is just no longer offered as a new selection). +// See project_canvas_runtime_dropdown_ssot_fix + cp#514. func TestVertexProviderRegistered(t *testing.T) { ps, err := Load() if err != nil { @@ -298,20 +304,23 @@ func TestVertexProviderRegistered(t *testing.T) { for _, p := range provs { names[p.Name] = true } - if !names["vertex"] { - t.Errorf("google-adk runtime should offer the keyless vertex arm; got %v", names) + // cp#514: the transitional `vertex` arm was dropped from the google-adk + // runtime. The runtime keeps the platform-managed default + the API-key + // google arm; the standalone `vertex` PROVIDER (asserted above) survives + // for ^vertex: resolution but is no longer a selectable runtime arm. + if names["vertex"] { + t.Errorf("google-adk runtime should NOT offer the transitional vertex arm (removed cp#514); got %v", names) + } + if !names["platform"] { + t.Errorf("google-adk runtime should keep the platform-managed arm; got %v", names) } if !names["google"] { t.Errorf("google-adk runtime should keep the API-key google arm; got %v", names) } models, _ := m.ModelsForRuntime("google-adk") - hasVertexModel := false for _, id := range models { if id == "vertex:gemini-2.5-pro" { - hasVertexModel = true + t.Errorf("google-adk models should NOT include vertex:gemini-2.5-pro (removed cp#514); got %v", models) } } - if !hasVertexModel { - t.Errorf("google-adk models should include vertex:gemini-2.5-pro; got %v", models) - } } diff --git a/workspace-server/internal/providers/sync_canonical_test.go b/workspace-server/internal/providers/sync_canonical_test.go index 463ad3003..099d90eaa 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 = "021ae082c2bbbbb61c406cae03205ac6b7fff160ae5976cfc64de3de676d02b2" +const canonicalProvidersYAMLSHA256 = "8e19aaf8a2a37cdd109184ae80ca223ce0a0ce0ed30299a52aa990271da5af7a" func TestSyncedYAMLMatchesCanonicalSHA(t *testing.T) { sum := sha256.Sum256(embeddedYAML) -- 2.52.0