DeepResearch icon indicating copy to clipboard operation
DeepResearch copied to clipboard

USE_IDP environment variable always evaluates to True due to string handling in os.getenv

Open Davids048 opened this issue 1 year ago • 0 comments

In file_parser.py, the USE_IDP environment variable is evaluated using USE_IDP = os.getenv("USE_IDP", True).

However, os.getenv() always returns a string when the variable exists, regardless of whether it is set to "True" or "False". This means that when USE_IDP is exported in run_react_infer.sh, its value will be a non-empty string ("True" or "False"), both of which evaluate as true in Python.

As a result, if USE_IDP: will always evaluate to True, and the "False" case is never respected.

Davids048 avatar Sep 19 '25 18:09 Davids048