fix(doctor): preserve valid google provider shape in nano-banana migration#53841
fix(doctor): preserve valid google provider shape in nano-banana migration#53841eulicesl wants to merge 2 commits intoopenclaw:mainfrom
Conversation
|
@codex review for correctness and scope. Please focus on whether this is the right fix location for the nano-banana migration bug, whether it preserves explicit existing google provider config, and whether the regression coverage is sufficient for this migration path. |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Greptile SummaryThis PR fixes a bug in Changes:
Confidence Score: 5/5
Reviews (1): Last reviewed commit: "fix(doctor): preserve valid google provi..." | Re-trigger Greptile |
4c77d3b to
107736e
Compare
5425754 to
db02532
Compare
Summary
openclaw doctor --fixcould migrate legacyskills.entries.nano-banana-proconfig into an invalidmodels.providers.googleobject.apiKeyonly, then config validation failed becauseModelProviderSchemarequiresbaseUrlandmodels.google.baseUrlandgoogle.modelswhen it introduces the google provider entry.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause / Regression History (if applicable)
normalizeCompatibilityConfigValues()migrated legacy nano-banana config intomodels.providers.google.apiKeybut did not materialize the rest of the requiredModelProviderSchemashape.git blame, prior PR, issue, or refactor if known): reported in doctor --fix crashes with Config validation failed on models.providers.google.baseUrl #53756 with a direct repro againstdoctor --fix.Regression Test Plan (if applicable)
src/commands/doctor-legacy-config.migrations.test.tsskills.entries.nano-banana-proconfig with no pre-existingmodels.providers.googleshould produce a schema-valid google provider entry includingbaseUrlandmodels.User-visible / Behavior Changes
openclaw doctor --fixno longer fails validation when migrating legacyskills.entries.nano-banana-proconfig intomodels.providers.google.Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
skills.entries.nano-banana-prowithapiKeyorenv.GEMINI_API_KEY, and no pre-existingmodels.providers.googleSteps
skills.entries.nano-banana-prowith an API key.models.providers.googleis absent.openclaw doctor --fix.Expected
models.providers.googleis schema-valid.Actual
models.providers.google.baseUrl: Invalid input: expected string, received undefined.Evidence
Attach at least one:
Human Verification (required)
pnpm exec vitest run src/commands/doctor-legacy-config.migrations.test.tsmodels.providers.google.baseUrlandmodels.providers.google.modelsenv.GEMINI_API_KEYover legacy skillapiKeyduring migrationpnpm build && pnpm check && pnpm testcodex review --base origin/mainyetReview Conversations
Compatibility / Migration
Yes/No): YesYes/No): NoYes/No): NoFailure Recovery (if this breaks)
01c8787de4src/commands/doctor-legacy-config.ts,src/commands/doctor-legacy-config.migrations.test.tsmodels.providers.googleconfig beyond filling missing fields in the legacy migration pathRisks and Mitigations