Skip to content

Conversation

Copy link

Copilot AI commented Jun 2, 2025

Plan to fix the issue where new_pipeline.py and other entry points do not load the .env file via dotenv.load_dotenv().

Problem Analysis:

  • The error occurs because new_pipeline.py doesn't call load_dotenv() before calling get_agent_config()
  • While parse_raw.py and gen_outline_layout_parallel.py already call load_dotenv(), new_pipeline.py and poster_gen_pipeline.py do not
  • The error "KeyError: 'model_platform'" occurs when get_agent_config() returns an incomplete configuration
  • The user used model name "o4-mini" but the valid option is "4o-mini"

Plan:

  • Analyze the codebase to identify entry points missing load_dotenv() calls
  • Add load_dotenv() import and call to new_pipeline.py
  • Add load_dotenv() import and call to poster_gen_pipeline.py
  • Check other entry point files for the same issue
  • Test the fix to ensure environment variables are properly loaded
  • Verify minimal changes scope

Fixes #1.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

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.

new_pipeline and possibly other entry points do not load the .env file via dotenv with load_dotenv

2 participants