Skip to content

fix: standardize AIChatAgent and useAgentChat import paths - #37

Closed
adewale wants to merge 1 commit into
cloudflare:mainfrom
adewale:fix/standardize-ai-import-paths
Closed

fix: standardize AIChatAgent and useAgentChat import paths#37
adewale wants to merge 1 commit into
cloudflare:mainfrom
adewale:fix/standardize-ai-import-paths

Conversation

@adewale

@adewale adewale commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes import path inconsistency for AIChatAgent and useAgentChat across 4 files. Three different import patterns were being used:

  • "agents"
  • "agents/ai-chat-agent"
  • "@cloudflare/ai-chat"

Changes

Standardized all imports to use the canonical @cloudflare/ai-chat package:

File Before After
cloudflare/references/agents-sdk/patterns.md:8 "agents" "@cloudflare/ai-chat"
cloudflare/references/agents-sdk/api.md:10 "agents" "@cloudflare/ai-chat"
cloudflare/references/agents-sdk/README.md:30 "agents" "@cloudflare/ai-chat"
building-ai-agent-on-cloudflare/SKILL.md:297 "agents/ai-chat-agent" "@cloudflare/ai-chat"
cloudflare/references/agents-sdk/patterns.md:42 "agents/ai-react" "@cloudflare/ai-chat/react"
cloudflare/references/agents-sdk/api.md:177 "agents/ai-react" "@cloudflare/ai-chat/react"

Verification

…CLI syntax

Verified each correction against official Cloudflare documentation.

- KV pricing wrong by 10x, D1 pricing wrong by 1000x
- CPU time limits showed ms instead of seconds across 16 files
- routeAgent misspelled (missing 'Request'), nodejs_compat_v2 standalone usage
- wrangler check described as config validation (actually startup profiling)
- Vectorize batch limit 500 -> 1000, wrangler version v3.91 -> v4
- Sandbox: runCode() API, return types, Docker tags, exec() timeout
- Agent binding name mismatch, multi-agent fetch() -> RPC
- Secrets Store CLI syntax, README missing cloudflare-api MCP server
- web-perf description missing INP, KV reads label misleading
@adewale

adewale commented Apr 6, 2026

Copy link
Copy Markdown
Contributor Author

Closing: branch still included unrelated changes. Replaced by PR from a clean branch off main.

@adewale adewale closed this Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant