fix(config): Ensure API keys are loaded by orchestrator

- Reverts docker-compose.yml to use volume mount for gemini_api_key.txt, due to format constraints.
- Restores and refines Config.load_api_keys() in config.py.
- **Crucially, calls Config.load_api_keys() at the start of gtm_architect_orchestrator.py to ensure keys are loaded.**
- Adjusts _get_gemini_api_key in helpers.py to prioritize keys from Config.API_KEYS.
- This definitively addresses the 'API Key missing' error by guaranteeing key initialization.
This commit is contained in:
2026-01-03 09:33:33 +00:00
parent b35a53b755
commit ca1309adff
4 changed files with 44 additions and 18 deletions

View File

@@ -101,8 +101,9 @@ services:
- ./gtm_db_manager.py:/app/gtm_db_manager.py
- ./gtm_projects.db:/app/gtm_projects.db
- ./Log_from_docker:/app/Log_from_docker
environment:
# Mount API keys
- ./gemini_api_key.txt:/app/gemini_api_key.txt
- ./serpapikey.txt:/app/serpapikey.txt
environment:
- PYTHONUNBUFFERED=1
- DB_PATH=/app/gtm_projects.db
env_file:
- ./gemini_api_key.txt
- DB_PATH=/app/gtm_projects.db