Skip to content

fix(storage-resize-images): content filter failures in a region without the model don't name the region (existing extension bug, also in the kit) #3270

Open

Description

@IzaakGough

Existing bug in the storage-resize-images extension (0.3.6), carried over to the kit. It is not a kit/extension parity difference, so it is not tracked under #3263. Priority: low. In a region that doesn't serve the content filter model, every image goes to FAILED_IMAGES_PATH with no hint that the region is the cause.

Problem

The kit runs the content filter in the function's region (as the README says). In asia-south2, where gemini-2.5-flash returns 501, a benign jpeg was not resized and its original was copied to failed/. After three retries the log says only:

Failed to evaluate image content after multiple attempts: ... 501 Not Implemented

It doesn't name the model or the region. The extension runs the content filter in its install location too, and logs the same text (by reading). Its install offers 7 locations where gemini-2.5-flash is not served: direct Vertex AI calls from a test project returned 400 in us-west2, us-west3, asia-northeast2 and asia-southeast2, and 404 in europe-west6, asia-east1 and asia-east2. The extension was not deployed in those locations.

Reproduced

CONTENT_FILTER_LEVEL=BLOCK_MEDIUM_AND_ABOVE, FAILED_IMAGES_PATH=failed, bucket and function in asia-south2. A us-central1 control with the same config resized normally.

Code

Resolution

Include the model and the region in the final error, and in the README's content filtering region section, name the symptom (501 Not Implemented) a user will see.

Activity

  1. changed the title [-]fix(storage-resize-images): content filter failures in an unsupported region log only "501 Not Implemented"[/-] [+]fix(storage-resize-images): content filter failures in a region without the model don't name the region (existing extension bug, also in the kit)[/+] on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions