Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Cloudflare AI

Packages and examples for building AI-powered applications on Cloudflare. Includes providers for the Vercel AI SDK and TanStack AI, with support for Workers AI and AI Gateway.

Packages

PackageDescriptionnpm
workers-ai-providerWorkers AI provider for the Vercel AI SDK. Chat, image generation, embeddings, transcription, text-to-speech, and reranking — plus the AI Gateway delegate (unified catalog, resume (coming soon), server-side fallback). Docs.npm
@cloudflare/tanstack-aiWorkers AI and AI Gateway adapters for TanStack AI. Chat, image, transcription, TTS, summarization, plus gateway routing and resumable streaming (coming soon). Docs.npm
ai-gateway-providerAI Gateway provider for the Vercel AI SDK — wrap pre-built @ai-sdk/* models and route them through AI Gateway with caching, retries, and cross-vendor fallback. Docs.npm

Documentation

In-depth guides and API reference live in docs/: how the packages relate, gateway routing, resumable streaming (coming soon), binding vs REST, and per-package guides.

Examples

ExampleDescription
examples/workers-aiFull-featured Workers AI playground using the Vercel AI SDK. Demonstrates all 6 capabilities: chat (with tool calling and reasoning), image generation, embeddings, transcription, text-to-speech, and reranking. Supports both binding and REST API modes.
examples/tanstack-aiMulti-provider demo using TanStack AI. Provider-first UI with Workers AI (binding and gateway), OpenAI, Anthropic, Gemini, Grok, and OpenRouter — each with capability sub-tabs for chat, image, summarize, transcription, and TTS.

Demos

The demos/ directory contains additional focused demos for specific patterns — tool calling, structured output, agents, MCP servers, and more.

Local Development

# Clone and install
git clone git@github.com:cloudflare/ai.git
cd ai
pnpm install

# Run an example
cd examples/workers-ai
pnpm dev

# Run tests for a package
cd packages/workers-ai-provider
pnpm test

# Run E2E tests (requires Cloudflare credentials)
pnpm test:e2e

Contributing

  1. Fork or clone the repo, then pnpm install from the root.
  2. Create a branch for your change.
  3. If your change affects a published package, run pnpm changeset and describe what changed.
  4. Submit a PR to main.

Release Process

This repo uses Changesets. When a PR with changesets merges to main, a "Version Packages" PR is created automatically. Merging that PR bumps versions and publishes to npm.

关于 About

No description, website, or topics provided.

语言 Languages

TypeScript100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
515
Total Commits
峰值: 47次/周
Less
More

核心贡献者 Contributors