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.

Update Assistant context limits (#25087)

Peter Trippd1af7b132236
diff --git a/crates/copilot/src/copilot_chat.rs b/crates/copilot/src/copilot_chat.rs
index 14e1a4b2103..9bab354091d 100644
--- a/crates/copilot/src/copilot_chat.rs
+++ b/crates/copilot/src/copilot_chat.rs
@@ -91,12 +91,12 @@ impl Model {
pub fn max_token_count(&self) -> usize {
match self {
- Self::Gpt4o => 64000,
- Self::Gpt4 => 32768,
- Self::Gpt3_5Turbo => 12288,
- Self::O3Mini => 20000,
- Self::O1 => 20000,
- Self::Claude3_5Sonnet => 200_000,
+ Self::Gpt4o => 64_000,
+ Self::Gpt4 => 32_768,
+ Self::Gpt3_5Turbo => 12_288,
+ Self::O3Mini => 64_000,
+ Self::O1 => 20_000,
+ Self::Claude3_5Sonnet => 128_000,
Model::Gemini20Flash => 128_000,
}
}
diff --git a/crates/open_ai/src/open_ai.rs b/crates/open_ai/src/open_ai.rs
index b200da8ce0a..c62b1c2950d 100644
--- a/crates/open_ai/src/open_ai.rs
+++ b/crates/open_ai/src/open_ai.rs
@@ -142,15 +142,15 @@ impl Model {
pub fn max_token_count(&self) -> usize {
match self {
- Self::ThreePointFiveTurbo => 16385,
- Self::Four => 8192,
- Self::FourTurbo => 128000,
- Self::FourOmni => 128000,
- Self::FourOmniMini => 128000,
- Self::O1 => 200000,
- Self::O1Preview => 128000,
- Self::O1Mini => 128000,
- Self::O3Mini => 200000,
+ Self::ThreePointFiveTurbo => 16_385,
+ Self::Four => 8_192,
+ Self::FourTurbo => 128_000,
+ Self::FourOmni => 128_000,
+ Self::FourOmniMini => 128_000,
+ Self::O1 => 200_000,
+ Self::O1Preview => 128_000,
+ Self::O1Mini => 128_000,
+ Self::O3Mini => 200_000,
Self::Custom { max_tokens, .. } => *max_tokens,
}
}