refactor: ComfyUI Agent - fix auth, upstream API, and SSE streaming

- Fix auth: use upstream API key (sk-boos4721) instead of local proxy
- Simplify SSE: remove nested SSE-in-SSE parsing, stream as plain text
- Fix frontend: add Authorization header from localStorage
- Fix ComfyUI nodes: default to api.boos.lat with correct API key
- All verified: frontend streaming works end-to-end with gpt-5.5
This commit is contained in:
boos
2026-05-17 04:17:12 +08:00
parent b78b622f0c
commit 5e3d4ee7d4
3 changed files with 32 additions and 91 deletions
+4 -1
View File
@@ -53,7 +53,10 @@ export default function ComfyUIAgent() {
const resp = await fetch('/api/comfyui-agent/chat', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('auth_token') || ''}`,
},
body: JSON.stringify({ messages: apiMessages }),
signal: abortController.signal,
});