R77-A1: 修复腾讯OCR的PDF识别链路

这个提交包含在:
2026-04-29 09:38:31 +08:00
父节点 80b1c31037
当前提交 b892f2f5bf
共修改 3 个文件,包含 106 行新增和 19 行删除
+2 -2
查看文件
@@ -34,7 +34,7 @@ function buildMissingRequiredOcrError(ocrType, normalized) {
return `missing_required_fields:${missingFields.join(",")}`;
}
async function runOcrForInvoice({ config, ocrType, imageBase64 }) {
async function runOcrForInvoice({ config, ocrType, imageBase64, sourceMimeType }) {
if (config.ocrProvider === "mock") {
return runMockOcr({ ocrType, imageBase64 });
}
@@ -47,7 +47,7 @@ async function runOcrForInvoice({ config, ocrType, imageBase64 }) {
throw new Error(`Unsupported OCR type: ${ocrType}`);
}
return runTencentVatOcr(config, imageBase64);
return runTencentVatOcr(config, { imageBase64, sourceMimeType });
}
module.exports = {