You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a flag to disable page-type classification (dit model download) when using -json/-csv #2543
Current Behavior:
Passing -json (or -csv/-fpt) unconditionally initializes the dit page-type classifier (runner.go, if options.JSONOutput || options.CSVOutput || len(options.OutputFilterPageType) > 0 { dit.New() }). On a machine with no cached model, dit.New() downloads a ~92 MB model.json from Hugging Face (ModelURL in happyhackingspace/dit), logging INFO Model downloaded size=92.6MB to stderr.
There is no flag or env var to opt out.
Expected Behavior:
A flag (e.g. -no-classify) to use -json/-csv output without page-type classification, leaving ditClassifier unset classifyPage already early-returns when r.ditClassifier == nil, so it looks like a one-line guard.
Observe httpx downloads the ~92 MB model and logs Model downloaded size=... — with no way to disable it.
Anything else:
We consume only core JSON fields (not page_type/forms), but must pass -json to parse output, which forces the classifier and its model download.
Workaround is pre-seeding ~/.dit/model.json (even {}), but an opt-out flag would be cleaner.
Adds -no-classify so -json/-csv can skip the dit classifier and the model download. CodeRabbit caught that -nc already belongs to -no-color, so the short form was dropped. Unit tests and README are included.
Activity
jatinder14 commentedon Jul 25, 2026
Update: PR is up at #2544
Adds
-no-classifyso-json/-csvcan skip the dit classifier and the model download. CodeRabbit caught that-ncalready belongs to-no-color, so the short form was dropped. Unit tests and README are included.jalilm commentedon Jul 26, 2026
thanks for the quick action, do you think you will release a minor version containing this flag?
feat: add -kb to make page type classification opt-in
feat: add -kb to make page type classification opt-in