From 8522b4e368e458835c657310af996d4efbe4e75e Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Sat, 6 Jun 2026 05:23:22 +0000 Subject: [PATCH] fix(providers): sync google-adk google_genai entries from controlplane canonical (cp#568) --- .../internal/providers/gen/registry_gen.go | 4 ++-- .../internal/providers/providers.yaml | 19 +++++++++++++++++++ .../internal/providers/sync_canonical_test.go | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/workspace-server/internal/providers/gen/registry_gen.go b/workspace-server/internal/providers/gen/registry_gen.go index 151d7288b..9750cd3f3 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 = "9d129c96c9df9689" +const Fingerprint = "acb3798aa8ec3cec" // GenProvider is the generated projection of one provider catalog entry — // the subset a downstream consumer needs to derive + display a provider. @@ -99,7 +99,7 @@ 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: "google", Models: []string{"gemini-2.5-pro", "gemini-2.5-flash", "google_genai:gemini-2.5-pro", "google_genai:gemini-2.5-flash"}}, }, "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 955df2f1f..91320498d 100644 --- a/workspace-server/internal/providers/providers.yaml +++ b/workspace-server/internal/providers/providers.yaml @@ -1058,7 +1058,26 @@ runtimes: - platform:gemini-2.5-pro - platform:gemini-2.5-flash # API-key BYOK arm: AI Studio (the tenant's OWN GOOGLE_API_KEY). + # + # The colon-namespaced `google_genai:` ids are the BYOK spelling the + # template's models[] offers (template-google-adk main: + # `google_genai:gemini-2.5-pro` / `-flash`, AI-Studio BYOK; the default is + # the platform arm above). The runtime adapter (_routing.resolve_model) + # treats `google_genai`/`google`/`gemini` as the SAME AI-Studio prefix + # family — it strips the prefix to the bare `gemini-2.5-pro` and serves it + # via ADK LlmAgent on the AI-Studio backend (GOOGLE_API_KEY) — so both the + # bare and `google_genai:` forms resolve to THIS `google` arm. The bare ids + # stay (registry-projection / canvas form); the `google_genai:` ids are + # ADDED because the LIVE core check is EXACT membership in ModelsForRuntime, + # NOT the `^gemini-` prefix (model_registry_validation.go), so without these + # exact entries a template BYOK create 422s UNREGISTERED_MODEL_FOR_RUNTIME. + # (This corrects the template's own stale comment that `google_genai:` is + # covered by the `^gemini-` prefix — it is not; `^gemini-` matches only the + # BARE id.) Vertex was intentionally dropped from the runtime arm (cp#514); + # the template no longer offers `vertex:`, so no vertex arm is added here. - name: google models: - gemini-2.5-pro - gemini-2.5-flash + - google_genai:gemini-2.5-pro + - google_genai:gemini-2.5-flash diff --git a/workspace-server/internal/providers/sync_canonical_test.go b/workspace-server/internal/providers/sync_canonical_test.go index 226f41691..b8dfc1542 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 = "58bc38648674e77c6ffa6ffe41e911bec8c68da56d028550f2e39dedc4aa25ae" +const canonicalProvidersYAMLSHA256 = "ab51d3faa21348696bf53cffe241ac07d0762c4074207264efe4f58f7591c4dc" func TestSyncedYAMLMatchesCanonicalSHA(t *testing.T) { sum := sha256.Sum256(embeddedYAML) -- 2.52.0