Skip to content

chore: 移除 llm 模块并修复潜在的构建问题 - #3

Merged
Aliothmoon merged 5 commits into
MaaXYZ:devfrom
SherkeyXD:dev
Sep 11, 2026
Merged

chore: 移除 llm 模块并修复潜在的构建问题#3
Aliothmoon merged 5 commits into
MaaXYZ:devfrom
SherkeyXD:dev

Conversation

@SherkeyXD

@SherkeyXD SherkeyXD commented Sep 10, 2026

Copy link
Copy Markdown

Sourcery 摘要

移除已弃用的 LLM 服务和旧版 OCR 别名,同时加强构建和打包配置。

Bug 修复:

  • 通过记录回调函数的完整接管行为,保留自定义 ONNX Runtime 会话配置。
  • 通过更安全的路径处理、命令执行和归档提取方式,以及移除过时的打包配置,避免潜在的构建和打包问题。

增强功能:

  • 移除已弃用的 PPOCRSystemv5/PPOCRSystemv6 别名,同时保留对 PPOCRv5 和 PPOCRv6 流水线的支持。
  • 将 PPOCRv5 和 PPOCRv6 的构造函数及克隆实现移至源文件中,避免覆盖检测器或识别器配置。
  • 移除过时的 ONNX Runtime 和 CPack 配置文件,并更新平台构建标签以反映仅支持 CPU。

构建:

  • 简化支持的构建目标,并改进跨平台构建产物的打包行为。

杂项:

  • 移除已弃用的 services/llm 模块及其相关的客户端、服务器、容器和文档文件。
Original summary in English

Sourcery 摘要

移除已弃用的 LLM 和 OCR 兼容组件,同时强化构建与打包流程,并保留可配置的 OCR 和运行时行为。

错误修复:

  • 通过记录回调接管行为,保留调用方定义的 ONNX Runtime 会话设置。
  • 强化构建命令执行和归档提取,以降低构建和打包风险。

增强功能:

  • 将 PPOCRv5 和 PPOCRv6 的构造与克隆实现移出头文件,避免覆盖现有的检测器和识别器配置。
  • 移除已弃用的 PPOCRSystemv5 和 PPOCRSystemv6 别名,同时保留 PPOCRv5 和 PPOCRv6 流水线支持。
  • 移除过时的 ONNX Runtime 和 CPack 配置文件。

构建:

  • 简化受支持的构建目标,并改进跨平台产物打包。

CI:

  • 更新 macOS 和 Windows 工作流标签,以反映仅支持 CPU。

维护:

  • 移除已弃用的 services/llm 模块,包括其中的客户端、服务器、容器和文档。
Original summary in English

Summary by Sourcery

Remove deprecated LLM and OCR compatibility components while hardening the build and packaging workflow and preserving configurable OCR and runtime behavior.

Bug Fixes:

  • Preserve caller-defined ONNX Runtime session settings by documenting callback takeover behavior.
  • Harden build command execution and archive extraction to reduce construction and packaging risks.

Enhancements:

  • Move PPOCRv5 and PPOCRv6 construction and cloning implementations out of headers so existing detector and recognizer configurations are not overwritten.
  • Remove deprecated PPOCRSystemv5 and PPOCRSystemv6 aliases while retaining PPOCRv5 and PPOCRv6 pipeline support.
  • Remove obsolete ONNX Runtime and CPack configuration files.

Build:

  • Simplify supported build targets and improve cross-platform artifact packaging.

CI:

  • Update macOS and Windows workflow labels to reflect CPU-only support.

Chores:

  • Remove the deprecated services/llm module, including its clients, servers, containers, and documentation.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您好——我已经审阅了您的更改,整体看起来很棒!

