fix(llm): 配置列表返回 streaming 字段

LLMProfileDTO 漏了 streaming,接口从不返回该字段,前端读到 undefined
后一律回落成默认的流式,导致「非流式」保存成功但重新打开开关仍是开的。

字段不加 omitempty:false 必须出现在响应里。

Closes #69
This commit is contained in:
Autumn-27 committed 2026-08-27 10:37:53 -04:00
1 parent 529f34007c
commit 8be7631eb3
1 file changed
+4
+4
View File
@@ -566,6 +566,9 @@ type LLMProfileDTO struct {
// pool_exclude=true 则不作为故障转移目标,但仍可被 agent/任务显式绑定。
Priority int `json:"priority"`
PoolExclude bool `json:"pool_exclude"`
// 收发模式:true=流式(SSE) | false=非流式。没有 omitempty —— false 必须出现在
// 响应里,否则前端读不到「非流式」,开关会回落成默认的流式。
Streaming bool `json:"streaming"`
}
func llmProfileDTO(p *db.LLMProfile) LLMProfileDTO {
@@ -585,6 +588,7 @@ func llmProfileDTO(p *db.LLMProfile) LLMProfileDTO {
IsDefault: p.IsDefault,
Priority: p.Priority,
PoolExclude: p.PoolExclude,
Streaming: p.Streaming,
}
}