-
Notifications
You must be signed in to change notification settings - Fork 250
Description
Problem
When continuing a conversation by rebuilding []*schema.AgenticMessage from persisted content, requests to Ark Responses API fail with:
MissingParameter: input.status
Root cause
In agenticark/convertor.go, reasoningToInputItem (and tool-call conversions) always reads GetItemStatus(block) and writes it into the request. If GetItemStatus returns empty (which happens when messages are reconstructed from DB without ContentBlock.Extra), the resulting request omits input.status, and Ark rejects it.
setItemStatus is unexported, so there is no supported way to set the status when rebuilding history. Only GetItemStatus is exported.
Expected behavior
Continuing a conversation with reconstructed history should not require internal access to set item status.
Suggestions
One of the following would fix it:
- Export a helper like
SetItemStatusinagenticark. - Treat empty status as
completedin convertors (or omit status for reasoning/tool-call blocks in a way acceptable to Ark).
Versions
- github.com/cloudwego/eino v0.9.0-alpha.2
- github.com/cloudwego/eino-ext/components/model/agenticark v0.1.0-alpha.1
- volcengine-go-sdk v1.1.44
If you'd like, I can provide a minimal reproduction snippet.
中文说明
问题现象
在继续对话时,如果从数据库重建 []*schema.AgenticMessage 作为历史输入,会在调用 Ark Responses API 时报错:
MissingParameter: input.status
触发原因
agenticark/convertor.go 中 reasoningToInputItem 以及工具调用相关转换会读取 GetItemStatus(block) 并写入请求。如果 block 的 Extra 中没有 status(通常数据库重建时没有保存 Extra),就会导致请求缺少 input.status,从而被 Ark 拒绝。
目前 setItemStatus 是未导出的内部函数,外部无法在重建历史时设置 status。
期望行为
继续对话场景下,不应要求调用方访问未导出函数来设置 item status。
建议改进
- 导出
SetItemStatus或类似 API 供调用方设置 status。 - 当 status 为空时,convertor 内部默认按
completed处理,或以 Ark 接受的方式处理缺省 status。
版本信息
- github.com/cloudwego/eino v0.9.0-alpha.2
- github.com/cloudwego/eino-ext/components/model/agenticark v0.1.0-alpha.1
- volcengine-go-sdk v1.1.44