diff --git a/.gitea/workflows/lint-continue-on-error-tracking.yml b/.gitea/workflows/lint-continue-on-error-tracking.yml index 1bd744b8..6f59b62f 100644 --- a/.gitea/workflows/lint-continue-on-error-tracking.yml +++ b/.gitea/workflows/lint-continue-on-error-tracking.yml @@ -99,7 +99,7 @@ jobs: # all violate this lint at first — intentional. Flip to false # follow-up after main is clean for 3 days. mc#1982. # mc#1982: pre-existing continue-on-error mask; root-fix and remove, do not renew silently. - continue-on-error: true # mc#1982 Phase 3 mask — 14d forced-renewal cadence + continue-on-error: true # internal#837 Phase 3 mask — 14d forced-renewal cadence steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 diff --git a/workspace-server/internal/providers/gen/registry_gen.go b/workspace-server/internal/providers/gen/registry_gen.go index eecab787..2da6ff75 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 = "e457249eb0fd77a2" +const Fingerprint = "2d08924e88d41963" // 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 e0540132..5f352382 100644 --- a/workspace-server/internal/providers/providers.yaml +++ b/workspace-server/internal/providers/providers.yaml @@ -1028,7 +1028,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 ff67df95..ed3c6064 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 = "9eb6f97fc37b528c91936be4a75dd87f6c7172742b4535d76b9bb2231ee18e80" +const canonicalProvidersYAMLSHA256 = "eca15840490f87938605e7097a0c7d44c11bd60bee2b4172b9fc7455bc6649ba" func TestSyncedYAMLMatchesCanonicalSHA(t *testing.T) { sum := sha256.Sum256(embeddedYAML)