feat: 舆情分析智能体改为经 Gateway 转发外部 AG-UI 网关

前端不再直连上游 SSE,改为 POST /api/sentiment-agent/stream 由后台代理转发,支持关闭 TLS 校验并回传完整错误信息。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
董宏凯andCursor committed 2026-08-25 18:26:48 +08:00
1 parent 5c0864bf0a
commit 62a3faa7c8
17 files changed
+398 -130

No files matched your search

@@ -0,0 +1,19 @@
"""舆情分析虚拟智能体的上游代理配置。
前端从 ``runtime-config.js`` 读取 AG-UI 地址和 Basic Auth,随每次请求传给
Gateway;本段只保留上游超时,地址以请求体里的 ``apiUrl`` 为准。
"""
from __future__ import annotations
from pydantic import BaseModel, Field
class SentimentAgentConfig(BaseModel):
"""Gateway 转发舆情分析 AG-UI 流时的超时。"""
timeout_seconds: float = Field(
default=300,
gt=0,
description="上游连接与读取超时(秒);流式问答可能持续数分钟",
)