Antigravity Gemini 3.8 Flash: PROHIBITED_CONTENT despite safetySettings=OFF, with inconsistent outcomes
Hi,
I’m investigating inconsistent safety behavior on the Antigravity / Cloud Code Assist serving path for gemini-3.8-flash-tiered.
I verified in the final HTTP payload, immediately before dispatch, that the request contains explicit safetySettings with the supported harm categories set to OFF, including:
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"threshold": "OFF"
}
The requests are accepted with HTTP 200.
However, on the Antigravity path, the same model has produced three distinct outcomes for adult consensual fictional content:
-
Textual refusal
finishReason: STOP- normal HTTP 200
- no
safetyRatings - no
promptFeedback - no
blockReason
-
Normal completion
finishReason: STOP- several thousand output tokens can complete normally
-
Generation begins normally and is later terminated
- native
finishReason: PROHIBITED_CONTENT - HTTP 200
- the stream may already contain substantial generated text before termination
- no visible reasoning
- no
safetyRatings,promptFeedback, orblockReasonobserved in the captures
- native
Some observed examples from gemini-3.8-flash-tiered:
| Outcome | Chunks | Visible chars | Approx. duration |
|---|---|---|---|
PROHIBITED_CONTENT |
34 | 3,117 | ~30.5 s |
PROHIBITED_CONTENT |
163 | 15,424 | ~25.8 s |
PROHIBITED_CONTENT |
26 | 2,350 | ~7.5 s |
PROHIBITED_CONTENT |
19 | 1,590 | ~7.3 s |
STOP |
151 | 14,167 | ~21.9 s |
STOP |
167 | 15,821 | ~24.6 s |
STOP |
33 | 2,809 | ~9.6 s |
The same provider account has produced both STOP and PROHIBITED_CONTENT.
This means the behavior does not appear to be explained by a simple threshold based on:
- output length;
- number of chunks;
- generation duration;
- provider/account selection.
I also tested omission of Antigravity body metadata:
requestType: "agent"- body
userAgent: "antigravity"
Removing either or both did not change the observable model routing (gemini-3.8-flash-tiered) or the textual-refusal behavior in the controlled test.
The HTTP User-Agent remained unchanged during those tests.
What I am trying to understand
I am specifically trying to understand the API contract of safetySettings on the Antigravity / Cloud Code Assist path.
Questions
-
Does
safetySettings: OFFapply toPROHIBITED_CONTENT, or only to the configurable harm-category filters that normally exposesafetyRatings/SAFETY? -
Is
PROHIBITED_CONTENTgenerated by a separate, non-configurable serving-side policy? -
Does Antigravity / Cloud Code Assist apply additional product-level safety policy beyond the supplied Gemini
safetySettings? -
Is a model-generated textual refusal with
finishReason: STOPexpected even when the relevant harm category is explicitly set toOFF? -
Is it expected that regenerated/equivalent requests may alternate between normal completion and
PROHIBITED_CONTENT? -
Is there any additional response metadata that clients should inspect to determine which safety layer caused
PROHIBITED_CONTENT? -
Is the behavior of
safetySettingsintentionally different between:- Antigravity / Cloud Code Assist
- Vertex AI
- Gemini API / AI Studio
-
When a request returns HTTP 200 and later terminates with
PROHIBITED_CONTENT, should clients treat that as:- configurable safety filtering,
- non-configurable policy enforcement,
- or a separate serving-layer termination condition?
Related observation
I am aware of previous reports where the Antigravity builder omitted safetySettings, causing Google Cloud Code to apply its own defaults and return PROHIBITED_CONTENT.
That specific issue does not appear to explain this case, because here the final request payload has been captured and safetySettings is present on the wire with the relevant categories set to OFF.
So the main question is whether PROHIBITED_CONTENT belongs to a different enforcement layer than the configurable Gemini safety filters.
I’m not asking how to bypass safety policy.
I’m trying to understand which configuration fields are actually authoritative on this serving path, and which response metadata clients should use to distinguish configurable safety filtering from other server-side enforcement.
I can provide sanitized final request payloads, raw SSE traces, timestamps, and exact finishReason captures if useful.