From 1d7043399cb92a30e49feb3f787baf9bcd93c84a Mon Sep 17 00:00:00 2001 From: endolith Date: Thu, 30 Jan 2025 13:32:06 -0500 Subject: [PATCH] Add note about .env files from parent folders It was extremely confusing to me why an API key was being used within VSCode terminal that wasn't my OpenInterpreter key. This note might save other people time. --- interpreter/core/llm/llm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interpreter/core/llm/llm.py b/interpreter/core/llm/llm.py index 980672db58..1ff86c12dc 100644 --- a/interpreter/core/llm/llm.py +++ b/interpreter/core/llm/llm.py @@ -3,6 +3,9 @@ os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True" import sys +# Note: litellm in DEV mode will load .env files from the current directory +# and all parent directories. This can lead to unexpected API keys being loaded +# if there are .env files in parent folders. import litellm litellm.suppress_debug_info = True