支持 Web 多模态图片上传并修正图片 token 预算估算#705
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
| http.Error(writer, "method not allowed", http.StatusMethodNotAllowed) | ||
| return | ||
| } | ||
| subjectID, ok := s.authenticatedHTTPSubjectID(request) |
There was a problem hiding this comment.
The new session-asset HTTP endpoints authenticate the bearer token but never consult s.acl; handleSessionAssetRead has the same pattern. If an operator configures the control-plane ACL to restrict HTTP access, a valid token can still upload/read session images through these endpoints. Please route these endpoints through the same ACL decision path (or add explicit asset methods) before calling the runtime port.
| }))) | ||
|
|
||
| setText('') | ||
| clearAttachments(false) |
There was a problem hiding this comment.
clearAttachments(false) drops the composer’s ownership without revoking the object URLs created for previews; those URLs are copied into chat messages and are never revoked when messages are cleared or removed. Repeated image sends can keep blobs alive for the lifetime of the tab, so please add a cleanup owner/lifecycle for sent attachment preview URLs.
概要
input_parts.media.asset_id传入后端,不再把图片数据内联到聊天消息。主要改动
/api/session-assets上传/读取链路,并打通 Gateway、Runtime、Session 的附件引用。测试
go test ./internal/provider/... ./internal/gateway/... ./internal/runtime -count=1close #700