agentscope-java
agentscope-java copied to clipboard
[Bug]: Snapshot overflow recovery ignores the dedicated summary model
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
- Configure default model A and dedicated compaction model B in snapshot mode.
- Load reducible history below proactive compaction thresholds, then trigger a provider context overflow. The summary input should fit B but exceed A.
- 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