Skip to content

Feature request: fallback model chain for compaction and LCM summaryModel #56781

Description

@liu51115

Problem

Compaction (agents.defaults.compaction.model) and LCM (plugins.entries.lossless-claw.config.summaryModel) each accept a single model. If that model is rate-limited or unavailable, compaction fails silently — sessions grow unbounded until the primary model recovers.

Agent chat has a proper fallback chain (agents.defaults.model.fallbacks), but compaction and LCM do not.

Proposed solution

Add an optional fallbacks array (same semantics as agents.defaults.model.fallbacks) to:

  • agents.defaults.compaction.fallbacks
  • plugins.entries.lossless-claw.config.summaryModelFallbacks (or similar)

When the primary compaction/summary model fails with 429, 500, or timeout (same triggers as agent model failover), OpenClaw should try the next model in the fallback list before giving up.

Use case

Primary: anthropic/claude-sonnet-4-6 (flat-rate MAX plan — free)
Fallback: openrouter/anthropic/claude-3.5-haiku (metered — only used on failure)

This lets users keep compaction on a free/cheap primary while having a paid safety net that only fires when needed.

Current workaround

None within OpenClaw. An external reverse proxy could implement the fallback, but that adds operational complexity and another failure point.

Environment

OpenClaw 2026.3.13 (61d171a), macOS arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions