From 68b3b36539023e485217b7aa2a8a264f4b024277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=B2=D1=82=D0=BE=D0=BC=D0=B0=D1=82=D0=B0=20=D0=9A?= =?UTF-8?q?=D0=B0=D0=BB=D0=B0=D1=88=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=D0=B0?= <3056129056@qq.com> Date: Fri, 27 Nov 2026 18:19:19 +0800 Subject: [PATCH] =?UTF-8?q?config:=20=E5=86=85=E5=AE=B9=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E5=8F=AA=E5=8C=B9=E9=85=8D=20/v1/chat/completions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 收敛匹配路径,去掉 /v1/completions;同时收回为其补的 choices.*.text 内容路径,回到插件默认值(choices[*].delta.content / message.content)。 --- config.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/config.yaml b/config.yaml index a3f9e63..2fe1773 100644 --- a/config.yaml +++ b/config.yaml @@ -73,7 +73,7 @@ plugins: - id: response-guard file: plugins/response_guard.lua match: - paths: ["/v1/chat/completions", "/v1/completions"] + paths: ["/v1/chat/completions"] network: allow: - domain: ai.leapstella.com @@ -95,15 +95,14 @@ plugins: force_flush_bytes: 4096 # 上限与判定能力对齐:8 段 × judge_chunk_bytes(16KB) = 128KB max_buffer_bytes: 131072 - # 必须显式列出两条路径: - # chat 格式正文在 choices[*].delta.content / message.content - # legacy completions(match.paths 里配了 /v1/completions)正文在 choices[*].text - # 只用默认值会漏审 completions 的正文,风险内容直接放行。 - content_path_stream: ["choices.*.delta.content", "choices.*.text"] - content_path_full: ["choices.*.message.content", "choices.*.text"] - # 工具调用参数也要审核时,在上面数组里追加: - # "choices.*.delta.tool_calls.*.function.arguments" - # "choices.*.message.tool_calls.*.function.arguments" + # 正文路径用插件默认值: + # 流式 choices[*].delta.content + # 非流式 choices[*].message.content + # 工具调用参数也要审核时,改成数组并在其中追加: + # content_path_stream: ["choices.*.delta.content", + # "choices.*.delta.tool_calls.*.function.arguments"] + # content_path_full: ["choices.*.message.content", + # "choices.*.message.tool_calls.*.function.arguments"] judge_chunk_bytes: 16384 judge_max_tokens: 512