Skip to content

[Agents] Document createAI catalog ids, dynamic routes, provider-native model objects, and stream resume - #34300

Open
mattzcarey wants to merge 4 commits into
productionfrom
docs/agents-models-run-and-resume
Open

mattzcarey wants to merge 4 commits into
productionfrom
docs/agents-models-run-and-resume

Conversation

@mattzcarey

@mattzcarey mattzcarey commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Updates the Agents SDK models pages (/agents/models/, AI SDK, Pi AI) and the OpenCode harness page to match createAI in the next agents release, and adds a changelog entry that introduces createAI as a new provider for the AI SDK and Pi AI. The changelog says it replaces the binding mode of workers-ai-provider and ai-gateway-provider, and that those packages will be deprecated once createAI covers everything they do. The pages now cover AI Gateway catalog ids (ai("anthropic/claude-opus-5.5")), dynamic routes in both frameworks, model objects on the provider-native endpoint, Pi AI catalog models on env.AI.run(), the byokAlias option, and automatic stream resume.

const ai = createAI({ binding: env.AI, id: "my-gateway" });

ai("@cf/zai-org/glm-4.7-flash"); // Workers AI, env.AI.run
ai("anthropic/claude-opus-5.5"); // AI Gateway catalog, env.AI.run
ai("dynamic/support"); // dynamic route, env.AI.run
ai(anthropic("claude-opus-5-5")); // vendor model object, provider-native endpoint

The current pages say model objects go through env.AI.gateway(id).run(), the deprecated Universal Endpoint, and that a string must be a @cf/ id. Neither is true after the next release:

Merge after the next agents release, which ships #2576 and #2589. No page pins a version number.

Blocker for the Pi AI examples: @earendil-works/pi-ai 1.2.0 (latest) spells Anthropic ids in its Cloudflare AI Gateway catalog the vendor's way (claude-opus-5-5, 1.0.0 had claude-opus-5.5). agents/models/pi-ai keys catalog ids off that list and sends the key to /run, so with 1.2.0 ai("anthropic/claude-opus-5.5") throws and ai("anthropic/claude-opus-5-5") sends an id the AI Gateway catalog does not list. This needs a fix in agents before release.

The BYOK page says env.AI.run() only uses the default alias. The gateway code forwards cf-aig-byok-alias from the binding and looks up the stored key under it, so the models pages say byokAlias works for catalog models. The BYOK page may need its own update.

pnpm run check, pnpm run build and pnpm run lint:nimbus pass. Claims checked against main of cloudflare/agents.

@mattzcarey
mattzcarey requested review from a team, irvinebroque and rita3ko as code owners October 14, 2026 13:33
@github-actions github-actions Bot added product:changelog product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. labels Oct 14, 2026
@cloudflare-docs-bot

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

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed 7b8a031 · 0 findings · incremental

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

@cloudflare-docs-bot

Copy link
Copy Markdown
Contributor

Review coverage

🟡 2 ownership areas need approval.

Suggested reviewers: @irvinebroque @southpolesteve

Needs approval Eligible approvers Suggested
agents
/src/content/docs/agents/
@irvinebroque, @rita3ko, @cloudflare/ai-agents, @cloudflare/dev-plat-leads, @cloudflare/product-owners irvinebroque, southpolesteve
agents
/src/content/changelog/agents/
@irvinebroque, @rita3ko, @cloudflare/ai-agents, @cloudflare/dev-plat-leads, @cloudflare/pm-changelogs, @cloudflare/product-owners southpolesteve
CODEOWNERS mappings for displayed areas (2)
Pattern Owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @cloudflare/ai-agents, @cloudflare/dev-plat-leads, @cloudflare/product-owners
/src/content/changelog/agents/ @irvinebroque, @rita3ko, @cloudflare/ai-agents, @cloudflare/dev-plat-leads, @cloudflare/pm-changelogs, @cloudflare/product-owners

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://docs-agents-models-run-and-resume.previews.developers.cloudflare.com (commit eb270e3)

This URL reflects your latest Preview deployment

Preview Deployments by commit

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

View logs ↗
7b8a031 2026-10-16T21:27:06.550Z View logs ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://5e355c64.previews.developers.cloudflare.com eb270e3 2026-10-14T16:49:09.362Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://64bbfd1d.previews.developers.cloudflare.com 0c9acc2 2026-10-14T16:20:19.865Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://24d62b22.previews.developers.cloudflare.com 969f2cb 2026-10-14T13:50:32.207Z Visit the dashboard ↗

@cloudflare-docs-bot

Copy link
Copy Markdown
Contributor

⚠️ @mattzcarey This pull request adds a changelog entry dated in the past:

  • src/content/changelog/agents/2026-10-14-createai-model-providers.mdx — dated 2026-10-14

Typically, changelog entries should be dated the day they merge. This is not blocking — if the date is unintentional, please update it.

@cloudflare cloudflare deleted a comment from github-actions Bot Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:changelog size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants