Skip subagents for gemini (#5257)
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
@@ -27,6 +27,7 @@ pub struct CreateDynamicTaskParams {
|
||||
|
||||
/// How to execute multiple tasks (default: parallel for multiple tasks, sequential for single task)
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[schemars(with = "Option<String>")]
|
||||
pub execution_mode: Option<ExecutionModeParam>,
|
||||
}
|
||||
|
||||
@@ -90,6 +91,18 @@ pub struct TaskParameter {
|
||||
pub return_last_only: Option<bool>,
|
||||
}
|
||||
|
||||
pub fn should_enabled_subagents(model_name: &str) -> bool {
|
||||
let config = crate::config::Config::global();
|
||||
let is_autonomous = config.get_param("GOOSE_MODE").unwrap_or("auto".to_string()) == "auto";
|
||||
if !is_autonomous {
|
||||
return false;
|
||||
}
|
||||
if model_name.starts_with("gemini") {
|
||||
return false;
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
pub fn create_dynamic_task_tool() -> Tool {
|
||||
let schema = schema_for!(CreateDynamicTaskParams);
|
||||
let schema_value =
|
||||
|
||||
Reference in New Issue
Block a user