Skip to content

Commit 20705d5

Browse files
committed
docs: update README and remove DNA sidecars
Document the OpenRouter model selector and session cleanup changes while removing SIFU DNA sidecar records after disabling DNA enforcement. Made-with: Cursor
1 parent f04a101 commit 20705d5

20 files changed

Lines changed: 54 additions & 176 deletions

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,16 @@
159159

160160
## 📰 News
161161

162+
🧭 **[2026-05-01] OpenRouter model selector, session cleanup & workflow UX hardening**
163+
164+
- 🧠 **OpenRouter model catalog in Settings.** The new UI can now fetch OpenRouter model metadata from `https://openrouter.ai/api/v1/models`, cache it locally, and expose searchable model selectors for the Default, Planning, and Implementation phases. Use exact OpenRouter model ids such as `z-ai/glm-5.1` without editing JSON by hand.
165+
- 🔄 **Runtime model switching.** Saving model choices from Settings updates `deepcode_config.json` and reloads the in-process LLM runtime so newly started workflows pick up the selected provider/model combination immediately.
166+
- 🗑️ **Session deletion now performs safe cascade cleanup.** Deleting a session from the UI removes its persistent session store and associated `deepcode_lab/tasks/<task_id>/` workspaces, while preserving shared `uploads/` source files. Sessions with `pending`, `running`, or `waiting_for_input` tasks are blocked with a clear `409 Conflict`.
167+
- 📊 **More accurate Paper2Code progress.** The frontend now shows backend stage messages and avoids marking intermediate phases as fully "Done" while long LLM work is still running.
168+
- 🛡️ **Workflow robustness fixes.** Uploads now reject Git LFS pointer files, cancelled tasks stop backend work promptly, stale browser session ids recover cleanly, planner retries fall back to a minimal valid plan when a model defers/tool-calls incorrectly, and document segmentation skips an extra validation LLM call that could stall progress.
169+
170+
---
171+
162172
🗂️ **[2026-04-28] Persistent sessions & dual-layer logging**
163173

164174
- 🆕 **Sessions are now persistent.** Every CLI / UI run is automatically attached to a session under `~/.deepcode/sessions/<id>/` (override with `DEEPCODE_SESSIONS_DIR`). Sessions are JSONL — `tail -f session.jsonl` works out of the box. List / inspect / branch them with `python cli/main_cli.py session list|show <id>|new|resume <id>|delete <id>`, or via `GET /api/v1/sessions` from the backend.
@@ -718,10 +728,11 @@ Any OpenAI-compatible endpoint is supported by overriding `apiBase` on the match
718728
{
719729
"agents": {
720730
"defaults": {
721-
"model": "openai/gpt-5.4"
731+
"provider": "openrouter",
732+
"model": "z-ai/glm-5.1"
722733
},
723-
"planning": { "model": "openai/gpt-5.4" },
724-
"implementation": { "model": "openai/gpt-5.4" }
734+
"planning": { "provider": "openrouter", "model": "z-ai/glm-5.1" },
735+
"implementation": { "provider": "openrouter", "model": "z-ai/glm-5.1" }
725736
},
726737
"providers": {
727738
"openai": { "apiKey": "your_openai_api_key" },
@@ -730,6 +741,13 @@ Any OpenAI-compatible endpoint is supported by overriding `apiBase` on the match
730741
}
731742
```
732743

744+
OpenRouter model ids must use the exact `id` returned by OpenRouter, for example
745+
`z-ai/glm-5.1`, `anthropic/claude-sonnet-4.5`, or
746+
`google/gemini-2.5-pro`. In the new UI, open **Settings → OpenRouter Models**
747+
to search the live OpenRouter catalog and update the Default, Planning, and
748+
Implementation models without editing this file manually. Saving from the UI
749+
reloads the runtime for newly started workflows.
750+
733751
> **🔐 Never commit `deepcode_config.json`.** It is already in `.gitignore`.
734752
735753
</details>
@@ -897,6 +915,12 @@ Inside `python cli/main_cli.py`, type these at the main menu prompt:
897915
Every task created from these flows inherits the active `session_id`; per-task
898916
logs are written to `deepcode_lab/tasks/<task>/logs/`.
899917

918+
In the web UI, use the **Sessions** menu in the header to resume or delete a
919+
session. Deleting a session removes its JSONL session record and associated task
920+
workspace under `deepcode_lab/tasks/`, but keeps original files in `uploads/`.
921+
If the session still has `pending`, `running`, or `waiting_for_input` tasks, the
922+
backend rejects the deletion until the task is cancelled or completed.
923+
900924
<details>
901925
<summary><strong>🐳 Docker Management Commands</strong></summary>
902926

README_ZH.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,16 @@
157157

158158
## 📰 新闻
159159

160+
🧭 **[2026-05-01] OpenRouter 模型选择器、session 清理与工作流体验增强**
161+
162+
- 🧠 **Settings 中新增 OpenRouter 模型目录。** 新版 UI 可以从 `https://openrouter.ai/api/v1/models` 获取 OpenRouter 模型元数据,本地缓存后提供可搜索的 Default、Planning、Implementation 三阶段模型下拉框。用户可以直接选择 `z-ai/glm-5.1` 这类 OpenRouter 精确模型 id,无需手动编辑 JSON。
163+
- 🔄 **运行时模型切换。** 在 Settings 保存模型选择后,会更新 `deepcode_config.json` 并刷新进程内 LLM runtime;之后新启动的 workflow 会立即使用新的 provider/model 组合。
164+
- 🗑️ **Session 删除改为安全级联清理。** 在 UI 中删除 session 时,会删除持久化 session 记录和对应的 `deepcode_lab/tasks/<task_id>/` 工作目录,但保留可被多个 session 共享的 `uploads/` 原始文件。若 session 下仍有 `pending``running``waiting_for_input` task,后端会返回明确的 `409 Conflict`
165+
- 📊 **Paper2Code 进度显示更准确。** 前端现在会展示后端阶段消息,并避免在长时间 LLM 阶段尚未完成时,把中间步骤误标记为完全 Done。
166+
- 🛡️ **工作流稳定性修复。** 上传阶段会拒绝 Git LFS pointer 文件;取消任务会及时中断后端工作;浏览器中的过期 session id 会自动恢复;planner 在模型输出错误的工具调用/延迟执行文本时会回退到最小合法 plan;文档分割阶段跳过额外质量验证 LLM 调用,减少卡在 50% 的概率。
167+
168+
---
169+
160170
🗂️ **[2026-04-28] 持久化 session 与双层结构化日志**
161171

162172
- 🆕 **Session 现在会持久化。** 每次 CLI / UI 运行都会自动挂到一个 session,默认保存在 `~/.deepcode/sessions/<id>/`(可用 `DEEPCODE_SESSIONS_DIR` 覆盖)。session 使用 JSONL 存储,支持 `python cli/main_cli.py session list|show <id>|new|resume <id>|delete <id>`,后端也提供 `GET /api/v1/sessions`
@@ -694,13 +704,22 @@ DeepCode 会根据 `model` 前缀(例如 `openai/...`、`anthropic/...`、`gem
694704
```json
695705
{
696706
"agents": {
697-
"defaults": { "model": "openai/gpt-5.4" },
698-
"planning": { "model": "openai/gpt-5.4" },
699-
"implementation": { "model": "anthropic/claude-sonnet-4.5" }
707+
"defaults": { "provider": "openrouter", "model": "z-ai/glm-5.1" },
708+
"planning": { "provider": "openrouter", "model": "z-ai/glm-5.1" },
709+
"implementation": { "provider": "openrouter", "model": "z-ai/glm-5.1" }
710+
},
711+
"providers": {
712+
"openrouter": { "apiKey": "your_openrouter_key", "apiBase": "https://openrouter.ai/api/v1" }
700713
}
701714
}
702715
```
703716

717+
OpenRouter 模型必须使用 OpenRouter 官方模型目录返回的精确 `id`,例如
718+
`z-ai/glm-5.1``anthropic/claude-sonnet-4.5`
719+
`google/gemini-2.5-pro`。在新版 UI 中,可以打开 **Settings → OpenRouter
720+
Models** 搜索实时模型目录,并分别更新 Default、Planning、Implementation
721+
模型。保存后会刷新 runtime,之后新启动的 workflow 会使用新的模型配置。
722+
704723
#### 📄 文档分割 *(可选)*
705724

706725
```json
@@ -849,6 +868,11 @@ python cli/main_cli.py --session <session_id> --file paper.pdf
849868
这些入口创建的 task 都会继承当前 `session_id`;per-task 日志会写入
850869
`deepcode_lab/tasks/<task>/logs/`
851870

871+
在 Web UI 中,可以通过顶部 **Sessions** 菜单恢复或删除 session。删除
872+
session 会移除 JSONL session 记录和对应的 `deepcode_lab/tasks/` 工作目录,
873+
但不会删除 `uploads/` 中的原始上传文件。如果该 session 仍有 `pending`
874+
`running``waiting_for_input` task,后端会拒绝删除,直到任务被取消或完成。
875+
852876
<details>
853877
<summary><strong>🐳 Docker 管理命令</strong></summary>
854878

core/observability/.__init__.py.dna.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

new_ui/backend/api/routes/.config.py.dna.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

new_ui/backend/api/routes/.files.py.dna.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

new_ui/backend/api/routes/.sessions.py.dna.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

new_ui/backend/models/.requests.py.dna.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

new_ui/backend/models/.responses.py.dna.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

new_ui/backend/services/.openrouter_models.py.dna.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

new_ui/backend/services/.workflow_service.py.dna.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)