Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix Gemini function calling (#27905)
Bennet Bo Fennerb158ee60cacc
diff --git a/crates/language_models/src/provider/google.rs b/crates/language_models/src/provider/google.rsindex a631038e8fd..3f74bbb7dc7 100644--- a/crates/language_models/src/provider/google.rs+++ b/crates/language_models/src/provider/google.rs@@ -472,19 +472,17 @@ pub fn into_google(top_k: None,}),safety_settings: None,- tools: Some(- request+ tools: Some(vec![google_ai::Tool {+ function_declarations: request.tools.into_iter()- .map(|tool| google_ai::Tool {- function_declarations: vec![FunctionDeclaration {- name: tool.name,- description: tool.description,- parameters: tool.input_schema,- }],+ .map(|tool| FunctionDeclaration {+ name: tool.name,+ description: tool.description,+ parameters: tool.input_schema,}).collect(),- ),+ }]),tool_config: None,}}