Skip to content

fix(config): call load_dotenv() in config.py and add gemini-flash-lite-latest alias - #367

Open
anmolsharma152 wants to merge 2 commits into
interviewstreet:mainfrom
anmolsharma152:fix/load-dotenv-import-order
Open

fix(config): call load_dotenv() in config.py and add gemini-flash-lite-latest alias#367
anmolsharma152 wants to merge 2 commits into
interviewstreet:mainfrom
anmolsharma152:fix/load-dotenv-import-order

Conversation

@anmolsharma152

Copy link
Copy Markdown

Problem

  1. config.py evaluates os.getenv("DEFAULT_MODEL", ...) at import time, but load_dotenv() was only called later in prompt.py. As a result, .env settings were ignored when importing config.py directly.
  2. New Gemini API keys hit 404 Not Found errors on deprecated snapshot model names (gemini-2.5-flash).

Solution

  1. Add from dotenv import load_dotenv and load_dotenv() at the top of config.py.
  2. Add gemini-flash-lite-latest model alias to providers.json.

Testing

  • Verified .env variables load automatically on config.py import.
  • Successfully ran score.py using DEFAULT_MODEL=gemini-flash-lite-latest.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant