Bug in autoappended instruction in system prompt when using structured output

“”“Only generate a valid, parseable JSON. Besides scalars, boolean, and null, other values must be double-quoted as valid strings. Do not generate any comments inside the json block. Do not generate any control token (such as \n and \t) at any places. If a user requests multiple JSON, always return a single parseable JSON array. Do not include any extra text outside the JSON string.When producing JSON you must follow the schema provided in the context.”“”

Seems to be appended to the system prompt automatically when using structured output (vertex ai, all gemini 2.5 models at least). This was discovered with a prompt injection that was only intended to debug my own system prompt, but discovered this at the end of it.

There may be other problematic areas, but this line:
`Do not generate any control token (such as \n and \t) at any places.` is harmfull. For instance, we use gemini for translation. We have a structured output schema to retrieve the translation reliably. However, it sometimes returns the translation stripped of all formatting, which is likely attributed to the above autoinjected instruction.