pub fn session_model<'a>(
request: Option<&'a str>,
config: Option<&'a str>,
) -> Option<(&'a str, PinSource)>Expand description
The model a coder session actually runs on, and which file said so.
The per-session pin wins; a blank one is “unset” rather than “pin the empty
model”. None from both means unpinned — adaptive routing picks per
request, and nothing before the run can say what it will pick.
The config arm is NOT trimmed, only blank-filtered (CoderConfig’s
model is normalized that way at parse). Documented rather than fixed
because this is now the single copy and a padded value reaches the engine
padded — the callers have always behaved this way.
One copy on purpose. Three callers need this answer — coder.start,
car code-task, and the self-heal loop’s “the coder may not sit on the
review panel” check — and heal passes heal.toml’s coder_model as the
request pin, so an ABSENT coder_model does not mean “unpinned”, it means
“whatever this file says”. Re-deriving the rule in the check read only the
first source and let a coder that was also a review seat through (car#1360).