agentscope-java icon indicating copy to clipboard operation
agentscope-java copied to clipboard

[Bug]: Snapshot overflow recovery ignores the dedicated summary model

Open kevinvv03 opened this issue 1 week ago • 0 comments

Describe the bug

In snapshot mode (journalEnabled(false)), emergency compaction ignores CompactionConfig.model(...) and uses the Agent's default model. Recovery can fail even when the dedicated summary model can handle the history.

To Reproduce

  1. Configure default model A and dedicated compaction model B in snapshot mode.
  2. Load reducible history below proactive compaction thresholds, then trigger a provider context overflow. The summary input should fit B but exceed A.
  3. Call the agent and observe which model receives the emergency summary request.

Expected behavior

Use B for emergency summarization. If no dedicated model is configured, use the build-time default.

Error messages

Local regression: context_length_exceeded; emergency summary calls: A=1, B=0.

Environment

  • AgentScope-Java: 2.1.0-SNAPSHOT, main@decbe5500
  • Java: 21.0.11
  • OS: macOS 26.2, aarch64

kevinvv03 avatar Nov 23 '26 15:11 kevinvv03