diff --git a/router/src/lib.rs b/router/src/lib.rs index 7295a7a9388..76c1bf10135 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -1023,7 +1023,7 @@ pub enum ToolChoice { /// /// `none` is the default when no tools are present. `auto` is the default if tools are present." enum ToolTypeDeserializer { - /// `none` means the model will not call any tool and instead generates a message. + /// None means `null` was passed in the JSON, and the default choice is applied based on the presence of tools. Null, /// `auto` means the model can pick between generating a message or calling one or more tools. @@ -1038,7 +1038,7 @@ enum ToolTypeDeserializer { impl From for ToolChoice { fn from(value: ToolTypeDeserializer) -> Self { match value { - ToolTypeDeserializer::Null => ToolChoice::NoTool, + ToolTypeDeserializer::Null => ToolChoice::Auto, ToolTypeDeserializer::String(s) => match s.as_str() { "none" => ToolChoice::NoTool, "auto" => ToolChoice::Auto,