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.

Fix compaction happening too early for chatgpt_subscribed (#59686)

Jiby Jose471fb15d7a23
diff --git a/crates/language_models/src/provider/openai_subscribed.rs b/crates/language_models/src/provider/openai_subscribed.rs
index 66febda01b3..3cddb57d7e5 100644
--- a/crates/language_models/src/provider/openai_subscribed.rs
+++ b/crates/language_models/src/provider/openai_subscribed.rs
@@ -322,15 +322,17 @@ impl ChatGptModel {
}
fn max_token_count(&self) -> u64 {
- // All Codex-supported models share the backend's 272K input cap, even
- // when the raw model exposes a larger context window via the public
- // API (e.g. gpt-5.4 has max_context_window 1M, but the Codex backend
- // caps it at 272K). Source: openai/codex models-manager/models.json.
+ // All Codex-supported models use a 272K context window in the Codex
+ // backend, even when the raw model exposes a larger context window via the
+ // public API (e.g. gpt-5.4 has max_context_window 1M, but Codex uses
+ // context_window 272K). Source: openai/codex models-manager/models.json.
272_000
}
fn max_output_tokens(&self) -> Option<u64> {
- Some(128_000)
+ // Codex model metadata does not expose a max output token cap for these
+ // models. Source: openai/codex models-manager/models.json.
+ None
}
fn supports_images(&self) -> bool {