chore: remove vector search tool selection strategy (#3933)

Co-authored-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
Wendy Tang
2025-08-17 20:56:27 -07:00
committed by GitHub
parent 28228d8b0b
commit b23559640a
15 changed files with 161 additions and 3035 deletions
+14 -27
View File
@@ -1179,7 +1179,7 @@ pub async fn configure_settings_dialog() -> Result<(), Box<dyn Error>> {
.item(
"goose_router_strategy",
"Router Tool Selection Strategy",
"Configure the strategy for selecting tools to use",
"Experimental: configure a strategy for auto selecting tools to use",
)
.item(
"tool_permission",
@@ -1300,40 +1300,27 @@ pub fn configure_goose_mode_dialog() -> Result<(), Box<dyn Error>> {
pub fn configure_goose_router_strategy_dialog() -> Result<(), Box<dyn Error>> {
let config = Config::global();
// Check if GOOSE_ROUTER_STRATEGY is set as an environment variable
if std::env::var("GOOSE_ROUTER_TOOL_SELECTION_STRATEGY").is_ok() {
let _ = cliclack::log::info("Notice: GOOSE_ROUTER_TOOL_SELECTION_STRATEGY environment variable is set. Configuration will override this.");
}
let strategy = cliclack::select("Which router strategy would you like to use?")
let enable_router = cliclack::select("Would you like to enable smart tool routing?")
.item(
"vector",
"Vector Strategy",
"Use vector-based similarity to select tools",
"true",
"Enable Router",
"Use LLM-based intelligence to select tools",
)
.item(
"default",
"Default Strategy",
"false",
"Disable Router",
"Use the default tool selection strategy",
)
.interact()?;
match strategy {
"vector" => {
config.set_param(
"GOOSE_ROUTER_TOOL_SELECTION_STRATEGY",
Value::String("vector".to_string()),
)?;
cliclack::outro(
"Set to Vector Strategy - using vector-based similarity for tool selection",
)?;
match enable_router {
"true" => {
config.set_param("GOOSE_ENABLE_ROUTER", Value::String("true".to_string()))?;
cliclack::outro("Router enabled - using LLM-based intelligence for tool selection")?;
}
"default" => {
config.set_param(
"GOOSE_ROUTER_TOOL_SELECTION_STRATEGY",
Value::String("default".to_string()),
)?;
cliclack::outro("Set to Default Strategy - using default tool selection")?;
"false" => {
config.set_param("GOOSE_ENABLE_ROUTER", Value::String("false".to_string()))?;
cliclack::outro("Router disabled - using default tool selection")?;
}
_ => unreachable!(),
};