feat: Generate a fallback report upon recursion limit hit (#838)

* finish handle_recursion_limit_fallback

* fix

* renmae test file

* fix

* doc

---------

Co-authored-by: lxl0413 <lixinling2021@gmail.com>
This commit is contained in:
Xun
2026-01-26 21:10:18 +08:00
committed by GitHub
parent 9a34e32252
commit ee02b9f637
7 changed files with 895 additions and 12 deletions

View File

@@ -305,6 +305,31 @@ Or via API request parameter:
---
## Recursion Fallback Configuration
When agents hit the recursion limit, DeerFlow can gracefully generate a summary of accumulated findings instead of failing (enabled by default).
### Configuration
In `conf.yaml`:
```yaml
ENABLE_RECURSION_FALLBACK: true
```
### Recursion Limit
Set the maximum recursion limit via environment variable:
```bash
export AGENT_RECURSION_LIMIT=50 # default: 25
```
Or in `.env`:
```ini
AGENT_RECURSION_LIMIT=50
```
---
## RAG (Retrieval-Augmented Generation) Configuration
DeerFlow supports multiple RAG providers for document retrieval. Configure the RAG provider by setting environment variables.