Undocumented Behavior: Gemini 2.5 Flash Can Parse DOCX Files and Arbitrary Binary Data

Description

According to the official Vertex AI documentation for Gemini 2.5 Flash, the only supported MIME types for document inputs are:

Additionally, a Google representative stated in the forum that unsupported file types are extracted as pure text but without preserving structure.
[discuss.ai…google.dev]

Observed Behavior (Potential Issue)

While testing the API, I discovered:

  1. I can upload a DOCX file as raw binary data, and Gemini 2.5 Flash is able to answer questions about its content, even though DOCX is not listed as a supported MIME type.

  2. I tested further by uploading the raw binary of a compiled C program (.out / ELF).
    The model was able to extract and return the main() function signature, even though:

    • Executable binaries are not documented as supported inputs.

    • The API should normally reject unsupported MIME types, as seen in the StackOverflow report of .docx uploads causing a 400 Unsupported MIME type error.
      [stackoverflow.com]

This suggests the model backend attempts automatic text extraction from arbitrary binary data, which is not documented.

Why This May Be Important

  • The behavior is not described in the official documentation.

  • It differs from what users would expect based on the stated MIME limitations.

  • It may have security or privacy implications if the model automatically extracts strings from binary files.

  • It is unclear whether this is:

    • intended behavior,

    • an undocumented feature,

    • or a backend oversight.

Request

Could Google clarify:

  1. Whether extracting text from unsupported formats (including binary executables) is intended behavior?

  2. Whether this automatic extraction should be considered safe/production‑ready?

  3. Whether future documentation will explicitly address this behavior?

  4. Whether the API should reject non‑PDF, non‑text files more strictly?

Thank you!