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:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user