docs: fix review feedback - source-map paths, memory API routes, supports_thinking, checkpointer callout

Agent-Logs-Url: https://github.com/bytedance/deer-flow/sessions/fb75dc8c-18a4-4a23-9229-25b3c5e545cf

Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-11 07:04:24 +00:00 committed by GitHub
parent b62ac7672a
commit 9c944fe698
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 50 additions and 36 deletions

View File

@ -106,10 +106,10 @@ checkpointer:
```
<Callout type="info">
The LangGraph Server manages its own state separately. The
<code>checkpointer</code> setting in <code>config.yaml</code> applies to the
embedded <code>DeerFlowClient</code> (used in direct Python integrations), not
to the LangGraph Server deployment used by DeerFlow App.
DeerFlow App uses the <code>checkpointer</code> setting in <code>config.yaml</code> to
persist thread state through the Gateway runtime (via <code>make_checkpointer()</code> in
<code>deerflow.agents.checkpointer.async_provider</code>). Configure this section if you
want threads to survive process restarts.
</Callout>
### Thread data storage

View File

@ -44,9 +44,17 @@ http://localhost:2026/api
|---|---|---|
| `GET` | `/api/threads` | List threads |
| `DELETE` | `/api/threads/{thread_id}` | Delete a thread |
| `GET` | `/api/memory` | Get global memory |
| `GET` | `/api/memory/{agent_name}` | Get agent-specific memory |
| `DELETE` | `/api/memory` | Clear global memory |
| `GET` | `/api/memory` | Get global memory data (context + facts) |
| `DELETE` | `/api/memory` | Clear all memory data |
| `POST` | `/api/memory/reload` | Reload memory from storage file |
| `GET` | `/api/memory/facts` | (included in `/api/memory` response `facts` array) |
| `POST` | `/api/memory/facts` | Create a memory fact |
| `PATCH` | `/api/memory/facts/{fact_id}` | Update a memory fact |
| `DELETE` | `/api/memory/facts/{fact_id}` | Delete a memory fact |
| `GET` | `/api/memory/export` | Export memory data as JSON |
| `POST` | `/api/memory/import` | Import and overwrite memory data |
| `GET` | `/api/memory/config` | Get memory configuration |
| `GET` | `/api/memory/status` | Get memory config + data in one request |
### Extensions

View File

@ -44,8 +44,11 @@ models:
base_url: null # Optional: custom endpoint URL
request_timeout: 600.0 # Request timeout in seconds
max_retries: 2 # Number of retries on failure
supports_vision: true # Whether to enable vision capabilities
thinking_enabled: false # Whether to enable extended thinking
supports_vision: true # Whether the model accepts image inputs
supports_thinking: false # Whether the model supports extended thinking
# thinking: {} # Optional thinking config (passed when thinking is active)
# when_thinking_enabled: {} # Optional overrides applied when thinking is enabled
# when_thinking_disabled: {} # Optional overrides applied when thinking is disabled
# Any additional fields are passed through to the model constructor
```

View File

@ -33,4 +33,4 @@ Set in the model configuration in `config.yaml`:
| Flag | Type | Description |
|---|---|---|
| `supports_vision` | `bool` | Model accepts image inputs |
| `thinking_enabled` | `bool` | Model supports extended thinking mode |
| `supports_thinking` | `bool` | Model supports extended thinking mode |

View File

@ -14,7 +14,7 @@ backend/
│ │ ├── memory.py # Memory read/clear
│ │ ├── threads.py # Thread management
│ │ └── uploads.py # File uploads
│ └── main.py # FastAPI app entry point
│ └── app.py # FastAPI app entry point (create_app())
└── packages/harness/deerflow/
├── agents/
@ -85,4 +85,4 @@ frontend/src/
| Skill loading (hot reload) | `skills/loader.py` |
| MCP tool cache | `mcp/cache.py` |
| File upload handling | `uploads/manager.py` |
| Gateway main router | `app/gateway/main.py` |
| Gateway app factory | `app/gateway/app.py` |

View File

