Commit 6e62b761 by Calcium-Ion Committed by GitHub

Merge pull request #1652 from HynoR/feat/ds3.1

feat: adapt Volcengine adaptor for deepseek3.1 with thinking mode
parents 1b8bcfb0 c94a74c3
......@@ -2,6 +2,7 @@ package volcengine
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
......@@ -214,6 +215,12 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn
if request == nil {
return nil, errors.New("request is nil")
}
// 适配 方舟deepseek混合模型 的 thinking 后缀
if strings.HasSuffix(info.UpstreamModelName, "-thinking") && strings.HasPrefix(info.UpstreamModelName, "deepseek") {
info.UpstreamModelName = strings.TrimSuffix(info.UpstreamModelName, "-thinking")
request.Model = info.UpstreamModelName
request.THINKING = json.RawMessage(`{"type": "enabled"}`)
}
return request, nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment