Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
OpenAI: Fix GPT-4. Only include max_tokens when max_output_tokens provided (#17168)
Peter Tripp58c0f39714b8
diff --git a/crates/open_ai/src/open_ai.rs b/crates/open_ai/src/open_ai.rsindex ecb0828ee66..6be5327c04f 100644--- a/crates/open_ai/src/open_ai.rs+++ b/crates/open_ai/src/open_ai.rs@@ -120,14 +120,10 @@ impl Model {pub fn max_output_tokens(&self) -> Option<u32> {match self {- Self::ThreePointFiveTurbo => Some(4096),- Self::Four => Some(8192),- Self::FourTurbo => Some(4096),- Self::FourOmni => Some(4096),- Self::FourOmniMini => Some(16384),Self::Custom {max_output_tokens, ..} => *max_output_tokens,+ _ => None,}}}