This commit implements a clean architecture where environment variables
are only read, never set, ensuring compatibility with other ComfyUI
packages.
The changes: - Remove all code that sets global environment variables -
Clean up config.yaml to remove API key placeholders - Add documentation
for safe environment handling - Add comprehensive tests to verify
non-polluting behavior - Ensure backward compatibility for other
packages
The commit includes detailed docs explaining the clean architecture and
safety guarantees for package compatibility.
- Add get_api_key and get_config_value helpers - Only set internal
config keys as environment variables with a prefix - Avoid polluting
global environment with API keys - Improve code organization and
comments
- Add detailed docstrings to AgentNode, BasicRecursionFilterNode, and
DocumentChunkRecursionFilterNode for clarity and documentation. -
Improve input validation and error handling in agent nodes. - Update
.gitignore to cover more environment, config, and IDE files. - Refactor
LiteLLMCustomEndpointProvider for custom API endpoints. - Add
conditional imports and dummy functions for LightRAG when unavailable. -
Update config.yaml to use environment variables for API keys and clarify
usage. - Refine requirements.txt to avoid heavy LightRAG dependencies. -
Add tests/__init__.py with test suite metadata; remove redundant test
files. - Fix CustomDict import and model config handling in
litellmnodes.py. - Improve chunk processing and recursion filter logic
in agent nodes. - Update utils/__init__.py to include env_config.
- Add template for memory prompt generation with focus on retrieving relevant context
- Update BasicRecursionFilter with date-aware prompting and XML tags
- Add LLLM provider support to AgentMemoryProvider for prompt refinement