Resolve OPENAI_API_KEY from the canonical config chain. Order: process env → ./.env → ~/.env (later wins for ~/.env so the user's canonical secret store beats stale shell exports).
()
| 59 | |
| 60 | |
| 61 | def _load_env_chain() -> None: |
| 62 | """Resolve OPENAI_API_KEY from the canonical config chain. |
| 63 | |
| 64 | Order: process env → ./.env → ~/.env (later wins for ~/.env so the user's |
| 65 | canonical secret store beats stale shell exports). |
| 66 | """ |
| 67 | load_dotenv(Path.cwd() / ".env", override=False) |
| 68 | load_dotenv(Path.home() / ".env", override=True) |
| 69 | |
| 70 | |
| 71 | SIZE_SHORTCUTS: dict[str, str] = { |