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,7 +114,8 @@ export default class GeminiProvider extends BaseProvider {
} }
private getSafetySettings(modelId: string): SafetySetting[] { private getSafetySettings(modelId: string): SafetySetting[] {
const safetyThreshold = modelId.includes('gemini-exp-') const safetyThreshold =
modelId.includes('gemini-exp-') || modelId.includes('thinking-exp')
? HarmBlockThreshold.BLOCK_NONE ? HarmBlockThreshold.BLOCK_NONE
: ('OFF' as HarmBlockThreshold) : ('OFF' as HarmBlockThreshold)