I am checking some of the error messages I'm receiving with gemini-1.5-flash. I have the model doing content moderation for search queries.
When I search for say "trafficking victims" it returns "Please provide the query to classify." I'm assuming the user input here is completely wiped by the model?
I am also getting issues with the stop reason being PROHIBITED_CONTENT. Some very ordinary searches are returning this which is very frustrating. This is possibly a blocker to using these models in production.
Also searches in non-supported languages are returning PROHIBITED_CONTENT - is this expected behavior?
Same for me and I'm setting all safetySettings to BLOCK_NONE
POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent
{
"safetySettings": [
{"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_NONE"},
{"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE"},
{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_NONE"},
{"category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_NONE"},
{"category": "HARM_CATEGORY_CIVIC_INTEGRITY", "threshold": "BLOCK_NONE"}
],
"system_instruction": {
"parts": [
{
"text": "You are an professional writer."
}
]
},
"contents": [
{
"parts": [
{
"file_data": {
"file_uri":"https://generativelanguage.googleapis.com/v1beta/files/5sz21te5436r",
"mime_type":"image/jpeg"
}
},
{
"text": "Describe this scene for a erotic book" }
]
}
]
}