feat: extended safety threshold check to include 'thinking-exp' model ids

This commit is contained in:
kangfenmao 2025-01-20 12:55:24 +08:00
parent f86a274cd3
commit c04fd62bec

View File

@ -114,9 +114,10 @@ export default class GeminiProvider extends BaseProvider {
} }
private getSafetySettings(modelId: string): SafetySetting[] { private getSafetySettings(modelId: string): SafetySetting[] {
const safetyThreshold = modelId.includes('gemini-exp-') const safetyThreshold =
? HarmBlockThreshold.BLOCK_NONE modelId.includes('gemini-exp-') || modelId.includes('thinking-exp')
: ('OFF' as HarmBlockThreshold) ? HarmBlockThreshold.BLOCK_NONE
: ('OFF' as HarmBlockThreshold)
return [ return [
{ {