Skip to content

Quick fix for hot-reload of .env#1

Open
pelted wants to merge 1 commit into
mainfrom
chris/fix-hot-reload
Open

Quick fix for hot-reload of .env#1
pelted wants to merge 1 commit into
mainfrom
chris/fix-hot-reload

Conversation

@pelted
Copy link
Copy Markdown
Contributor

@pelted pelted commented Feb 27, 2026

load_dotenv(override=True) runs once during __init__, so any .env changes after startup are invisible. The fix is to move that call into _get_headers so it re-reads the file on every request.

…dling and actually make it hot-reload per the README
Copy link
Copy Markdown
Collaborator

@jbeker jbeker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be curious to see how that works with using the 1P .env support. If it starts prompting us to auth for every tool call. But worth a shot :)

@pelted
Copy link
Copy Markdown
Contributor Author

pelted commented Feb 27, 2026

Oh that is a good point. Umm, I was trying to fuddle with my env when I ran into it not reloading, but now that may be an issue if it prompts. I'll wait on merging until I can verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants