Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/sessions/{session_id}/turns/{turn_id}/resolve
当 Agent 在执行过程中需要工具调用结果(tool use)时,通过此端点提交工具执行结果,使 Agent 继续处理。
此端点当前未启用(返回 404)。可能为 M3 门控功能或后续版本实现。
请求头
| 头部 | 必选 | 说明 |
|---|
Authorization | 是 | Bearer <PAT> |
Content-Type | 是 | application/json |
路径参数
| 参数 | 类型 | 必选 | 说明 |
|---|
session_id | string | 是 | Session ID(sess_ 前缀) |
turn_id | string | 是 | Turn ID(turn_ 前缀) |
请求体(预期格式)
| 字段 | 类型 | 必选 | 说明 |
|---|
tool_results | array | 是 | 工具执行结果列表 |
tool_results[].tool_use_id | string | 是 | 对应的 tool_use ID |
tool_results[].content | string | 是 | 工具返回的结果内容 |
示例请求
curl -X POST "https://openapi.qoder.sh/api/v1/cloud/sessions/sess_019e392c0d1e74e095d21ea4c6b41def/turns/turn_019e392c0d787ceea6bb62943f9ac3ec/resolve" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{
"tool_results": [
{
"tool_use_id": "toolu_abc123",
"content": "工具执行的结果数据"
}
]
}'
当前状态
此端点返回 HTTP 404(纯文本 404 page not found),表明路由尚未注册。
预期成功响应
HTTP 200 OK
当功能上线后,预期返回更新后的 Turn 状态或空响应。
错误码
| HTTP | type | 触发条件 |
|---|
| 400 | invalid_request_error | 请求格式错误 |
| 401 | authentication_error | PAT 无效或过期 |
| 404 | not_found_error | Session 或 Turn 不存在 / 路由未实现 |
| 409 | conflict_error | Turn 不处于等待工具结果的状态 |
完整错误信封说明详见 错误参考。