feat: expose LightRAG concurrency and extraction knobs in settings - #877
Open
ademicho123 wants to merge 1 commit into
Open
feat: expose LightRAG concurrency and extraction knobs in settings#877ademicho123 wants to merge 1 commit into
ademicho123 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds three settings LightRAG didn't expose:
max_concurrent_files(file-processing concurrency),llm_model_max_async(LLM call concurrency), andentity_extract_max_gleaning(extraction depth). They're wired through the samelightrag.jsonsettings file and/rag-pipelines/lightrag/configendpoint that already handletop_k/response_type, so the pattern should look familiar. Under the hood,max_concurrent_filesgoes toRAGAnythingConfig, and the other two ride into LightRAG's own constructor via RAG-Anything'slightrag_kwargspassthrough.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
apiconfigservicestestsChecklist
pre-commit run --all-filesand fixed any issues.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 confirmingbuild_rag()actually threads the values intoRAGAnythingConfig/RAGAnything(tests/services/rag/test_lightrag_pipeline.py). Also had to patch the fake classes in the existing#594regression test, since it broke oncebuild_rag()started passing the new kwargs through — full suite is green aside from one pre-existing, unrelated Windows path-separator issue in that same#594test.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.