已修复的安全问题

  • 将不受信任的输入传递给操作系统命令执行所导致的命令注入(链接
  • protobuf(链接

Sourcery 对开源项目免费——如果您喜欢我们的评审,请考虑分享它们 ✨
Original comment in English

Hey - I've reviewed your changes and they look great!

Fixed security issues:

  • Command injection from untrusted input passed to OS command execution (link)
  • protobuf (link)

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The tar fallback permits path traversal, and PPOCRv5/v6 still overwrite custom recognizer settings through PPOCRv4.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Removes the deprecated LLM service, modernizes OCR pipelines, and simplifies CPU-focused build packaging.

Changes:

  • Deletes the complete legacy LLM client/server stack.
  • Refactors PPOCRv5/v6 and removes deprecated aliases.
  • Hardens and simplifies build/package configuration.
File summaries
File Description
services/llm/server/server/utils.py Removes LLM server utilities.
services/llm/server/server/triton_server.py Removes Triton server.
services/llm/server/server/triton_server_helper.py Removes health checker.
services/llm/server/server/http_server/app.py Removes HTTP application.
services/llm/server/server/http_server/api.py Removes HTTP API.
services/llm/server/server/http_server/adapter_openai.py Removes OpenAI adapter.
services/llm/server/server/http_server/__init__.py Removes HTTP package.
services/llm/server/server/engine/token_processor.py Removes token processor.
services/llm/server/server/engine/task_queue_manager.py Removes task queue.
services/llm/server/server/engine/resource_manager.py Removes resource manager.
services/llm/server/server/engine/infer.py Removes inference runner.
services/llm/server/server/engine/engine.py Removes LLM engine.
services/llm/server/server/engine/config.py Removes engine configuration.
services/llm/server/server/engine/__init__.py Removes engine package.
services/llm/server/server/data/processor.py Removes data processor.
services/llm/server/server/data/__init__.py Removes data package.
services/llm/server/server/checker.py Removes request validation.
services/llm/server/server/__init__.py Removes server package.
services/llm/server/scripts/stop_server.sh Removes shutdown script.
services/llm/server/scripts/start_server.sh Removes startup script.
services/llm/server/requirements.txt Removes server dependencies.
services/llm/server/config/config.pbtxt Removes Triton model configuration.
services/llm/requirements-dev.txt Removes development dependencies.
services/llm/README.md Removes LLM overview.
services/llm/docs/FastDeploy_usage_tutorial.md Removes deployment tutorial.
services/llm/dockerfiles/Dockerfile_serving_cuda123_cudnn9 Removes CUDA 12.3 image.
services/llm/dockerfiles/Dockerfile_serving_cuda118_cudnn8 Removes CUDA 11.8 image.
services/llm/client/setup.py Removes client packaging.
services/llm/client/requirements.txt Removes client dependencies.
services/llm/client/README.md Removes client documentation.
services/llm/client/fastdeploy_client/utils.py Removes client utilities.
services/llm/client/fastdeploy_client/message.py Removes chat messages.
services/llm/client/fastdeploy_client/command.py Removes client CLI.
services/llm/client/fastdeploy_client/chatbot.py Removes chatbot client.
services/llm/client/fastdeploy_client/__init__.py Removes client package.
services/llm/.dockerignore Removes LLM Docker exclusions.
scripts/build.py Simplifies targets and archive handling.
fastdeploy/vision/ocr/ppocr/ppocr_v6.h Declares PPOCRv6 implementation externally.
fastdeploy/vision/ocr/ppocr/ppocr_v6.cc Implements PPOCRv6 constructors and cloning.
fastdeploy/vision/ocr/ppocr/ppocr_v5.h Declares PPOCRv5 implementation externally.
fastdeploy/vision/ocr/ppocr/ppocr_v5.cc Implements PPOCRv5 constructors and cloning.
fastdeploy/runtime/backends/ort/option.h Documents callback takeover semantics.
cmake/onnxruntime.cmake Removes obsolete ORT acquisition logic.
cmake/config_cpack.cmake Removes obsolete CPack configuration.
bindings/python/fastdeploy/vision/ocr/ppocr/__init__.py Removes legacy Python OCR aliases.
bindings/c_api/fastdeploy_capi/vision/types_internal.h Removes unused v5/v6 C wrappers.
bindings/c_api/CMakeLists.txt Uses stable list-directory paths.
.github/workflows/build.yml Labels builds as CPU-only.
Review details
  • Files reviewed: 48/48 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/build.py Outdated
Comment thread fastdeploy/vision/ocr/ppocr/ppocr_v5.cc
@Aliothmoon
Aliothmoon merged commit fe7d5ba into MaaXYZ:dev Sep 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants