Inspired by OpenRouter’s recently launched response healer (https://openrouter.ai/docs/guides/features/plugins/response-...), this implementation is model-agnostic and works with JSON from any LLM or text source, not just OpenRouter.
Includes comprehensive test cases and is designed to be easy to drop into existing pipelines that rely on structured LLM output.
https://www.npmjs.com/package/@freakynit/json-healer
Feedback welcome!