Skip to content

[Workers AI, AI Gateway] Move docs off workers-ai-provider and ai-gateway-provider - #34482

Closed
mattzcarey wants to merge 4 commits into
productionfrom
docs/deprecate-workers-ai-ai-gateway-providers
Closed

mattzcarey wants to merge 4 commits into
productionfrom
docs/deprecate-workers-ai-ai-gateway-providers

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

workers-ai-provider and ai-gateway-provider are deprecated on npm. This moves the docs to createAI from agents/models/ai-sdk.

  • 21 pages swap createWorkersAI for createAI and replace workers-ai-provider with ai @ai-sdk/provider (plus agents where it was missing) in their install commands. This includes agents/harnesses/think/configuration, which the original page list missed. In agents/concepts/calling-llms, the embedding call now uses ai.embedding(). sandbox/sdk/tutorials/ai-code-executor only had a related-resources link, which now points to /agents/models/ai-sdk/.
  • workers-ai/configuration/ai-sdk and ai-gateway/integrations/vercel-ai-sdk are rewritten as short createAI pages that link to /agents/models/ai-sdk/.
  • The AI SDK tab of the code selector on ai-gateway/usage/chat-completion (src/components/ai-gateway/) uses createAI with an account id and API token: a catalog id for Unified, the vendor's model object for Native, and vendorKey: "request" for a key in the request. The selector's models are current: gpt-6-luna, claude-opus-5-5, gemini-4-argon, grok-4.7 (catalog ids checked on the REST API; vendor ids on /compat).
  • One changelog entry: changelog/workers-ai/2026-10-21-workers-ai-provider-ai-gateway-provider-deprecated.mdx.

Merge after #34300 (it adds /agents/models/ai-sdk/) and the agents 0.29.0 release.

Pages left unchanged:

  • ai-search/agent-sdks/ai-sdk: pairs ai-search-provider (AI SDK v6) with workers-ai-provider@^3. createAI needs AI SDK v7.
  • ai-search/how-to/human-in-the-loop-knowledge-base: pins ai@6.
  • sandbox/sdk/tutorials/workers-ai-code-interpreter: walks through the code in the cloudflare/sandbox-sdk/examples/code-interpreter#v0 template, which pins ai@^6 and workers-ai-provider@^3.

@github-actions github-actions Bot added product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ product:changelog product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:ai-search product:sandbox product:agent-memory Related to Agent Memory product labels Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Worker Preview URL: https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com
Worker Preview Deployment URL: https://4c231389.previews.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/workers-ai/configuration/ai-sdk/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/workers-ai/configuration/ai-sdk/
https://developers.cloudflare.com/ai-gateway/integrations/vercel-ai-sdk/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/ai-gateway/integrations/vercel-ai-sdk/
https://developers.cloudflare.com/agents/communication-channels/chat/chat-agents/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/communication-channels/chat/chat-agents/
https://developers.cloudflare.com/changelog/post/2026-10-21-workers-ai-provider-ai-gateway-provider-deprecated/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/changelog/post/2026-10-21-workers-ai-provider-ai-gateway-provider-deprecated/
https://developers.cloudflare.com/agents/concepts/calling-llms/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/concepts/calling-llms/
https://developers.cloudflare.com/agents/runtime/operations/using-ai-models/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/runtime/operations/using-ai-models/
https://developers.cloudflare.com/agents/examples/browser-agent/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/examples/browser-agent/
https://developers.cloudflare.com/ai-search/agent-sdks/agents-sdk/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/ai-search/agent-sdks/agents-sdk/
https://developers.cloudflare.com/sandbox/get-started/build-an-ai-code-interpreter/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/sandbox/get-started/build-an-ai-code-interpreter/
https://developers.cloudflare.com/agent-memory/get-started/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agent-memory/get-started/
https://developers.cloudflare.com/agents/examples/chat-agent/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/examples/chat-agent/
https://developers.cloudflare.com/agents/harnesses/think/getting-started/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/harnesses/think/getting-started/
https://developers.cloudflare.com/agents/communication-channels/voice/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/communication-channels/voice/
https://developers.cloudflare.com/agents/examples/voice-agent/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/examples/voice-agent/
https://developers.cloudflare.com/agents/harnesses/think/ https://gh-docs-deprecate-workers-ai-ai-gateway-provide.previews.developers.cloudflare.com/agents/harnesses/think/

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://docs-deprecate-workers-ai-ai-gateway-providers.previews.developers.cloudflare.com (commit 8495c88)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://01564af8.previews.developers.cloudflare.com e55e6f4 2026-10-20T21:21:54.262Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a03c44a0.previews.developers.cloudflare.com 8495c88 2026-10-20T21:03:13.934Z Visit the dashboard ↗

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed e55e6f4 · 3 findings · incremental

