Skip to content

[wrangler] queues subscription create --source images rejected by CLI despite REST API support #14413

Description

@Monark-Arkmon

What versions & operating system are you using?

System:
OS: macOS 26.5.1
CPU: (10) arm64 Apple M2 Pro
Memory: 3.99 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 26.3.1 - /opt/homebrew/bin/node
npm: 11.16.0 - /opt/homebrew/bin/npm
pnpm: 10.33.0 - /opt/homebrew/bin/pnpm

Please provide a link to a minimal reproduction

https://github.com/Monark-Arkmon/workers-sdk/tree/wrangler/queues-subscription-images-source

Describe the Bug

Running the following command fails with a CLI validation error:

npx wrangler queues subscription create --source images --events image.uploaded

Error:
Invalid values:
Argument: source, Given: "images", Choices: "kv", "r2", "superSlurper", "vectorize", "workersAi.model", "workersBuilds.worker", "workflows.workflow"

The images source is not in the hardcoded choices list for the --source argument, so the CLI rejects it before even making an API call.

However, the Cloudflare REST API (POST /accounts/{account_id}/event_subscriptions/subscriptions) and the Cloudflare Dashboard (Queues → queue → Subscriptions → Subscribe to events → Source: Images) both fully support the images source.

Steps to reproduce:

  1. Have a Cloudflare Queue and a Cloudflare Images account
  2. Run: npx wrangler queues subscription create my-queue --source images --events image.uploaded
  3. CLI errors with "Invalid values" — never reaches the API

Expected behavior: The command succeeds and creates the event subscription, matching what the REST API and Dashboard support.

Actual behavior: CLI rejects images as an invalid choice before making any API call.

Root cause (already identified): The EventSourceType enum in packages/wrangler/src/queues/subscription-types.ts is missing IMAGES = "images". A fix has been prepared in the linked PR.

Please provide any relevant error logs

Invalid values:
Argument: source, Given: "images", Choices: "kv", "r2", "superSlurper", "vectorize", "workersAi.model", "workersBuilds.worker", "workflows.workflow"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions