Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: MinerU vlm-http-client backend output file detection (#14240)

刘康伟c6e3a2e713c1
diff --git a/deepdoc/parser/mineru_parser.py b/deepdoc/parser/mineru_parser.py
index 90c33573ce..b369f9122a 100644
--- a/deepdoc/parser/mineru_parser.py
+++ b/deepdoc/parser/mineru_parser.py
@@ -539,6 +539,21 @@ class MinerUParser(RAGFlowPdfParser):
if nested_alt.exists():
subdir = nested_alt.parent
json_file = nested_alt
+ else:
+ # Try vlm subdirectory (for vlm-http-client backend)
+ vlm_path = output_dir / "vlm" / f"{file_stem}_content_list.json"
+ self.logger.info(f"[MinerU] Trying vlm subdirectory: {vlm_path}")
+ attempted.append(vlm_path)
+ if vlm_path.exists():
+ subdir = vlm_path.parent
+ json_file = vlm_path
+ else:
+ vlm_safe = output_dir / "vlm" / f"{safe_stem}_content_list.json"
+ self.logger.info(f"[MinerU] Trying vlm subdirectory with sanitized name: {vlm_safe}")
+ attempted.append(vlm_safe)
+ if vlm_safe.exists():
+ subdir = vlm_safe.parent
+ json_file = vlm_safe
if not json_file:
parse_subdir = None