agents-0-19-0-21-b
Claude Code's read-only tools, web search on, ludion sync off
Question
Which ai package versions does agents support as a peer dependency?
Answer key
- A correct answer says
- agents, @cloudflare/ai-chat and @cloudflare/codemode support both AI SDK v6 and v7 (`ai@^6 || ^7`, `@ai-sdk/react@^3 || ^4`); AI SDK v5 is not supported. @cloudflare/think now requires `ai@^7` only.
- The stale answer
- agents requires AI SDK v5 (or v6 only).
Answer
The `agents` package accepts `ai` versions `^6.0.0 || ^7.0.0` as a peer dependency, so any 6.x or 7.x release works (`node_modules/agents/package.json:84`). The peer dependency is optional (`peerDependenciesMeta`, line 122), which means you only need `ai` installed if you use the parts of `agents` that rely on it. The package itself is developed against `ai` `^7.0.0`, which is the version listed in its devDependencies.Grade
correct
The judge's reason: It states agents accepts ai ^6 || ^7 as a peer dependency, matching the key, and does not claim v5 or v6-only support.
Session log
Tool call: Grep
{ "pattern": "\"ai\":", "glob": "**/package.json", "output_mode": "content" }Tool output
node_modules\agents\package.json:60: "ai": "^7.0.0", node_modules\agents\package.json:84: "ai": "^6.0.0 || ^7.0.0", node_modules\agents\package.json:122: "ai": {Tool call: Read
{ "file_path": "C:\\Users\\haya0\\AppData\\Local\\Temp\\ludion-bench-HVJtAE\\work\\node_modules\\agents\\package.json", "offset": 55, "limit": 75 }Tool output
55 "@tanstack/ai": "0.38.0", 56 "@types/react": "^19.2.17", 57 "@valibot/to-json-schema": "1.3.0", 58 "@x402/core": "^2.17.0", 59 "@x402/evm": "^2.17.0", 60 "ai": "^7.0.0", 61 "chat": "^4.31.0", 62 "glob": "^13.0.6", 63 "highlight.js": "11.12.0", 64 "just-bash": "^3.0.2", 65 "react": "^19.2.7", 66 "teleproto": "^1.228.5", 67 "valibot": "1.4.2", 68 "zod": "^4.5.4" 69 }, 70 "peerDependencies": { 71 "@ai-sdk/provider": "^4.0.0", 72 "@ai-sdk/react": "^3.0.0 || ^4.0.0", 73 "@cloudflare/codemode": ">=0.5.0", 74 "@earendil-works/pi-ai": "^1.0.0", 75 "@earendil-works/pi-durable": "^1.0.0", 76 "@modelcontextprotocol/client": "2.0.0", 77 "@modelcontextprotocol/sdk": "1.30.0", 78 "@modelcontextprotocol/server": "2.0.0", 79 "@opencode/plugin": "^2.0.24", 80 "@opencode/sdk": "^2.0.24", 81 "@tanstack/ai": ">=0.10.2 <1.0.0", 82 "@x402/core": "^2.0.0", 83 "@x402/evm": "^2.0.0", 84 "ai": "^6.0.0 || ^7.0.0", 85 "chat": "^4.29.0", 86 "just-bash": "^3.0.0", 87 "react": "^19.0.0", 88 "vite": ">=6.0.0 <9.0.0", 89 "zod": "^4.0.0" 90 }, 91 "peerDependenciesMeta": { 92 "@ai-sdk/provider": { 93 "optional": true 94 }, 95 "@ai-sdk/react": { 96 "optional": true 97 }, 98 "@cloudflare/codemode": { 99 "optional": true 100 }, 101 "@earendil-works/pi-ai": { 102 "optional": true 103 }, 104 "@earendil-works/pi-durable": { 105 "optional": true 106 }, 107 "@opencode/plugin": { 108 "optional": true 109 }, 110 "@opencode/sdk": { 111 "optional": true 112 }, 113 "@tanstack/ai": { 114 "optional": true 115 }, 116 "@x402/core": { 117 "optional": true 118 }, 119 "@x402/evm": { 120 "optional": true 121 }, 122 "ai": { 123 "optional": true 124 }, 125 "chat": { 126 "optional": true 127 }, 128 "just-bash": { 129 "optional": trueAgent
The `agents` package accepts `ai` versions `^6.0.0 || ^7.0.0` as a peer dependency, so any 6.x or 7.x release works (`node_modules/agents/package.json:84`). The peer dependency is optional (`peerDependenciesMeta`, line 122), which means you only need `ai` installed if you use the parts of `agents` that rely on it. The package itself is developed against `ai` `^7.0.0`, which is the version listed in its devDependencies.