When using the newly released gemini-3.6-flash model via the GCP Vertex AI provider on Zoo Code 3.72.0, all prompts instantly fail with a 400 Bad Request error.
The API rejects the payload because Zoo Code's current architecture injects a partial model turn at the end of the request history to prefill tool usage (Assistant Prefilling). According to Google's updated documentation, prefilling model turns is no longer supported for Gemini 3.6 Flash and all future releases.
To Reproduce
- Set the API Provider to GCP Vertex AI.
- Set the Model to
gemini-3.6-flash.
- Submit any prompt to the agent.
- The request immediately fails with the following error.
Error Log
{"error":{"message":"{\n \"error\": {\n \"code\": 400,\n \"message\": \"Requests ending with a model turn are not supported.\",\n \"status\": \"INVALID_ARGUMENT\"\n }\n}\n","code":400,"status":"Bad Request"}}
Root Cause & API Changes
Google has fundamentally changed the Vertex AI API for Gemini 3.6 Flash and 3.5 Flash-Lite:
- API requests ending with a non-empty
model role turn are strictly disallowed and will return an HTTP 400 Error.
- Google recommends migrating to use
system_instruction or Native Structured Outputs instead of manually prefilling model turns to force JSON formatting or tool usage.
- As an additional heads up for the developers, Google has also deprecated the
temperature, top_p, and top_k sampling parameters for this model generation, and supplying them will also return a 400 error.
Temporary Workaround
Rolling the model back to gemini-3.5-flash works perfectly, as the older model architecture still supports Assistant Prefilling.
When using the newly released
gemini-3.6-flashmodel via the GCP Vertex AI provider on Zoo Code3.72.0, all prompts instantly fail with a 400 Bad Request error.The API rejects the payload because Zoo Code's current architecture injects a partial
modelturn at the end of the request history to prefill tool usage (Assistant Prefilling). According to Google's updated documentation, prefilling model turns is no longer supported for Gemini 3.6 Flash and all future releases.To Reproduce
gemini-3.6-flash.Error Log
{"error":{"message":"{\n \"error\": {\n \"code\": 400,\n \"message\": \"Requests ending with a model turn are not supported.\",\n \"status\": \"INVALID_ARGUMENT\"\n }\n}\n","code":400,"status":"Bad Request"}}Root Cause & API Changes
Google has fundamentally changed the Vertex AI API for Gemini 3.6 Flash and 3.5 Flash-Lite:
modelrole turn are strictly disallowed and will return an HTTP 400 Error.system_instructionor Native Structured Outputs instead of manually prefilling model turns to force JSON formatting or tool usage.temperature,top_p, andtop_ksampling parameters for this model generation, and supplying them will also return a 400 error.Temporary Workaround
Rolling the model back to
gemini-3.5-flashworks perfectly, as the older model architecture still supports Assistant Prefilling.