Node and Python bindings silently accept invalid output formats
Author: sanjayy0612Created Sep 9, 2026Updated Sep 9, 2026
Description
The Node and Python bindings accept unsupported output-format strings and silently resolve them to JSON. This differs from the WASM binding, which rejects unsupported values, and makes configuration typos difficult to detect.
Reproduction
Node.js:
const parser = new LiteParse({ outputFormat: "yaml" });
console.log(parser.config.outputFormat); // "json"Python:
parser = LiteParse(output_format="yaml")
print(parser.config.output_format) # "json"Expected behavior
Constructing a parser with an unsupported output format should fail with a clear error. Supported values are json, text, markdown, and the existing md alias.
Actual behavior
Any unrecognized value falls through to OutputFormat::Json.
Impact
A misspelled or unsupported format silently produces JSON instead of alerting the caller, potentially causing downstream processing to receive the wrong representation.
Source: run-llama/liteparse