Commit b5f5e05
committed
fix(templates): load the project .env in the Temporal worker before mapping the key
The worker is a separate process and agents run does not load the project
.env into it today, so the LITELLM_API_KEY -> OPENAI_API_KEY mapping ran
against an empty environment. Call load_dotenv() first (as acp.py already
does), so the template works on its own; #515 makes the CLI load .env for
both processes as well.
Claude-Session: https://claude.ai/code/session_01HCVKnA7LeJZ44nxZz1uzF31 parent 8ad88db commit b5f5e05
3 files changed
Lines changed: 14 additions & 2 deletions
File tree
- src/agentex/lib/cli/templates
- temporal-openai-agents/project
- temporal-pydantic-ai/project
- tests/lib/cli
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
0 commit comments