refactor: 移除 crewai agent 架构相关代码并更新 LLM 配置

This commit is contained in:
qzl
2026-03-04 11:37:09 +08:00
parent 87399f74c8
commit b02a322bf3
71 changed files with 1045 additions and 7499 deletions
-66
View File
@@ -786,72 +786,6 @@
---
## Agent
### POST /agent/runs
创建 Agent 运行(需要认证,SSE 响应)。
**Request (RunAgentInput):**
```json
{
"threadId": "string",
"runId": "string",
"parentRunId": "string?",
"state": {},
"messages": [],
"tools": [],
"context": [],
"forwardedProps": {},
"resume": null
}
```
**Response:** 200 OK (`text/event-stream`)
**Errors:**
- 401: 未认证
- 422: 请求参数无效
### POST /agent/runs/{run_id}/resume
恢复被中断运行(需要认证,SSE 响应)。
**Request (RunAgentInput):**
```json
{
"threadId": "string",
"runId": "string",
"state": {},
"messages": [],
"tools": [],
"context": [],
"forwardedProps": {},
"resume": {
"interruptId": "string",
"payload": {}
}
}
```
**State Snapshot Contract:**
- `state_snapshot` 仅支持 `version = 2`
- 顶层必须包含 `run_context``pending_tool_call`
- 旧格式或缺失字段会被拒绝
**Resume Semantics:**
- 同一 `interrupt_id` 并发恢复仅允许一个请求成功
- `expires_at` 超时后会标记为 `EXPIRED`,恢复请求不再生效
**Errors:**
- 401: 未认证
- 404: 会话不存在
- 409: `run_id``interrupt_id` 冲突,或状态已被消费
- 410: 挂起调用已过期
- 422: `state_snapshot` 非法或版本不匹配
---
## Infra
### GET /infra/health