Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

copilot_chat: Set Copilot output config only when effort exists (#54103)

Ben Brandt223e4ae0e9c5
diff --git a/crates/language_models/src/provider/copilot_chat.rs b/crates/language_models/src/provider/copilot_chat.rs
index a77e3f880be..8b46c38f252 100644
--- a/crates/language_models/src/provider/copilot_chat.rs
+++ b/crates/language_models/src/provider/copilot_chat.rs
@@ -405,7 +405,10 @@ impl LanguageModel for CopilotChatLanguageModel {
if model.supports_adaptive_thinking() {
if anthropic_request.thinking.is_some() {
anthropic_request.thinking = Some(anthropic::Thinking::Adaptive);
- anthropic_request.output_config = Some(anthropic::OutputConfig { effort });
+ anthropic_request.output_config =
+ effort.map(|effort| anthropic::OutputConfig {
+ effort: Some(effort),
+ });
}
}