Skip to content

Commit a00df31

Browse files
baxenbenthecarman
authored andcommitted
Disable tool pair summarization (aaif-goose#7481)
1 parent 460e324 commit a00df31

File tree

1 file changed

+11
-0
lines changed
  • crates/goose/src/context_mgmt

1 file changed

+11
-0
lines changed

crates/goose/src/context_mgmt/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ use tracing::log::warn;
1818

1919
pub const DEFAULT_COMPACTION_THRESHOLD: f64 = 0.8;
2020

21+
/// Feature flag to enable/disable tool pair summarization.
22+
/// Set to `false` to disable summarizing old tool call/response pairs.
23+
/// TODO: Re-enable once tool summarization stability issues are resolved.
24+
const ENABLE_TOOL_PAIR_SUMMARIZATION: bool = false;
25+
2126
const CONVERSATION_CONTINUATION_TEXT: &str =
2227
"Your context was compacted. The previous message contains a summary of the conversation so far.
2328
Do not mention that you read a summary or that conversation summarization occurred.
@@ -509,6 +514,12 @@ pub fn maybe_summarize_tool_pair(
509514
cutoff: usize,
510515
) -> JoinHandle<Option<(Message, String)>> {
511516
tokio::spawn(async move {
517+
// Tool pair summarization is currently disabled via feature flag.
518+
// See ENABLE_TOOL_PAIR_SUMMARIZATION constant above.
519+
if !ENABLE_TOOL_PAIR_SUMMARIZATION {
520+
return None;
521+
}
522+
512523
if let Some(tool_id) = tool_id_to_summarize(&conversation, cutoff) {
513524
match summarize_tool_call(provider.as_ref(), &session_id, &conversation, &tool_id).await
514525
{

0 commit comments

Comments
 (0)