From 3c128ef83fe23c7bb551e2a8d77df40d3da528f9 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 7 May 2025 13:08:38 -0700 Subject: [PATCH] Avoid empty schema in copilot dummy tool (#30178) Copilot chat still returns a 400 if the dummy tool uses the `{}` schema. This is a follow-up to https://github.com/zed-industries/zed/pull/30007. Release Notes: - Fixed a bug where agent edits would fail when using GitHub Copilot Chat. Co-authored-by: Agus Zubiaga --- crates/language_models/src/provider/copilot_chat.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/language_models/src/provider/copilot_chat.rs b/crates/language_models/src/provider/copilot_chat.rs index f1cf43c061..94b45e4541 100644 --- a/crates/language_models/src/provider/copilot_chat.rs +++ b/crates/language_models/src/provider/copilot_chat.rs @@ -526,7 +526,9 @@ impl CopilotChatLanguageModel { function: copilot::copilot_chat::Function { name: "noop".to_string(), description: "No operation".to_string(), - parameters: serde_json::json!({}), + parameters: serde_json::json!({ + "type": "object" + }), }, }); }