Skip to content

[Upstream PR #194] Add DeepSeek prefix-cache stability mode #145

@quangdang46

Description

@quangdang46

Mirrored from upstream 1jehuang/jcodePull Request #194 by @sternelee
Original state: open
Created: 2026-05-11T13:48:18Z · Updated: 2026-05-16T12:46:35Z
Diff: https://github.com/1jehuang/jcode/pull/194.diff
This issue is an auto-mirrored copy. Comments and edits here are local to quangdang46/jcode — do not expect them to propagate upstream.


Adapt Reasonix Pillar 1 design for jcode's profile=deepseek path:

  • New prefix_cache_stable module with preflight checks, turn-end tool result truncation (3k token cap), and post-usage fold decisions at 50%/70%/80% thresholds.

  • CacheTracker gains cache-hit-rate tracking (record_usage, cache_hit_summary) so sessions can monitor prefix-cache effectiveness.

  • Agent messages_for_provider truncates oversized tool results when deepseek profile is active, without touching persisted session history.

  • Turn loop emits preflight warnings before API calls and periodic cache-hit summaries every 5 turns.


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions