pub fn suppress_unsupported_effort(
body: &mut Value,
ctx: &ModelContext,
decision: &mut SamplingDecision,
) -> Option<SuppressedEffort>Expand description
Remove a resolved reasoning_effort the observed template cannot read, and
return what was removed.
Returns None — leaving body and decision untouched — for every model
that is not a positive “this template does not read it”: unresolved
contexts, never-observed models, unreadable caps, caps that omit the field,
and templates that do read it. Also None when the ladder resolved no
effort at all, which is the ordinary case: nothing was going to be sent, so
nothing is suppressed and there is nothing to report.
On a suppression it does three things, and the second and third are the point:
- deletes the top-level key from
body; - clears
decision.resolved.reasoning_effort, because that field is documented as the values written into the body and this one no longer is; - rewrites
decision.sources.reasoning_efforttoParamSource::SuppressedByTemplate, so every provenance surface reports the suppression instead of naming the rung whose value did not survive.