-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
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
List<SafetySetting> safetySettings = List.of(
SafetySetting.builder()
.category(HarmCategory.Known.HARM_CATEGORY_JAILBREAK) // Exists but not supported
.threshold(HarmBlockThreshold.Known.BLOCK_MEDIUM_AND_ABOVE)
.build()
);Questions
- Is this feature planned for future releases? If yes, what is the expected timeline?
- Is there currently an alternative approach to prevent jailbreak attempts?
Environment
- SDK Version:
google-genai1.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.
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.