googleapis / googleapis/java-genai
HARM_CATEGORY_JAILBREAK not supported in Gemini API
- Dominant language
- Java
- Stars
- 397
- Forks
- 125
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 41
Description
## Description
The `HarmCategory.Known.HARM_CATEGORY_JAILBREAK` enum value exists in the Java SDK (v1.32.0) but is explicitly marked as unsupported in the Javadoc:
> "The harm category is for jailbreak prompts. This enum value is not supported in Gemini API."
## Code Example
```java
List safetySettings = List.of(
SafetySetting.builder()
.category(HarmCategory.Known.HARM_CATEGORY_JAILBREAK) // Exists but not supported
.threshold(HarmBlockThreshold.Known.BLOCK_MEDIUM_AND_ABOVE)
.build()
);
```
## Questions
1. **Is this feature planned for future releases?** If yes, what is the expected timeline?
2. **Is there currently an alternative approach to prevent jailbreak attempts?**
## Environment
- SDK Version: `google-genai` 1.32.0 (Maven)
- Language: Java
## Expected Behavior
- A roadmap/timeline should be provided for when this feature will be supported
## Additional Context
This would help developers make informed decisions about security settings implementation.
Contributor guide
Assessment
This issue has not been assessed yet.