Skip to content

fix: migrate legacy llm_compress_keep_recent config #8598

@zouyonghe

Description

@zouyonghe

What to build

Migrate existing user configs from the legacy provider_settings.llm_compress_keep_recent key to provider_settings.llm_compress_keep_recent_ratio so upgrades do not silently lose the user's context compression preference.

Acceptance criteria

  • Existing configs with llm_compress_keep_recent and no llm_compress_keep_recent_ratio receive a deterministic migrated ratio.
  • The old key is removed only after the new value is populated.
  • Existing configs that already have llm_compress_keep_recent_ratio are not overwritten.
  • Tests cover legacy-only, both-keys-present, and invalid legacy value cases.

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:providerThe bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions