01 / DECISION
When this primitive earns a place
Use AI Gateway when multiple model calls need shared visibility, reliability controls, or provider-independent policy.
02 / ARCHITECTURE
Build the smallest defensible path
Classify prompts and identifiers, choose logging and retention intentionally, set rate and retry policy, and define provider fallback without changing semantics.
- 01Name the contract
Use AI Gateway when multiple model calls need shared visibility, reliability controls, or provider-independent policy.
- 02Add one primitive
Classify prompts and identifiers, choose logging and retention intentionally, set rate and retry policy, and define provider fallback without changing semantics.
- 03Capture failure evidence
Trace one request end to end, verify redaction and retention, trigger rate and provider failure, and compare the returned contract.
03 / REPRODUCE
Evidence before confidence
Trace one request end to end, verify redaction and retention, trigger rate and provider failure, and compare the returned contract.
npx wrangler ai models list 04 / BOUNDARY
The production boundary
Centralized logs can become a sensitive data store. Caching or fallback across models can change privacy, cost, and answer behavior.
05 / FIRST-PARTY SOURCES
Keep first-party sources authoritative
Product behavior, limits, pricing, and availability can change. Re-check these sources before acting.