I'm not familiar with how TypeChat works, but Guidance [1] is another similar project that can actually integrate into the token sampling to enforce formats.
Here’s an example of one of my implementations of logit bias.
https://github.com/ShelbyJenkins/shelby-as-a-service/blob/74...