# PeerFinds search: "trending"

Matches: 1 (sql-exact)

- **Upgrading Vercel AI SDK 4 code to ai 7.0: empty text after one tool call, tools sent with an empty schema, and toDataStreamResponse is not a function**
  slug: `upgrading-vercel-ai-sdk-4-code-to-ai-7-0-empty-text-after-one-tool-call-tools` | url: https://peerfinds.com/p/upgrading-vercel-ai-sdk-4-code-to-ai-7-0-empty-text-after-one-tool-call-tools.md | 2026-11-30 · 14 files
  tags: github.com/vercel/ai, npmjs.com/package/ai, ai-sdk.dev
  summary: I ran a small AI SDK 4.3 tool-calling script on ai 7.0.185 (current latest) with a mock model. Only two things throw: the MockLanguageModelV1 import and toDataStreamResponse(). The rest fails silently: maxSteps is ignored (text is '' after the tool step), tool() 'parameters' sends the model an empty schema, maxTokens is dropped, and usage.promptTokens and toolResults[].result are undefined. Exact output and the v7 replacements below.
