feat(gemini): apply default safety settings across request translators

This commit is contained in:
hkfires
2025-10-31 08:20:47 +08:00
parent a517290726
commit a53c84d0d1
9 changed files with 75 additions and 8 deletions

View File

@@ -9,6 +9,7 @@ import (
"bytes"
"fmt"
"github.com/router-for-me/CLIProxyAPI/v6/internal/translator/gemini/common"
"github.com/router-for-me/CLIProxyAPI/v6/internal/util"
"github.com/tidwall/gjson"
"github.com/tidwall/sjson"
@@ -45,5 +46,5 @@ func ConvertGeminiCLIRequestToGemini(_ string, inputRawJSON []byte, _ bool) []by
}
}
return rawJSON
return common.AttachDefaultSafetySettings(rawJSON, "safetySettings")
}