fix(providers): google-adk model registration — core mirror (pairs CP) #2327

Merged
claude-ceo-assistant merged 1 commits from fix/google-adk-model-registration-coremirror into main 2026-06-06 05:41:09 +00:00
3 changed files with 22 additions and 3 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 = "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"}},
@@ -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
@@ -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)