-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
doctor --fix crashes with Config validation failed on models.providers.google.baseUrl #53756
Copy link
Copy link
Description
Bug
Running openclaw doctor --fix fails with:
Error: Config validation failed: models.providers.google.baseUrl: Invalid input: expected string, received undefined
Reproduction
- Have a legacy
skills.entries.nano-banana-proconfig with anapiKey(but no existingmodels.providers.googlesection) - Run
openclaw doctor --fix - The migration moves the API key to
models.providers.google.apiKeybut does not populate the requiredbaseUrlormodelsfields - Config write fails Zod validation (
ModelProviderSchemarequiresbaseUrl: z.string().min(1)andmodels: z.array(...))
Root Cause
In src/commands/doctor-legacy-config.ts, the nano-banana migration creates a partial models.providers.google = { apiKey: "..." } object when no pre-existing google provider config exists. The ModelProviderSchema requires baseUrl and models but the migration only sets apiKey.
Expected
doctor --fix should successfully migrate the legacy nano-banana config without crashing.
Workaround
Manually set the required fields before running doctor:
openclaw config set models.providers.google.baseUrl "https://generativelanguage.googleapis.com"
openclaw config set models.providers.google.models "[]"
openclaw doctor --fixReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.