diff --git a/src/agent/loop_.rs b/src/agent/loop_.rs index 07fd02fa3..c464dc044 100644 --- a/src/agent/loop_.rs +++ b/src/agent/loop_.rs @@ -336,6 +336,10 @@ tokio::task_local! { static TOOL_LOOP_CANARY_TOKENS_ENABLED: bool; } +tokio::task_local! { + pub(crate) static TOOL_CHOICE_OVERRIDE: Option; +} + const AUTO_CRON_DELIVERY_CHANNELS: &[&str] = &[ "telegram", "discord", diff --git a/src/peripherals/mod.rs b/src/peripherals/mod.rs index 078e6f9cb..6b3c21601 100644 --- a/src/peripherals/mod.rs +++ b/src/peripherals/mod.rs @@ -236,6 +236,7 @@ pub async fn create_peripheral_tools(_config: &PeripheralsConfig) -> Result Vec> { if !config.enabled || config.boards.is_empty() { return Vec::new(); @@ -248,6 +249,11 @@ pub fn create_board_info_tools(config: &PeripheralsConfig) -> Vec> ] } +#[cfg(not(feature = "hardware"))] +pub fn create_board_info_tools(_config: &PeripheralsConfig) -> Vec> { + Vec::new() +} + #[cfg(test)] mod tests { use super::*; diff --git a/src/providers/anthropic.rs b/src/providers/anthropic.rs index e8004d6ae..0a77e75c8 100644 --- a/src/providers/anthropic.rs +++ b/src/providers/anthropic.rs @@ -1239,6 +1239,7 @@ mod tests { }], temperature: 0.7, tools: None, + tool_choice: None, }; let json = serde_json::to_string(&req).unwrap();