Commit b709d87
fix(examples): address review — max_turns ceiling, LITELLM_API_KEY guard, temporal instructions
- Add max_turns=10 to all Runner.run calls (sync/async/temporal + template) so an
agent with shell access can't loop unbounded.
- LITELLM_API_KEY only sets OPENAI_API_KEY when one isn't already set (don't clobber
a real key).
- Temporal workflow: instructions no longer call .format(timestamp=...) (the
placeholder was missing -> no-op, and datetime.now() is non-deterministic inside a
Temporal workflow); use the static instructions and drop the unused import.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e928801 commit b709d87
7 files changed
Lines changed: 8 additions & 10 deletions
File tree
- examples/tutorials
- 00_sync/050_openai_agents_local_sandbox/project
- 10_async
- 00_base/120_openai_agents_local_sandbox/project
- 10_temporal/120_openai_agents_local_sandbox/project
- src/agentex/lib/cli/templates/sync-openai-agents-local-sandbox/project
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 149 | + | |
153 | 150 | | |
154 | 151 | | |
155 | 152 | | |
| |||
177 | 174 | | |
178 | 175 | | |
179 | 176 | | |
| 177 | + | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
0 commit comments