zed-industries/zed · error
this OpenAI model does not support explicit compaction
Error message
this OpenAI model does not support explicit compaction
What it means
Guard in OpenAiLanguageModel::compact: explicit compaction was requested for a model whose supports_compaction() is false, so the provider refuses before calling the API rather than sending an unsupported compaction request.
Source
Thrown at crates/language_models/src/provider/open_ai.rs:556
self.model.supports_priority()
}
fn supports_server_side_compaction(&self) -> bool {
self.model.supports_compaction()
}
fn supports_explicit_compaction(&self) -> bool {
self.model.supports_compaction()
}
fn compact(
&self,
mut request: LanguageModelRequest,
cx: &AsyncApp,
) -> BoxFuture<'static, Result<CompactionResult, LanguageModelCompletionError>> {
if !self.supports_explicit_compaction() {
return async {
Err(LanguageModelCompletionError::Other(anyhow::anyhow!(
"this OpenAI model does not support explicit compaction"
)))
}
.boxed();
}
normalize_open_ai_response_thinking_effort(&mut request, &self.model);
let request = match into_open_ai_response(
request,
self.model.id(),
self.model.supports_parallel_tool_calls(),
self.model.supports_prompt_cache_key(),
self.max_output_tokens(),
default_thinking_reasoning_effort(&self.model),
self.model
.supported_reasoning_efforts()
.contains(&open_ai::ReasoningEffort::None),
&OPEN_AI_PROVIDER_ID,View on GitHub (pinned to 5a9b9558db)
Solutions
- Use an OpenAI model that supports server-side compaction
- Fall back to client-side summarization/context trimming for this model
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/language_models/src/provider/open_ai.rs:555 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20).
Data as JSON: /api/errors/4b9fe11e26a5ad14.
Report an issue: GitHub.