Repository navigation
Conversation
This branch has not been deployed
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
RAGAnythingConfigreads scalar environment defaults while its module is imported. Loading a.envfile afterwards, as application code commonly does, therefore leaves parser, storage, concurrency and processing settings at stale defaults. For example, loadingPARSER=docling,MAX_CONCURRENT_FILES=4andENABLE_IMAGE_PROCESSING=falseafter import still constructs a MinerU configuration with concurrency 1 and images enabled.Use default factories for the scalar environment settings, matching the existing list settings. Each new configuration captures the environment at construction; explicit arguments still take precedence. Existing instances retain their values. Keep the legacy parse-method compatibility path unchanged.
Related Issues
Found during local investigation. Searches for configuration/environment defaults,
default_factory, and dotenv found no equivalent pending fix or claimed issue. #315 concerns packaging and other reliability changes, not these defaults.Validation
At upstream
afb67c43d391b1b1008a6fee9f020a232067b9e5, Linux/Python 3.12:git diff --checkpass.Tests import the real config class and load an actual temporary dotenv file. They cover string/integer/boolean values and two configurations constructed under different environments. No live model, external parser executable, or end-to-end ingestion was exercised; other Python/OS combinations await CI.
Checklist
Additional Notes
AI assistance: OpenAI Codex investigated, implemented, tested and reviewed this change. No independent human review is claimed.