Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

chore(llm): update model defaults and request diagnostics

myhloli8dfd5c746878
diff --git a/.gitignore b/.gitignore
index f5824f1c..95ebe043 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,4 +68,7 @@ output/
.e2e/
htmlcov/
-.zcode/
\ No newline at end of file
+.zcode/
+
+# Playwright 浏览器验证产生的临时快照与日志
+.playwright-cli/
diff --git a/docs/en/usage/quick_usage.md b/docs/en/usage/quick_usage.md
index 71dd6d3a..60a57a43 100644
--- a/docs/en/usage/quick_usage.md
+++ b/docs/en/usage/quick_usage.md
@@ -100,7 +100,7 @@ LLM-aided title leveling and cross-page table cell continuation read `$MINERU_HO
llm_aided:
api_key: ${MINERU_LLM_API_KEY:-}
base_url: https://dashscope.aliyuncs.com/compatible-mode/v1
- model: qwen3.5-plus
+ model: qwen3.8-flash
enable_thinking: false
max_concurrency: 16
features:
diff --git a/docs/next/config.md b/docs/next/config.md
index 96530129..8eb458fd 100644
--- a/docs/next/config.md
+++ b/docs/next/config.md
@@ -119,7 +119,7 @@ PDF 的 LLM 辅助后处理同样读取启动前 `config.yaml`:
llm_aided:
api_key: ${MINERU_LLM_API_KEY:-}
base_url: https://dashscope.aliyuncs.com/compatible-mode/v1
- model: qwen3.5-plus
+ model: qwen3.8-flash
enable_thinking: false
max_concurrency: 16
features:
diff --git a/docs/zh/usage/quick_usage.md b/docs/zh/usage/quick_usage.md
index 70c900fd..6e365a47 100644
--- a/docs/zh/usage/quick_usage.md
+++ b/docs/zh/usage/quick_usage.md
@@ -100,7 +100,7 @@ LLM 辅助标题分级和跨页表格单元格续接读取 `$MINERU_HOME/config.
llm_aided:
api_key: ${MINERU_LLM_API_KEY:-}
base_url: https://dashscope.aliyuncs.com/compatible-mode/v1
- model: qwen3.5-plus
+ model: qwen3.8-flash
enable_thinking: false
max_concurrency: 16
features:
diff --git a/mineru/backend/postprocess/llm_client.py b/mineru/backend/postprocess/llm_client.py
index 3dab47f8..4128f33b 100644
--- a/mineru/backend/postprocess/llm_client.py
+++ b/mineru/backend/postprocess/llm_client.py
@@ -5,6 +5,7 @@ from __future__ import annotations
import asyncio
import inspect
+import uuid
from collections.abc import Callable
from typing import Any, TypeVar
@@ -58,10 +59,28 @@ class LLMAidedClient:
if self._config.enable_thinking is not None:
request_params["extra_body"] = {"enable_thinking": self._config.enable_thinking}
+ # 同一候选的重试复用请求标识,便于关联并发执行的完整请求和原始返回。
+ request_id = uuid.uuid4().hex
for attempt in range(1, _MAX_LLM_RETRIES + 1):
try:
async with self._semaphore:
+ logger.debug(
+ "LLM {} request id={} attempt={}/{} params={}",
+ operation,
+ request_id,
+ attempt,
+ _MAX_LLM_RETRIES,
+ request_params,
+ )
completion = await self._client.chat.completions.create(**request_params)
+ logger.debug(
+ "LLM {} response id={} attempt={}/{} completion={}",
+ operation,
+ request_id,
+ attempt,
+ _MAX_LLM_RETRIES,
+ completion,
+ )
content = self._extract_message_content(completion)
parsed = json_repair.loads(content)
validated = validator(parsed)
diff --git a/mineru/config.py b/mineru/config.py
index 09b18028..056378fd 100644
--- a/mineru/config.py
+++ b/mineru/config.py
@@ -483,7 +483,7 @@ class LLMAidedConfig(BaseModel):
api_key: str = Field(default="", repr=False)
base_url: str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
- model: str = "qwen3.5-plus"
+ model: str = "qwen3.8-flash"
enable_thinking: bool | None = None
max_concurrency: int = Field(default=16, ge=1)
features: LLMAidedFeaturesConfig = Field(default_factory=LLMAidedFeaturesConfig)
diff --git a/tests/unittest/test_doclib_config.py b/tests/unittest/test_doclib_config.py
index 94604f42..c16675c3 100644
--- a/tests/unittest/test_doclib_config.py
+++ b/tests/unittest/test_doclib_config.py
@@ -175,7 +175,7 @@ def test_llm_aided_config_defaults_to_disabled() -> None:
assert llm_config.api_key == ""
assert llm_config.base_url == "https://dashscope.aliyuncs.com/compatible-mode/v1"
- assert llm_config.model == "qwen3.5-plus"
+ assert llm_config.model == "qwen3.8-flash"
assert llm_config.enable_thinking is None
assert llm_config.max_concurrency == 16
assert llm_config.features.title_leveling is False