Skip to content

doctor --fix does not auto-migrate invalid bailian compat.thinkingFormat enum values after upgrade #77803

Description

@JIRBOY

Bug Description

After upgrading OpenClaw, all configured bailian models have an invalid compat.thinkingFormat value. openclaw doctor --fix does not automatically migrate these values to the new allowed enum, causing --fix to fail with a config validation error.

Reproduction Steps

  1. Have a pre-upgrade config with bailian models configured (e.g. models.providers.bailian.models).
  2. Upgrade OpenClaw to a version where thinkingFormat only allows ["openai", "openrouter", "deepseek", "zai"].
  3. Run openclaw doctor — it reports:

    Invalid config: models.providers.bailian.models.0.compat.thinkingFormat: Invalid input (allowed: "openai", "openrouter", "deepseek", "zai")
    (and the same for models 1, 2, 6, 7, 8 — 6 models total)

  4. Run openclaw doctor --fix.

Observed Behavior

  • --fix proceeds with other fixes but ultimately fails with exit code 1:

    Error: Config validation failed: models.providers.bailian.models.0.compat.thinkingFormat: Invalid input ...

  • The invalid enum values are not corrected or reset to a default.
  • Because --fix fails, none of the other fixes persist either (see related issue about atomic failure).

Expected Behavior

doctor --fix should detect invalid enum values in compat.thinkingFormat and either:

  • Reset them to a sensible default (e.g. "openai"), or
  • Prompt the user to choose from the allowed values, or
  • At minimum, remove the invalid field so the default applies.

This is a standard config-migration scenario that --fix is designed to handle.

Environment

  • OS: Windows 10 Education 10.0.19045
  • OpenClaw: just upgraded to latest

Additional Context

This affects 6 bailian models simultaneously, suggesting the old allowed values for thinkingFormat were broader and got narrowed in a recent release. Users with existing bailian configs will hit this on every upgrade.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions