| 1486 | 1486 | if (Number.isInteger(cachingAtDepth) && cachingAtDepth >= 0 && isClaude3or4) { |
| 1487 | 1487 | cachingAtDepthForOpenRouterClaude(request.body.messages, cachingAtDepth, cacheTTL); |
| 1488 | 1488 | } |
| 1489 | + |
| 1490 | + const isGemini = /google\/gemini/.test(request.body.model); |
| 1491 | + if (isGemini) { |
| 1492 | + bodyParams['safety_settings'] = GEMINI_SAFETY; |
| 1493 | + } |
| 1489 | 1494 | } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.CUSTOM) { |
| 1490 | 1495 | apiUrl = request.body.custom_url; |
| 1491 | 1496 | apiKey = readSecret(request.user.directories, SECRET_KEYS.CUSTOM); |