Skip to content

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

fix(ingestion): pass the MinerU timeout to the MonkeyOCR file_parse upload (#21930)

CCLUCKYd2353a8c368b
diff --git a/internal/ingestion/component/pdf_vision_dispatch.go b/internal/ingestion/component/pdf_vision_dispatch.go
index 450b25b4eb..a378345f6d 100644
--- a/internal/ingestion/component/pdf_vision_dispatch.go
+++ b/internal/ingestion/component/pdf_vision_dispatch.go
@@ -840,8 +840,12 @@ func dispatchMonkeyOCRPDF(
return parser.ParseResult{}, err
}
+ // The MonkeyOCR adapter fronts the same MinerU-compatible /file_parse API,
+ // so it shares the MinerU timeout resolution (default 30m) that
+ // mineruStreamParse was already written against.
+ timeout := mineruRequestTimeout(setup, apiConfig)
extraction := mineruExtractionOptions{formulaEnable: true, tableEnable: true}
- zipBytes, err := mineruStreamParse(ctx, apiURL, apiKeyRaw, binary, parseMethod, mineruLang, backend, serverURL, extraction)
+ zipBytes, err := mineruStreamParse(ctx, apiURL, apiKeyRaw, binary, parseMethod, mineruLang, backend, serverURL, extraction, timeout)
if err != nil {
return parser.ParseResult{}, fmt.Errorf("parser: MonkeyOCR stream: %w", err)
}