Skip to main content

strip_prior_reasoning

Function strip_prior_reasoning 

Source
fn strip_prior_reasoning(body: &mut Value) -> bool
Expand description

Stage 1 — scrub reasoning artefacts from prior assistant turns.

Thin wrapper over strip_thinking_debt, which owns the scrub rules; this exists only to locate the messages array and report whether anything changed. Reasoning models pattern-match their own past <think> traces when these are left in the history.