新增: anthropic 思维链解析入库与思考卡展示

- 流式与非流式 thinking 块接入 reasoning 通道
- 签名与密文块合规静默,请求侧零改动
- 历史映射透传 reasoning_content
- 思考卡数据源真推理文本优先
This commit is contained in:
lxy
2026-10-01 19:35:23 +08:00
parent bf0db10ef7
commit 1e6db6f310
5 changed files with 69 additions and 6 deletions
+2
View File
@@ -176,6 +176,8 @@ function parseConvMessages(rawMsgs: any[], fallbackPrefix: string): AiMessage[]
id: (m.id && m.id !== '') ? m.id : `${fallbackPrefix}-${i}`,
role: m.role,
content: m.content || '',
// 推理过程透传(DeepSeek/Anthropic thinking 同通道落库字段),undefined 保持缺省
reasoning_content: m.reasoning_content || undefined,
model: m.model,
// 用后端持久化的真实时间;老数据无 timestamp 字段回退 Date.now()
timestamp: typeof m.timestamp === 'number' ? m.timestamp : Date.now(),