Merge pull request #3164 from petterreinholdtsen/llama.cpp-errors

fix: recover from llama.cpp context overflow and reqwest SSE decode failures
This commit is contained in:
Bellman
2026-06-05 10:25:54 +09:00
committed by GitHub
2 changed files with 104 additions and 4 deletions

View File

@@ -204,6 +204,13 @@ where
self
}
/// Update the auto-compaction threshold after construction. This allows the
/// caller to tune the threshold based on runtime information (e.g., the
/// server-returned context window size from a 400 error).
pub fn set_auto_compaction_input_tokens_threshold(&mut self, threshold: u32) {
self.auto_compaction_input_tokens_threshold = threshold;
}
#[must_use]
pub fn with_hook_abort_signal(mut self, hook_abort_signal: HookAbortSignal) -> Self {
self.hook_abort_signal = hook_abort_signal;