👉 Fix in your agent 👈
Fix the following review findings in PR #34482 (https://github.com/cloudflare/cloudflare-docs/pull/34482).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification.
- If you disagree, explain why.
- If you need clarification before deciding, ask those questions.
- Then share your plan for which issues to tackle and in what order.

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit because the next review reads PR comments.

## Code Review
- C-169abcb3 | src/content/docs/ai-gateway/integrations/vercel-ai-sdk.mdx:56 | Catalog-id model calls contradict the createAI reference
  This example calls `ai("anthropic/claude-opus-5.5")` with a catalog id string, but the in-repo `/agents/models/ai-sdk/` reference for the same function states that any string that is not a `@cf/` id throws a `TypeError` and that third-party models must be passed as vendor model objects (e.g. `ai(anthropic("claude-opus-5-5"))`). The fallback example on line 91 lists `"openai/gpt-5.5"` even though the reference types `fallback` as `(WorkersAIModelId | LanguageModelV4)[]`. The selector's unified tab renders the same `ai("openai/gpt-6-luna")` pattern. Either the examples or the reference are wrong; reconcile before merge.
  ```txt
  model: ai("anthropic/claude-opus-5.5"),
  ```
- C-013d99c2 | src/components/ai-gateway/code-examples.astro:114 | Unified API tab renders the same vendor-native code as Native
  The `["unified", "native"]` flatMap renders `aiSDKNativeCode` with identical replacements for both API types, so with a key in the request the "Unified" tab shows byte-for-byte the same vendor-SDK code as "Native" (`createOpenAI({ apiKey: "{API_KEY}" })` plus `{ vendorKey: "request" }`). The PR describes the Unified tab as the catalog-id form (`ai("{id}")`), which is what the stored-key unified block renders. On `ai-gateway/usage/chat-completion` (which forces `forceAPI="unified"`), picking "Key in Request" therefore shows vendor-native code with the user's vendor key under the Unified label.
  ```txt
  (["unified", "native"] as const)
  ```

## Style Guide
- S-01e45b3d | src/content/changelog/workers-ai/2026-10-21-workers-ai-provider-ai-gateway-provider-deprecated.mdx:13 | Prose contains `please`
  The core writing style rules require removing `please` from prose. This line is plain prose (not inside a code block or backtick span), so it should state the instruction directly without the word.

Code Review

  • src/content/docs/ai-gateway/integrations/vercel-ai-sdk.mdx:56 · Catalog-id model calls contradict the createAI reference

    This example calls ai("anthropic/claude-opus-5.5") with a catalog id string, but the in-repo /agents/models/ai-sdk/ reference for the same function states that any string that is not a @cf/ id throws a TypeError and that third-party models must be passed as vendor model objects (e.g. ai(anthropic("claude-opus-5-5"))). The fallback example on line 91 lists "openai/gpt-5.5" even though the reference types fallback as (WorkersAIModelId | LanguageModelV4)[]. The selector's unified tab renders the same ai("openai/gpt-6-luna") pattern. Either the examples or the reference are wrong; reconcile before merge.

    model: ai("anthropic/claude-opus-5.5"),
  • src/components/ai-gateway/code-examples.astro:114 · Unified API tab renders the same vendor-native code as Native

    The ["unified", "native"] flatMap renders aiSDKNativeCode with identical replacements for both API types, so with a key in the request the "Unified" tab shows byte-for-byte the same vendor-SDK code as "Native" (createOpenAI({ apiKey: "{API_KEY}" }) plus { vendorKey: "request" }). The PR describes the Unified tab as the catalog-id form (ai("{id}")), which is what the stored-key unified block renders. On ai-gateway/usage/chat-completion (which forces forceAPI="unified"), picking "Key in Request" therefore shows vendor-native code with the user's vendor key under the Unified label.

    (["unified", "native"] as const)

Style Guide

  • src/content/changelog/workers-ai/2026-10-21-workers-ai-provider-ai-gateway-provider-deprecated.mdx:13 · Prose contains please

    The core writing style rules require removing please from prose. This line is plain prose (not inside a code block or backtick span), so it should state the instruction directly without the word.

Commands
  • /review Run a review now.
  • /full-review Review the entire PR diff.
  • /disable-auto-review Stop automatic reviews.
  • /rebase Rebase against production.

@mattzcarey

Copy link
Copy Markdown
Member Author

Folded into #34300, so it's one PR.

@mattzcarey mattzcarey closed this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agent-memory Related to Agent Memory product product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:ai-search product:changelog product:sandbox product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant