Cloudflare
Cloudflare AI Gateway model examples.
The current Agno Cloudflare adapter uses AI Gateway's /compat/chat/completions endpoint. Cloudflare deprecates this endpoint for single-model calls while keeping it working for existing integrations. Dynamic routes still require it. For new direct model integrations, follow Cloudflare's current REST API guide.
| Example | Description |
|---|---|
| Basic | Run a Workers AI model through Cloudflare AI Gateway in sync, async, and streaming modes. |
| Switching Models | Switch Cloudflare AI Gateway models by passing a catalog binding to Cloudflare(id=...) or a cloudflare: model string. |
| Tool Use | Give a Cloudflare AI Gateway agent web search with WebSearchTools and stream the tool-calling run. |
| Structured Output | Generate JSON with Cloudflare Workers AI and validate it locally as a MovieScript. |