-
Notifications
You must be signed in to change notification settings - Fork 152
feat: add safety settings threshold configuration #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -35,6 +35,7 @@ class ConfigLoader { | |||||
| maxContexts: 1, | ||||||
| maxRetries: 3, | ||||||
| retryDelay: 2000, | ||||||
| safetySettingsThreshold: "OFF", | ||||||
|
||||||
| safetySettingsThreshold: "OFF", | |
| safetySettingsThreshold: "BLOCK_NONE", |
Copilot
AI
Apr 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is marked as fixing #100, but the issue request specifically asks for a new config option named FORCE_BLOCK_LEVEL. Right now only SAFETY_SETTINGS_THRESHOLD is supported. To avoid leaving the issue partially addressed (and to preserve backward/forward compatibility with users following the issue text), consider supporting FORCE_BLOCK_LEVEL as an alias or updating the issue/PR description to reflect the chosen final name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getDefaultSafetySettings()treats "OFF" as a literalthresholdvalue and will send it to Gemini for each harm category. If the intent of "OFF" is to disable safety settings (i.e., let the API default apply), this should instead returnnull/undefined(and callers should skip settingsafetySettings) or map "OFF" to a documented threshold value. Otherwise, clarify in docs that "OFF" is forwarded verbatim.