Currently we use small Pydantic models (e.g. handlers.llm.harness.synthesis.body.SynthesizedFunction) as the model-side representation of code-derived objects, e.g. function-valued Skill outputs. Complying with the schemas associated with these is surprisingly hard for LLMs/providers like ds4 that don't implement exact structured output decoding, because then the LLM itself is forced to deal with escape characters in JSON. After #771 #770 we should generalize the pattern in handlers.llm.harness.synthesis.snippet and just use bare str plus PlainSerializer/BeforeValidator annotations for all of these types.
Currently we use small Pydantic models (e.g.
handlers.llm.harness.synthesis.body.SynthesizedFunction) as the model-side representation of code-derived objects, e.g. function-valuedSkilloutputs. Complying with the schemas associated with these is surprisingly hard for LLMs/providers like ds4 that don't implement exact structured output decoding, because then the LLM itself is forced to deal with escape characters in JSON. After #771 #770 we should generalize the pattern inhandlers.llm.harness.synthesis.snippetand just use barestrplusPlainSerializer/BeforeValidatorannotations for all of these types.