fix(llm): 测试连接补发自定义会话头,修 opencode zen 400

testLLM 单发路径既没往 context 挂 session id,也没把 profile 的
session_header_key 透传给 cfg,导致强制要求 x-opencode-session 的端点
(opencode zen)在"对话正常"时"点击测试"却 400 MissingSessionID。

- provider.go: TestConnection 挂一个一次性随机 session id 作头值
- server.go: testLLM 透传 session_header_key,并从已存 profile 兜底
- web: api.ts / llm page 把该字段传到 /llm/test
This commit is contained in:
Autumn-27 committed 2026-09-11 10:45:27 -04:00
1 parent d86dd152c3
commit 399f971f41
4 files changed
+31 -11

No files matched your search

+1
View File
@@ -400,6 +400,7 @@ function ProfileSheet({
toStore(effort),
profileId,
streaming,
sessionHeaderKey.trim(),
);
// 回复内容一并展示:看得见模型确实说了话,才算和会话里跑通是一回事。
if (r.ok)