fix(场景): 准确报告策略阻断并对齐文本路径

在解码 SSE 前检查 HTTP 状态和响应类型,避免将 JSON 错误响应误报为 PluginFailure。增加 verbose 插件执行日志及 403、502 回归测试,修正响应插件的 data.content 路径,并保留本地关闭网络审核插件的配置。
This commit is contained in:
starrrLight committed 2026-10-16 14:25:02 +08:00
1 parent 48f7dfc59f
commit 17c56cac3c
4 files changed
+61 -7

No files matched your search

+3 -2
View File
@@ -27,6 +27,7 @@ llm:
plugins:
- id: network-review
enabled: false
file: plugins/network_review.lua
match:
paths: [/chat/stream]
@@ -49,7 +50,7 @@ plugins:
llm: {allow: [guard_model]}
config:
model: guard_model # 必须与 llm 注册的 id 一致
content_path: content
content_path: data.content
- id: request-rewrite
file: plugins/request_rewrite.lua
@@ -64,7 +65,7 @@ plugins:
paths: [/chat/stream]
config:
text_event: text_delta
content_path: content
content_path: data.content
terminal_error_events: [run_error]
control_event_names: [heartbeat, run_started, run_finished, run_error, run_completed]
max_buffer_bytes: 262144