@ -23,19 +23,13 @@ models:
request_timeout: 600.0
max_retries: 2
supports_vision: true
thinking_enabled: false
```
</Tabs.Tab>
<Tabs.Tab>
```yaml
models:
- name: claude-sonnet
supports_thinking: false
use: langchain_anthropic:ChatAnthropic
model: claude-sonnet-4-5
api_key: $ANTHROPIC_API_KEY
max_tokens: 16000
supports_vision: true
thinking_enabled: false
supports_thinking: false
```
启用扩展思考:
@ -46,11 +40,10 @@ models:
model: claude-sonnet-4-5
api_key: $ANTHROPIC_API_KEY
max_tokens: 16000
thinking_enabled: true
extra_body:
thinking:
type: enabled
budget_tokens: 10000
supports_thinking: true
thinking:
type: enabled
budget_tokens: 10000
```
</Tabs.Tab>
<Tabs.Tab>
@ -63,7 +56,7 @@ models:
request_timeout: 600.0
max_retries: 2
supports_vision: true
thinking_enabled: false
supports_thinking: false
```
</Tabs.Tab>
<Tabs.Tab>
@ -77,7 +70,7 @@ models:
request_timeout: 600.0
max_retries: 2
supports_vision: false
thinking_enabled: true
supports_thinking: true
```
</Tabs.Tab>
<Tabs.Tab>
@ -90,7 +83,7 @@ models:
request_timeout: 600.0
max_retries: 2
supports_vision: false
thinking_enabled: false
supports_thinking: false
```
确保 Ollama 已运行并已拉取所需模型:

View File

@ -44,9 +44,16 @@ http://localhost:2026/api
|---|---|---|
| `GET` | `/api/threads` | 列出线程 |
| `DELETE` | `/api/threads/{thread_id}` | 删除线程 |
| `GET` | `/api/memory` | 获取全局记忆 |
| `GET` | `/api/memory/{agent_name}` | 获取 Agent 特定记忆 |
| `DELETE` | `/api/memory` | 清除全局记忆 |
| `GET` | `/api/memory` | 获取全局记忆数据(上下文 + 事实) |
| `DELETE` | `/api/memory` | 清除所有记忆数据 |
| `POST` | `/api/memory/reload` | 从存储文件重新加载记忆 |
| `POST` | `/api/memory/facts` | 创建一条记忆事实 |
| `PATCH` | `/api/memory/facts/{fact_id}` | 更新一条记忆事实 |
| `DELETE` | `/api/memory/facts/{fact_id}` | 删除一条记忆事实 |
| `GET` | `/api/memory/export` | 导出记忆数据为 JSON |
| `POST` | `/api/memory/import` | 导入并覆盖记忆数据 |
| `GET` | `/api/memory/config` | 获取记忆配置 |
| `GET` | `/api/memory/status` | 一次性获取记忆配置和数据 |
### 扩展

View File

@ -44,8 +44,11 @@ models:
base_url: null # 可选:自定义端点
request_timeout: 600.0 # 请求超时(秒)
max_retries: 2 # 重试次数
supports_vision: true # 是否启用视觉功能
thinking_enabled: false # 是否启用扩展思考
supports_vision: true # 模型是否接受图像输入
supports_thinking: false # 模型是否支持扩展思考
# thinking: {} # 可选思考配置(思考激活时传入)
# when_thinking_enabled: {} # 思考启用时的可选覆盖设置
# when_thinking_disabled: {} # 思考禁用时的可选覆盖设置
# 任何其他字段都会传递给模型构造函数
```

View File

@ -33,4 +33,4 @@
| 标志 | 类型 | 描述 |
|---|---|---|
| `supports_vision` | `bool` | 模型接受图像输入 |
| `thinking_enabled` | `bool` | 模型支持扩展思考模式 |
| `supports_thinking` | `bool` | 模型支持扩展思考模式 |

View File

@ -14,7 +14,7 @@ backend/
│ │ ├── memory.py # 记忆读取/清除
│ │ ├── threads.py # 线程管理
│ │ └── uploads.py # 文件上传
│ └── main.py # FastAPI 应用入口
│ └── app.py # FastAPI 应用入口create_app()
└── packages/harness/deerflow/
├── agents/
@ -85,4 +85,4 @@ frontend/src/
| 技能加载(热重载) | `skills/loader.py` |
| MCP 工具缓存 | `mcp/cache.py` |
| 文件上传处理 | `uploads/manager.py` |
| Gateway 主路由器 | `app/gateway/main.py` |
| Gateway 应用工厂 | `app/gateway/app.py` |