Skip to content
Source
Sign inSign up
TanStack/schemas

FAL pricing extract: AI Gateway 500s because the model id is claude-sonnet-5-5, not the catalog's claude-sonnet-5.5 #556

Closedtombeckenham opened this issue 0 comments
tombeckenhamcommented

The FAL pricing extract has failed on every AI Gateway call since #551 deployed (2026-11-01 15:14 UTC). No FAL leftover has been priced since the switch from Grok.

Evidence (2026-11-02)

  • All 21 requests on the modelschemas gateway returned 500 Model execution failed (Error). The gateway logs show provider: "unknown", wholesale: false and cost 0.
  • PostHog ingest_failed (job fal-pricing-extract) fired on every hourly run from 06:00 to 11:00 UTC: leftover retry: N | 500 Model execution failed (Error).
  • The gateway itself is set up correctly: it exists and Unified Billing is on. In September the default gateway served openai/gpt-5.5 (dotted ID) through the same /run path.

Cause

  • gatewayChat (src/server/ingest/extract-fal-pricing.ts) passes Anthropic's own ID, FAL_PRICING_EXTRACT_MODEL = 'claude-sonnet-5-5', to createAnthropicChat.
  • cloudflareBindingFetch (@tanstack/ai-cloudflare 1.0.0) adds the vendor prefix and calls env.AI.run('anthropic/claude-sonnet-5-5', body).
  • Cloudflare's catalog ID is anthropic/claude-sonnet-5.5, with a dot. Our own cloudflare-ai-gateway listing has that rawId.
  • The #550 model comparison used provider keys directly, so it never tested the ID the binding receives.

Fix

  • Send the catalog ID to the binding: claude-sonnet-5.5, and claude-haiku-5.5 for the Haiku option.
  • Add a unit test that the ID passed to ai.run is anthropic/claude-sonnet-5.5.
  • After the deploy, call POST /v1/admin/extract/fal and confirm a 200 in the gateway logs.
  • Upstream, @tanstack/ai-cloudflare's doc example passes 'claude-opus-5-5', which has the same mismatch. Consider filing an issue there.
  1. tombeckenham closed this

Sign in to join this conversation.