Skip to content

DeepSeek cache hit rate <10% after 6.x upgrade - boundary-aware caching breaks prefix matching #94518

Description

@xiep-dot

Environment

  • OpenClaw version: 2026.6.8 (upgraded from 2026.5.28)
  • Model: DeepSeek V4 Flash / V4 Pro
  • API type: openai-completions
  • Provider: Direct DeepSeek API (api.deepseek.com)

Problem

After upgrading from 2026.5.28 to 2026.6.x, the DeepSeek prompt cache hit rate collapsed from ~95% to <10%. Token costs spike ~10x.

Root Cause

The 6.x boundary-aware caching system splits the system prompt into "stable prefix + variable suffix". This works for Anthropic/OpenAI but breaks DeepSeek prefix-matching cache: splitting the prefix prevents DeepSeek from matching any previously cached prefix.

Already Tried

  1. compat.supportsPromptCacheKey: true - No effect. DeepSeek does not use prompt_cache_key. Confirmed in PR fix(deepseek): enable prompt cache key in model catalog #92565.
  2. No config option exists to disable boundary-aware caching for specific providers.

Related Closed Issues

Request

Please add a config option like disableBoundaryAwareCache in model compat to let DeepSeek users opt out of the split, or apply a provider-specific fix (similar to opencode PR #31867 - move dynamic content to user message instead of system context).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.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.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions