fix(ai-proxy): restrict the stream_options parameter to be effective only in the openai/v1/chatcompletions (#2524)

Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
This commit is contained in:
Xijun Dai
2025-07-01 21:44:34 +08:00
committed by GitHub
parent 9d68ccbf35
commit 41a1455874
2 changed files with 4 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ func (m *doubaoProvider) TransformRequestBody(ctx wrapper.HttpContext, apiName A
// 移除火山 responses 接口暂时不支持的参数
// 参考: https://www.volcengine.com/docs/82379/1569618
// TODO: 这里应该用 DTO 处理
for _, param := range []string{"parallel_tool_calls", "tool_choice", "stream_options"} {
for _, param := range []string{"parallel_tool_calls", "tool_choice"} {
body, err = sjson.DeleteBytes(body, param)
if err != nil {
log.Warnf("[doubao] failed to delete %s in request body, err: %v", param, err)