From 8be7631eb3bef1b121509985da13d8704612c7fc Mon Sep 17 00:00:00 2001 From: Autumn-27 <53844290+Autumn-27@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:23:06 -0400 Subject: [PATCH] =?UTF-8?q?fix(llm):=20=E9=85=8D=E7=BD=AE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=BF=94=E5=9B=9E=20streaming=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LLMProfileDTO 漏了 streaming,接口从不返回该字段,前端读到 undefined 后一律回落成默认的流式,导致「非流式」保存成功但重新打开开关仍是开的。 字段不加 omitempty:false 必须出现在响应里。 Closes #69 --- server/dto.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/dto.go b/server/dto.go index 8db7ba7..3b1f7dc 100644 --- a/server/dto.go +++ b/server/dto.go @@ -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, } }