Optimize tool summarization (#7938)

Co-authored-by: Michael Neale <michael.neale@gmail.com>
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2026-03-18 09:09:18 -04:00
committed by GitHub
parent 493566dff2
commit 475968db64
7 changed files with 458 additions and 177 deletions
+8
View File
@@ -622,6 +622,14 @@ pub trait Provider: Send + Sync {
false
}
/// Whether the provider manages its own conversation context (e.g. CLI
/// wrappers like Claude Code or Gemini CLI). When true, goose-side
/// context management such as tool-pair summarization is skipped because
/// the provider's internal state is the source of truth.
fn manages_own_context(&self) -> bool {
false
}
async fn supports_cache_control(&self) -> bool {
false
}
@@ -637,6 +637,10 @@ impl Provider for ClaudeCodeProvider {
&self.name
}
fn manages_own_context(&self) -> bool {
true
}
fn get_model_config(&self) -> ModelConfig {
self.model.clone()
}
+4
View File
@@ -185,6 +185,10 @@ impl Provider for GeminiCliProvider {
&self.name
}
fn manages_own_context(&self) -> bool {
true
}
fn get_model_config(&self) -> ModelConfig {
self.model.clone()
}