You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Implement research timeout with time-based polling configurable via environment variables and add a CLI command to recover timed-out research runs.
Copy file name to clipboardExpand all lines: README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,8 @@ Create a `.env` file (untracked) with your OpenAI credentials:
36
36
OPENAI_API_KEY=sk-...
37
37
PROMPT_REFINER_MODEL=gpt-5.2
38
38
DEEP_RESEARCH_MODEL=o3-deep-research
39
+
POLLING_INTERVAL_IN_SECONDS=10
40
+
MAX_POLL_TIME_IN_MINUTES=60
39
41
```
40
42
41
43
Deep research requires an OpenAI account with the browsing tooling enabled. Document any environment keys for additional tooling in the repo as you add them.
@@ -68,6 +70,17 @@ pdm run compendium render my-topic.xml --format html
-`--output PATH` — Base path/filename for the output.
70
72
73
+
### 5. Recover from a timeout
74
+
75
+
If a research task times out (exceeding `MAX_POLL_TIME_IN_MINUTES`), recovery information is saved to `timed_out_research.json`. You can resume checking for its completion without starting over:
76
+
77
+
```bash
78
+
pdm run compendium recover
79
+
```
80
+
81
+
**Options:**
82
+
-`--input PATH` — Path to the recovery JSON file (defaults to `timed_out_research.json`).
83
+
71
84
---
72
85
73
86
## Library Usage
@@ -78,7 +91,11 @@ from compendiumscribe import build_compendium, ResearchConfig, DeepResearchError
0 commit comments