dspy-typesafeify: one decorator routes DSPy Signatures through Typesafe's typed inference

lateinteraction · x · 2026-09-16

dspy-typesafeify is a deliberately stripped-down proof-of-concept fork of DSPy testing one idea: can a normal DSPy Signature opt into Typesafe's typed inference path with a single decorator while app code keeps calling dspy.Predict as before? Usage is minimal — decorate the Signature with @typesafeify, optionally declaring scorefields like [1,5] and Literal-typed output fields (e.g. ticket-owning team), keeping the integration diff tiny. DSPy maintainer dotpem endorsed it, and others proposed a joint DSPy × Typesafe hackathon.

Related event: dspy-typesafeify: One Decorator Adds Typed Inference to DSPy(4 posts)→

Original post →

More from coding & agent

coding & agent channel →