Adapter

A solution adapter is the bridge between the raw text a model produces and the structured solution type your checker expects. It is just a callable (str) -> SolutionT; if it raises, the solver retries with the reformat prompt (see the LLM Backend Design).

adapter

SolutionAdapter

SolutionAdapter = Callable[[str], SolutionT]

Parses the model's raw text answer into the structured solution type the checker expects. A plain callable (str) -> SolutionT; raising from it makes the solver retry with the reformat prompt.