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.

openai_subscribed: Use full context windows for subscription models (#62502)

Eric Holk6bd93fc31952
diff --git a/crates/openai_subscribed/src/openai_subscribed.rs b/crates/openai_subscribed/src/openai_subscribed.rs
index c6464a5bf95..4b50fcce9f9 100644
--- a/crates/openai_subscribed/src/openai_subscribed.rs
+++ b/crates/openai_subscribed/src/openai_subscribed.rs
@@ -295,17 +295,19 @@ impl ChatGptModel {
}
}
+ /// Subscription requests are billed by OpenAI, so use the models' full
+ /// public API context windows instead of long-context pricing thresholds.
fn max_token_count(&self) -> u64 {
match self {
- Self::Gpt56Sol | Self::Gpt56Terra | Self::Gpt56Luna => 372_000,
- Self::Gpt55 | Self::Gpt54 | Self::Gpt54Mini => 272_000,
+ Self::Gpt56Sol | Self::Gpt56Terra | Self::Gpt56Luna | Self::Gpt55 | Self::Gpt54 => {
+ 1_050_000
+ }
+ Self::Gpt54Mini => 400_000,
}
}
fn max_output_tokens(&self) -> Option<u64> {
- // Codex model metadata does not expose a max output token cap for these
- // models. Source: openai/codex models-manager/models.json.
- None
+ Some(128_000)
}
fn supports_images(&self) -> bool {