jina-ai / jina-ai/node-DeepResearch
Potential infinite loop in deepsearch
- Dominant language
- TypeScript
- Stars
- 5.2k
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
Description
During deepsearch, the model’s "thinking" output often produces similar variations of the initial query description for 15–20 minutes, while the step count climbs past 100 and the `gaps` array remains unchanged, consuming hundreds of thousands of tokens without real progress. Most queries are in Chinese, and this behavior has been observed with models like GPT-4.1 and o4-mini.
Example log:
```json
{
"severity": "DEBUG",
"message": "Step 100 / Budget used 64.51%",
"component": "deepsearch",
"timestamp": "2025-07-14T10:57:14.161Z",
"gaps": ["xxxx"]
}
```
A related warning sometimes appears:
```json
{
"severity": "WARNING",
"message": "Object not generated according to schema, fallback to manual parsing",
"component": "deepsearch",
"timestamp": "2025-07-14T10:57:06.355Z",
"error": {
"message": "No object generated: response did not match schema.",
"name": "AI_NoObjectGeneratedError"
}
}
```
These signs suggest the model may be stuck in a loop, failing to close gaps but continuing to iterate. Feedback on whether the warning and loop behavior are connected, and suggestions for a more graceful handling approach, would be appreciated.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.