From 700ec2f25d50337a579efa47c8c7ab10f6865cbb Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 24 Mar 2026 09:46:06 -0700 Subject: [PATCH] fix: use v1beta for migrated google nano banana provider (#53757) (thanks @mahopan) --- CHANGELOG.md | 1 + src/commands/doctor-legacy-config.migrations.test.ts | 4 ++-- src/commands/doctor-legacy-config.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d16d9c0840c..ee056ab4e31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Doctor/image generation: seed migrated legacy Nano Banana Google provider config with the `/v1beta` API root and an empty model list so `openclaw doctor --fix` completes and the migrated native Google image path keeps hitting the correct endpoint. (#53757) Thanks @mahopan. - Security/skills: validate skill installer metadata against strict regex allowlists per package manager, sanitize skill metadata for terminal output, add URL protocol allowlisting in markdown preview and skill homepage links, warn on non-bundled skill install sources, and remove unsafe `file://` workspace links. (#53471) Thanks @BunsDev. - Feishu/docx block ordering: preserve the document tree order from `docx.document.convert` when inserting blocks, fixing heading/paragraph/list misordering in newly written Feishu documents. (#40524) Thanks @TaoXieSZ. - Agents/cron: suppress the default heartbeat system prompt for cron-triggered embedded runs even when they target non-cron session keys, so cron tasks stop reading `HEARTBEAT.md` and polluting unrelated threads. (#53152) Thanks @Protocol-zero-0. diff --git a/src/commands/doctor-legacy-config.migrations.test.ts b/src/commands/doctor-legacy-config.migrations.test.ts index cec5f767456..d4de96b8367 100644 --- a/src/commands/doctor-legacy-config.migrations.test.ts +++ b/src/commands/doctor-legacy-config.migrations.test.ts @@ -319,7 +319,7 @@ describe("normalizeCompatibilityConfigValues", () => { id: "GEMINI_API_KEY", }); expect(res.config.models?.providers?.google?.baseUrl).toBe( - "https://generativelanguage.googleapis.com", + "https://generativelanguage.googleapis.com/v1beta", ); expect(res.config.models?.providers?.google?.models).toEqual([]); expect(res.config.skills?.entries).toBeUndefined(); @@ -346,7 +346,7 @@ describe("normalizeCompatibilityConfigValues", () => { expect(res.config.models?.providers?.google?.apiKey).toBe("env-gemini-key"); expect(res.config.models?.providers?.google?.baseUrl).toBe( - "https://generativelanguage.googleapis.com", + "https://generativelanguage.googleapis.com/v1beta", ); expect(res.config.models?.providers?.google?.models).toEqual([]); expect(res.changes).toContain( diff --git a/src/commands/doctor-legacy-config.ts b/src/commands/doctor-legacy-config.ts index 61b738bf3ef..77c90fb1904 100644 --- a/src/commands/doctor-legacy-config.ts +++ b/src/commands/doctor-legacy-config.ts @@ -580,7 +580,7 @@ export function normalizeCompatibilityConfigValues(cfg: OpenClawConfig): { if (!hasGoogleApiKey && legacyApiKey) { rawGoogle.apiKey = legacyApiKey; if (!rawGoogle.baseUrl) { - rawGoogle.baseUrl = "https://generativelanguage.googleapis.com"; + rawGoogle.baseUrl = "https://generativelanguage.googleapis.com/v1beta"; } if (!Array.isArray(rawGoogle.models)) { rawGoogle.models = [];