WMC001

Results comments of WMC001

LGTM. LiteLLM integration follows the existing provider pattern. No issues found.

The image extraction logic from PDF files is a useful addition. Please ensure edge cases (corrupted images, unsupported formats) are handled gracefully and covered by tests.

**Bug 3: `chunks_count` assertion is now wrong** `test/backend/services/test_data_process_service.py` line 2123 — the test asserts `result["chunks_count"] == 3`, but the implementation now returns `len(text_chunks) + len(images_chunks)`. With the mock returning `text_chunks=2`...

Context management improvements look solid. Will do a detailed line-level review once the diff is fully loaded. Overall direction is good — the separation of context window management from the...

**Bug: test passes removed parameter** In `test/backend/utils/test_context_component_types.py` line 1108, `test_kb_not_duplicated_in_tools` calls `build_tools_component` with the removed parameter `knowledge_base_summary`: ```python comp = build_tools_component( tools={"t": MockTool()}, knowledge_base_summary="KB text", #

**Bug: `assert_any_call` changes assertion semantics** In `test/backend/agents/test_create_agent_info.py` line 2804, the change from `mock_logger.error.assert_called_with(...)` to `mock_logger.error.assert_any_call(...)` weakens the test. The original assertion verifies that error was logged **exactly once** with that...

![Image](https://github.com/user-attachments/assets/e71e3bcd-de7d-498b-a5af-e866963d7b35)

![Image](https://github.com/user-attachments/assets/cea95a75-7978-4498-96ba-aee86a1bb89d) 测试发现未输出代码