How to use dsh-plugin-mineru
Package MinerU document parsing service as a DSH model tool, enabling AI to directly read PDF, images, Word, PPT, Excel content and convert to Markdown.
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
dsh-plugin-mineru
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add @huanlin/dsh-plugin-mineru
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
FAQ
Can I parse documents directly after installing this plugin?
No. The plugin merely forwards requests to the MinerU FastAPI service. You must first deploy your own MinerU instance (the server mentioned in README.md:13-26), then change the baseURL to your MinerU address in the DSH GUI settings page; the default http://localhost:18000 will not automatically start the service.
Is an API Key required?
Not required. The MinerU open-source server has no built-in authentication, so leave it empty (src/client.ts:7-9); only if you deploy a commercial version of MinerU that requires authentication do you need to fill in apiKeyEnv (which by default reads the environment variable named MINERU_API_KEY). The plugin will send it as a Bearer token (src/index.ts:73-93).
Will large documents be truncated?
Yes, but the full content is preserved. mineru_parse_document and mineru_get_parse_result return up to 200,000 characters of inline markdown to the model by default; excess content is truncated and written to the OS's temporary directory tmpdir()/mineru-
How do I choose between pipeline, vlm-engine, and hybrid-engine?
Default pipeline, no VLM model or CPU required, suitable for most scenarios; hybrid-engine is MinerU's recommended engine but requires the VLM model to be loaded on the server side; vlm-engine uses VLM only; hybrid-http-client / vlm-http-client are HTTP client versions that connect to remote VLM services (src/index.ts:29 / AGENTS.md:43).
Can multiple documents be parsed concurrently?
Yes, but you need to use the three-step async process: use mineru_submit_parse_job to get multiple task_ids at once, poll with mineru_get_parse_status respectively, then get results with mineru_get_parse_result respectively; the model can do other work in between (src/tools.ts:292-371). Check the server's concurrent limit via mineru_health's max_concurrent_requests field (src/tools.ts:262-290).
What happens if I don't fill in end_page_id?
The default end_page_id is 99999, not "the last page of the PDF". MinerU simply ignores pages beyond the page number. If you only want the first few pages, pass specific integers (src/tools.ts:79 / AGENTS.md:47).
Do I need to restart DSH after changing the configuration?
No. Settings are hot-reloaded immediately after saving: the plugin replaces the MinerUClient instance in memory and rebuilds the parsing configuration; the 5 registered model tools read the latest values through getters, and the next request uses the new configuration (src/index.ts:102-106 / src/rpc.ts:132-133 / src/client/SettingsPage.tsx:57-77).
Can task IDs be used across sessions?
Not recommended. MinerU server only keeps task results for 24 hours; caching task_ids in long sessions may result in 404 or empty responses after cleanup; it's safer to use and discard, then resubmit (AGENTS.md:46).
What file types are supported?
PDF, PNG, JPG/JPEG, GIF, BMP, TIFF/TIF, WebP, DOCX, PPTX, XLSX - 11 extensions in total (src/client.ts:93-110). Other extensions are sent as application/octet-stream, and file paths must be absolute paths readable by the host machine (src/tools.ts:301-305).
— source: plugin_wiki.faq_json
Compatibility
- DSH: 0.0.1-rc.1+ (peerDeps 推导)
- Node: >=18.0.0
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule