{"record":{"id":"fa15490e51a3ffaa","repo":"zed-industries/zed","slug":"provider-does-not-support-explicit-compaction","errorCode":null,"errorMessage":"{provider} does not support explicit compaction","messagePattern":"(.+?) does not support explicit compaction","errorType":"exception","errorClass":"LanguageModelCompletionError","httpStatus":null,"severity":"error","filePath":"crates/language_model/src/language_model.rs","lineNumber":160,"sourceCode":"    /// models (e.g. Claude Fable 5) always think and cannot honor an \"off\"\n    /// request. Only meaningful when `supports_thinking` returns `true`.\n    fn supports_disabling_thinking(&self) -> bool {\n        true\n    }\n\n    fn supports_fast_mode(&self) -> bool {\n        false\n    }\n\n    /// Returns the list of supported effort levels that can be used when thinking.\n    fn supported_effort_levels(&self) -> Vec<LanguageModelEffortLevel> {\n        Vec::new()\n    }\n\n    /// Returns the default effort level to use when thinking.\n    fn default_effort_level(&self) -> Option<LanguageModelEffortLevel> {\n        self.supported_effort_levels()\n            .into_iter()\n            .find(|effort_level| effort_level.is_default)\n    }\n\n    /// Whether this model supports provider-side automatic context\n    /// compaction (requested via `LanguageModelRequest::compact_at_tokens`).\n    fn supports_server_side_compaction(&self) -> bool {\n        false\n    }\n\n    fn supports_explicit_compaction(&self) -> bool {\n        false\n    }\n\n    /// Whether native compaction honors `LanguageModelRequest::max_output_tokens`.\n    fn supports_explicit_compaction_output_limit(&self) -> bool {\n        false\n    }\n","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/language_model/src/language_model.rs#L142-L178","documentation":"Default trait-method guard in LanguageModel::compact: the base implementation always fails because a provider that hasn't overridden supports_explicit_compaction/compact does not implement provider-side explicit compaction. Calling compact on such a model (via {provider}) is a programming/configuration error — the caller should have checked supports_explicit_compaction first. Sentinel: fires whenever compact is invoked on a model whose provider uses the default trait implementation.","triggerScenarios":"Thrown at crates/language_model/src/language_model.rs:160 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check `supports_explicit_compaction()` before calling compact and skip or use client-side compaction instead","Implement compact on the provider if it should support explicit compaction","Choose a model that supports explicit compaction for workflows that require it"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}