Skip to content

feat: expose LightRAG concurrency and extraction knobs in settings - #877

Open
ademicho123 wants to merge 1 commit into
HKUDS:devfrom
ademicho123:feature/lightrag-configurable-params
Open

feat: expose LightRAG concurrency and extraction knobs in settings#877
ademicho123 wants to merge 1 commit into
HKUDS:devfrom
ademicho123:feature/lightrag-configurable-params

Conversation

@ademicho123

Copy link
Copy Markdown

Description

Adds three settings LightRAG didn't expose: max_concurrent_files (file-processing concurrency), llm_model_max_async (LLM call concurrency), and entity_extract_max_gleaning (extraction depth). They're wired through the same lightrag.json settings file and /rag-pipelines/lightrag/config endpoint that already handle top_k/response_type, so the pattern should look familiar. Under the hood, max_concurrent_files goes to RAGAnythingConfig, and the other two ride into LightRAG's own constructor via RAG-Anything's lightrag_kwargs passthrough.

Scoped down from the full ask in #640: fallback models and single-provider lock-down live in the shared LLM client, not this pipeline, so I left those for a separate issue/PR rather than mixing them in here.

Related Issues

Module(s) Affected

  • api
  • config
  • services
  • tests

Checklist

  • I have read and followed the contribution guidelines.
  • My code follows the project's coding standards.
  • I have run pre-commit run --all-files and fixed any issues.
  • I have added relevant tests for my changes.
  • I have updated the documentation (if necessary).
  • My changes do not introduce any new security vulnerabilities.

Additional Notes

Added 7 tests: defaults/clamp coverage for the three new settings (tests/services/config/test_graphrag_lightrag_settings.py), unit tests for the two new settings-reader functions covering both happy path and read-error fallback, and two tests confirming build_rag() actually threads the values into RAGAnythingConfig/RAGAnything (tests/services/rag/test_lightrag_pipeline.py). Also had to patch the fake classes in the existing #594 regression test, since it broke once build_rag() started passing the new kwargs through — full suite is green aside from one pre-existing, unrelated Windows path-separator issue in that same #594 test.

Open to feedback on the default values (max_concurrent_files=1, llm_model_max_async=4, entity_extract_max_gleaning=1) if you'd rather they match something else.

@ademicho123
ademicho123 changed the base branch from main to dev August 16, 2026 14:38
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.

1 participant