For the complete documentation index, see llms.txt. Prefer markdown by appending.mdto documentation URLs or sendingAccept: text/markdown.
AI models
Model selection through AI Gateway or Workers AI, with the existing streaming interface, authentication, and response rendering.
You can choose a model that fits your product without rebuilding the streaming interface. The included Cloudflare adapter connects model requests to the same TanStack AI conversation and rendering foundation.
The model configuration is in src/routes/api/ai/chat.ts. Keep the existing request handling, authentication, stream response, and error handling when changing the provider settings.
AI Gateway
For a third-party model, select an identifier supported by your installed adapter and configure the provider in your gateway. Set the model and gateway to match that configuration.
AI Gateway provider setup covers credentials, and Unified Billing covers supported account-funded access. Check the provider's current model availability, limits, and pricing.
Workers AI
For a Cloudflare-hosted model, choose a supported entry from the Workers AI catalog. Use the direct AI binding configuration, or explicitly configure a gateway when you want gateway features too.
Direct Workers AI inference uses your Cloudflare account's model access and usage allowance. Model-specific inputs and options should follow the selected model's documentation.
Adapter support
The Cloudflare catalog and the adapter's supported models can differ. Check the installed adapter documentation before choosing a replacement, then test the model through the app.
For additional features and application templates, explore AI Kit.
How is this guide?
Last updated on



