Claude Opus 5.5

agents-0-19-0-21-b

Claude Code's read-only tools, web search on, ludion sync on

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 installed `agents` (0.27.0) declares `"ai": "^6.0.0 || ^7.0.0"` as a peer dependency, so it accepts AI SDK v6 or v7. Its `peerDependenciesMeta` marks `ai` as optional, so it only matters if you use the parts of `agents` that rely on the AI SDK. The related `@ai-sdk/react` peer accepts `^3.0.0 || ^4.0.0`. `ai` isn't currently installed in this project's `node_modules`.

Answering cost $0.11.

Grade

correct

The judge's reason: It states agents supports ai ^6 || ^7 and @ai-sdk/react ^3 || ^4, matching the key, with no stale v5 claim.

The judge's log

Session log

What the agent wrote, the tools it called, and what they returned, from docs/bench/2026-10-11-done3/runs/B-project-sync/agents-0-19-0-21-b.jsonl. Thinking and the session's settings are left out. The raw log

  1. Tool call: Bash

    {
      "command": "cd \"C:/Users/haya0/AppData/Local/Temp/ludion-bench-YOPncV/work\" && ls; cat node_modules/agents/package.json 2>/dev/null | grep -A15 -i '\"peerDependencies\"'; grep -A10 peerDependenciesMeta node_modules/agents/package.json",
      "description": "Check agents package peer dependencies"
    }
  2. Tool output

    CLAUDE.md
    node_modules
    package-lock.json
    package.json
    src
    wrangler.jsonc
      "peerDependencies": {
        "@ai-sdk/provider": "^4.0.0",
        "@ai-sdk/react": "^3.0.0 || ^4.0.0",
        "@cloudflare/codemode": ">=0.5.0",
        "@earendil-works/pi-ai": "^1.0.0",
        "@earendil-works/pi-durable": "^1.0.0",
        "@modelcontextprotocol/client": "2.0.0",
        "@modelcontextprotocol/sdk": "1.30.0",
        "@modelcontextprotocol/server": "2.0.0",
        "@opencode/plugin": "^2.0.24",
        "@opencode/sdk": "^2.0.24",
        "@tanstack/ai": ">=0.10.2 <1.0.0",
        "@x402/core": "^2.0.0",
        "@x402/evm": "^2.0.0",
        "ai": "^6.0.0 || ^7.0.0",
        "chat": "^4.29.0",
      "peerDependenciesMeta": {
        "@ai-sdk/provider": {
          "optional": true
        },
        "@ai-sdk/react": {
          "optional": true
        },
        "@cloudflare/codemode": {
          "optional": true
        },
        "@earendil-works/pi-ai": {
  3. Tool call: Bash

    {
      "command": "cd \"C:/Users/haya0/AppData/Local/Temp/ludion-bench-YOPncV/work\" && grep -A2 '\"ai\": {' node_modules/agents/package.json; grep '\"version\"' node_modules/agents/package.json node_modules/ai/package.json 2>/dev/null",
      "description": "Check ai optional flag and versions"
    }
  4. Tool output (error)

    Exit code 2
        "ai": {
          "optional": true
        },
    node_modules/agents/package.json:  "version": "0.27.0",
  5. Agent

    The installed `agents` (0.27.0) declares `"ai": "^6.0.0 || ^7.0.0"` as a peer dependency, so it accepts AI SDK v6 or v7. Its `peerDependenciesMeta` marks `ai` as optional, so it only matters if you use the parts of `agents` that rely on the AI SDK. The related `@ai-sdk/react` peer accepts `^3.0.0 || ^4.0.0`. `ai` isn't currently installed in this project's `node_modules`.