fix(qa): wire agent thinking toggle and show reasoning in RAG timeline

Default unset agent thinking to explicit false so thinking_type models
receive disabled/enabled wire params. Render reasoning inside the quick-answer
pipeline timeline only when thinking events arrive, avoiding a flash of the
thinking step when thinking mode is off.
This commit is contained in:
wizardchen
2026-06-23 19:59:41 +08:00
committed by lyingbug
parent be26563f86
commit bc9ad3aca0
9 changed files with 240 additions and 38 deletions
@@ -53,6 +53,11 @@ func prepareChatModel(ctx context.Context, modelService interfaces.ModelService,
PresencePenalty: chatManage.SummaryConfig.PresencePenalty,
Thinking: chatManage.SummaryConfig.Thinking,
}
if opt.Thinking != nil {
pipelineInfo(ctx, "Stream", "thinking_option", map[string]interface{}{
"enabled": *opt.Thinking,
})
}
return chatModel, opt, nil
}