Skip to content

Show listed per-unit prices for speech models - #121

Merged
szweibel merged 1 commit into
mainfrom
agent/model-unit-prices
Oct 14, 2026
Merged

szweibel merged 1 commit into
mainfrom
agent/model-unit-prices

Conversation

@szweibel

Copy link
Copy Markdown
Collaborator

Change

Renders the Gateway's new optional unit_prices field (cail-gateway#189). Workers AI speech models list a price per audio minute.

  • Whisper now shows "$0.000453 per audio minute", and Whisper turbo and MeloTTS show their own listed prices.
  • Speech and image models without a listed price show "Price not published". Cloudflare lists no price for FLUX.1 schnell.
  • A malformed unit_prices value is ignored, the same as a malformed token pricing.

Merge after cail-gateway#189 is deployed. Until then the field is absent and the page shows "Price not published" for these models.

Verification

  • bun run check passes under the pinned Bun 1.4.2: audit clean, lint, astro check, build.

  • tests/models_page_browser.py passes 8/8 and tests/accessibility_browser.py passes 5/5 against a local Wrangler preview.

  • New fixture rows cover two cases:

    • Whisper with a listed price shows "$0.000453 per audio minute";
    • MeloTTS with a non-USD price shows "Price not published".

    The FLUX row now expects "Price not published".

🤖 Generated with Claude Code

The Gateway now publishes `unit_prices` for Workers AI models priced in a
unit other than tokens, such as Whisper's audio minute. The registry shows
them as "$0.000453 per audio minute". Speech and image models with no listed
price show "Price not published"; a malformed unit price is ignored like a
malformed token price.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@szweibel
szweibel merged commit 4a40a7e into main Oct 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant