AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業このサイトについてRSS
© 2026 ainew.jp
お問い合わせ特定商取引法に基づく表記
ニュース一覧元記事を開く
Vercel Blog·2026年6月25日 16:00·約18分で読める

AI SDK 7 が利用可能に

#TypeScript#マルチモーダル AI#エージェント#推論制御#OpenTelemetry#Vercel
TL;DR

Vercel は TypeScript ベースの AI SDK 7 をリリースし、マルチモーダル対応やエージェント実行機能の強化、および Node.js 22 と ESM 必須化による大規模なアーキテクチャ刷新を行った。

AI深層分析2026年6月25日 23:03
4
重要/ 5段階
深度40%
5
関連度30%
5
実用性20%
4
革新性10%
3

キーポイント

1

多機能なエージェントプラットフォームへの進化

単なるモデル呼び出しから脱却し、テキスト・音声・画像・動画を含むマルチモーダルな開発、実行、統合、観測を可能にする包括的なプラットフォームへと拡張された。

2

Node.js 22 と ESM への強制移行

ネイティブ fetch や AsyncLocalStorage の利用など、新機能の実装のために Node.js 22 以上と ESM インポート形式が必須となり、CommonJS はサポートされなくなった。

3

推論制御とコンテキスト管理の強化

主要プロバイダーに跨る統一的な推論設定や、ツールごとの権限を細かく制御できるスコープ付きコンテキスト、および大規模ファイルの効率的なアップロード機能が追加された。

4

観測性と開発体験の向上

リデザインされたテレメトリ、OpenTelemetry 対応、ライフサイクルコールバック、そして移行用 codemods の導入により、エージェントの動作監視とアップグレードが容易になった。

5

本番環境向けエージェント強化機能

承認ポリシーの柔軟な定義、HMAC署名による改ざん防止、およびデプロイや中断に耐える永続実行(WorkflowAgent)が追加されました。

6

外部コーディングエージェントの統合

Claude Code や Codex などの既存ランタイムを AI SDK の統一インターフェースでラップし、サンドボックスや認証機能を活用して本番環境で実行可能になりました。

7

強化された観測性とセキュリティ

OpenTelemetryパッケージの導入とNode.jsトレーシングチャネルにより、構造化イベントの一元管理が可能になり、機密情報の漏洩を防ぐためのコンテキスト制御が強化されました。

影響分析・編集コメントを表示

影響分析

このリリースは、TypeScript を用いた本番環境向け AI エージェント開発の標準を再定義するものであり、特にマルチモーダル機能と堅牢な実行制御の強化は、複雑な業務自動化や高度なインタラクションを持つアプリケーションの実装を加速させる。一方で、Node.js 22 と ESM の強制移行は、既存のレガシープロジェクトにとって大きな移行コストとなるが、長期的には開発環境の統一とパフォーマンス向上に寄与する。

編集コメント

Vercel は開発者体験を最優先しつつ、AI エージェントの複雑さを抽象化する方向へ大きく舵を切りました。Node.js のバージョンアップ要件は厳しいですが、これにより得られるパフォーマンスと機能性は、本番環境での利用には不可欠な進化と言えます。

AI SDK 7 は、TypeScript で本番環境用のエージェントを構築するための主要リリースです。この SDK は、モデル呼び出しやチャートの基本機能から発展し、テキスト、音声、リアルタイム、画像、動画にわたるエージェントの開発、実行、統合、観測のためのより広範なエージェントプラットフォームへと成長しました。すべての主要プロバイダーが標準でサポートされています。

概要

推論制御、ツールとランタイムのコンテキスト、プロバイダーファイルおよびスキルサポート、MCP アプリ、ターミナル UI を備えたエージェントを開発します。

ツールの承認、永続的な WorkflowAgent 実行、ファーストクラスのタイムアウト、サンドボックスサポートを備えてエージェントを実行します。

Codex、Claude Code、Deep Agents、OpenCode、Pi など、あらゆるエージェントハネスに統合します。

再設計されたテレメトリ、@ai-sdk/otel、Node.js トレースチャネルサポート、ライフサイクルコールバック、ステップパフォーマンス統計を使用して、エージェントの動作を観測します。

安定した音声/文字起こし API、より豊富なファイルパーツ、画像生成および編集、多モーダル埋め込み、再ランク付け、リアルタイム音声(実験的)、動画生成(実験的)を備えて、テキストを超えた構築を行います。

新しい移行スキル、コードモッド、ESM 向け移行パス、Node.js 22 向け移行パス、指示、テレメトリ、ストリーム、finalStep、runtimeContext、toolsContext を通じて、より明確な API でアップグレードします。

アップグレード前の注意

AI SDK 7 は、2 つの破壊的変更を伴う要件を導入しました:

Node.js 22 必須: SDK がネイティブ fetch 実装や改善された AsyncLocalStorage セマンティクスなど、以前の LTS ラインにバックポートされていない API に依存しているため、Node 22 が必要です。

ESM インポートが必要です:AI SDK 7 では ESM インポート(import 構文または .mjs ファイル)が必須です。CommonJS の require() はサポートされていません。"type": "module" を package.json に追加するか、個々のファイルを .mjs へ移行してください。

v7 codemods を実行して、インポート名の変更やリネームの大部分を自動化し、セマンティックな移行項目については手動でレビューを行ってください。完全な v7 マイグレーションガイドはこちらをご覧ください。

エージェントの開発

プロバイダー非依存の推論制御:generateText および streamText は、OpenAI、Anthropic、Google、Groq、xAI、Bedrock、Fireworks、DeepSeek、Open Responses、および OpenAI 互換プロバイダーにまたがるネイティブ設定にマッピングされるトップレベルの推論オプションをサポートするようになりました。ただし、正確な動作や利用可能なパラメータはプロバイダーによって異なります。

型付きランタイムコンテキスト:共有オーケストレーション状態は runtimeContext に格納され、prepareStep、承認関数、ライフサイクルコールバック、テレメトリ、ToolLoopAgent、WorkflowAgent を通じて流れます。

スコープ指定されたツールコンテキスト:ツールは contextSchema を宣言でき、呼び出し側は toolsContext を介してツールごとの値を提供するため、サードパーティ製ツールが必要なシークレットや設定のみを受け取ります。

プロバイダーによるファイルアップロード:uploadFile は大規模な入力を一度だけアップロードし、後続の呼び出しでプロバイダー参照を再利用することで、PDF、データセット、画像、多段階ワークフローにおける重複するアップロードを削減します。

プロバイダーによるスキルアップロード:uploadSkill は、プロバイダー管理型のスキル環境に対して同じパターンをもたらします。

MCP アプリ:MCP サポートには、モデル可視化ツールとアプリ専用ツールの区別、アプリメタデータ、サンドボックス化された iframe レンダリング、およびツール・リソース・ログ・表示更新のための JSON-RPC 通信が新たに追加されました。

ターミナルエージェント開発:@ai-sdk/tui は、対話型ターミナル UI で AI SDK エージェントを実行し、完全なアプリを構築する前に推論、ツール、マークダウン出力のテストが可能になります。

本番環境でのエージェント実行

AI SDK 7 では、ローカルデモから本番環境へ移行した際にエージェントが必要とする基盤が追加されました。

ツールの承認:generateText、streamText、および ToolLoopAgent は、呼び出しレベルまたはエージェントレベルで承認ポリシーを定義できます。ポリシーには、ユーザーの承認が必要な設定、自動承認、自動拒否、または型付き承認関数への委任が含まれます。

堅牢な承認リプレイ:リスクの高い承認フローでは、継続前にツールの入力とポリシーを再検証し、WorkflowAgent による承認検証を使用でき、HMAC 署名に対応できます。HMAC 署名により、元のツール入力が承認トークンに暗号学的に紐付けられ、承認要求から再開までの間にツール引数が改ざんされるのを防ぎます。

永続的実行:@ai-sdk/workflow は、長時間実行されるエージェント向けの WorkflowAgent を導入しました。実行状態はステップ間で永続ストレージに保存されるため、デプロイ、プロセスの再起動、中断、承認の遅延が発生してもエージェントは生存し続けます。詳細については、WorkflowAgent のドキュメントをご覧ください。

ワークフロー対応エージェント機能:WorkflowAgent は、ストリーミング、ツール、承認、型付きランタイムとツールコンテキスト、ライフサイクルコールバック、安定したテレメトリ、プロバイダー実行による承認再開、およびツール結果変換をサポートしています。

ファーストクラスのタイムアウト:テキスト生成およびエージェント API では、総時間、ステップごとの時間、チャンクごとの時間、デフォルトのツールの時間、および各ツールの時間予算を定義できます。タイムアウトによる中止は TimeoutError を使用し、中止理由はストリームと UI プロトコルを通じて流れます。

サンドボックス化された実行:サンドボックス抽象化は、コマンド実行、ストリーミング出力、作業ディレクトリ、環境変数、中止シグナル、およびステップレベルのサンドボックスオーバーライドをサポートしています。

エージェントハッチの統合

AI SDK 7 は、確立されたコーディングエージェントを AI SDK エコシステムに組み込むためのハッチ層を導入しました。Claude Code、Codex、Pi などのハッチを、SDK の残りの部分で使用される同じエージェントインターフェースでラップします。

HarnessAgent:外部のエージェントハッチを AI SDK エージェントインターフェースを通じて実行し、標準的な生成およびストリーム結果を取得できます。

コーディングエージェント用アダプター:Claude Code、Codex、Pi 用のハッチアダプターにより、チームは既存のエージェントランタイムを AI SDK アプリにプラグインできます。

設定可能なハッチ実行:ハッチエージェントは、サンドボックス、指示、カスタムスキル、およびツールを受け取ることができ、同じランタイムを異なるプロダクトやワークフローに合わせて調整できます。

永続的で再開可能なセッション:ワークフローユーティリティ、セッションブリッジ、中断されたターン継続用の API により、ハッチ実行はより長いコーディングタスクに適しています。

Gateway 対応認証:Harness アダプターは AI Gateway のための Vercel OIDC をサポートし、ホスト型およびサンドボックス化されたエージェント実行を簡素化します。

エージェントの観測

グローバルテレメトリ統合:テレメトリを一度登録するだけで、モデル呼び出し、ステップ、ツール、埋め込み(embeddings)、再ランク付け(reranking)、そしてエージェント実行全体にわたって構造化イベントを受信できます。

専用 OpenTelemetry パッケージ:OpenTelemetry サポートは now @ai-sdk/otel に統合され、GenAI 向けセマンティック規約のスパンとメトリクス、補完的な AI SDK 属性、スパン拡張フックを提供します。詳細については、@ai-sdk/otel のドキュメントをご覧ください。

Node.js トレースチャネル:AI SDK 7 は Node.js トレースチャネルを通じて構造化テレメトリを出力し、観測プロバイダーが一度購読するだけで済み、ストリーミングやツール実行全体で非同期コンテキストを維持できます。

機密文脈制御:ランタイムおよびツールの文脈は意図的にテレメトリに含めることができますが、デフォルトでシークレットが露出しないよう制御機能を提供します。

ライフサイクルコールバック:コア関数、エージェント、ツール、埋め込み、再ランク付け、構造化出力、UI ストリーム全体でコールバックの一貫性が向上しました。コールバックペイロードには、ステップ、使用状況、コンテンツ、ファイル、ソース、警告、ツール、モデル呼び出し、エラーイベントに関するより豊富なデータが含まれます。

パフォーマンス統計:ステップ結果には、応答時間、総ステップ時間、ツール実行時間、最初の出力までの時間、1 秒あたりの出力トークン数などのタイミングとスループットメトリクスが公開されます。

テキストを超えた構築

AI SDK 7 は、リアルタイム、動画、音声、文字起こし、画像、ファイル、埋め込みベクトル、構造化出力 across して SDK を拡張しました。

リアルタイム(実験的): OpenAI、Google、xAI 向けのブラウザからプロバイダーへの WebSocket セッションで、オーディオ/テキストによる会話、クライアント主導のツール呼び出し、AI Gateway を介した正規化されたルーティングが可能です。

動画生成(実験的): AI Gateway、Google AI Studio、Google Vertex、fal、Replicate、ByteDance Seedance、Kling AI、Prodia、xAI across して動画生成が機能し、長時間実行される SSE (Server-Sent Events) レスポンスへの対応と、より安全な制限付きダウンロードをサポートしています。

安定した音声および文字起こし: generateSpeech、transcribe、SpeechResult、TranscriptionResult は安定版エクスポートとして提供されます。

ファイルを介した画像: 画像パーツは他のメディアと同様に、統一されたファイルモデルへと移行します。ツール出力では、インラインデータ、URL、プロバイダー参照、テキストベースのコンテンツに対して単一のファイル形状を使用できます。

より豊かなメディアおよびモデルサポート: プロバイダー側で、画像生成、画像編集、マルチモーダル埋め込みベクトル、音声、文字起こし、再ランク付け、ファイル参照、推論用ファイル、プロバイダー固有のメディアメタデータが追加されます。

構造化出力の信頼性向上: Zod および Standard Schema 入力に対する JSON Schema のポストプロセス処理がより厳格化され、構造化出力やツール呼び出しに対して不正な JSON の抽出および修復機能が利用可能となり、配列出力モードでは変換、強制変換、デフォルト値、パイプラインの保持が維持されます。

UI、ストリーミング、メッセージハンドリング

v7 における UI とストリーミング機能は、エージェントストリームを正確で、組み合わせ可能で、信頼性の高いものにすることに焦点を当てています。

ダイレクトエージェントトランスポート:DirectChatTransport を使用すると、UI コードからエージェントを直接呼び出すことができます。

UI フローにおけるツール承認:UI メッセージは自動承認応答と改善された承認リプレイ機能をサポートします。

フレームワークの改良:React の useChat コールバックが現在のプロパティ/状態に合わせて更新され、sendAutomaticallyWhen が非同期条件に対応可能になりました。Vue には慣用的な useChat コンポザブルが追加され、Angular API は現在の AI SDK パターンに整合しました。

より信頼性の高いストリーム:finish チャンク前に終了するプロバイダーストリームはエラーとして扱われ、ツール実行エラーは予測可能に発行・クリーンアップされます。ストリーミング推論の極端なケースもより一貫して処理されます。

プロバイダメタデータの保持:テキスト生成、UI ストリーム、ツール呼び出し、マルチターンプロバイダ ID マッピング全体を通じて、プロバイダメタデータが保持されます。

多段階結果:トップレベルのコンテンツ、ツール呼び出し/結果、ファイル、ソース、警告、および使用量は、実行全体の情報を表します。最終ステップのみに関する詳細は finalStep を介して取得できます。

MCP の設定

MCP パッケージは、単なるツールのトランスポート層から、エージェントツールとアプリ UI 向けのより豊かな統合インターフェースへと進化しました。

プロトコルとメタデータ:MCP クライアントはプロトコルバージョン 2025-11-25、サーバーメタデータ、サーバー指示、ピング応答、ネゴシエートされたプロトコルヘッダー、およびパブリックな listTools() をサポートします。

型付きツール出力:MCP ツールは outputSchema と structuredContent を公開でき、ツールの定義を実行可能なツールから分離することも可能です。

リソースコンテンツ:ツール結果とプロンプトメッセージには、MCP リソースリンクのコンテンツを含めることができます。

アプリレンダリング:MCP アプリは、モデルから見えるツールとアプリ固有のツールを分離したまま、サンドボックス化された iframe 内でアプリ固有の UI をレンダリングするためにツールのメタデータを使用します。

トランスポートの信頼性:HTTP、SSE(Server-Sent Events)、OAuth トランスポートでは、カスタムフェッチ、リダイレクト設定、OAuth リフレッシュの重複排除、状態検証、非同期クライアント認証、より詳細なエラー処理、および改善された SSE フレーム処理をサポートしています。

ランタイムとパッケージングの設定

Node.js 22 以上必須:AI SDK パッケージには Node.js 22 以降が必要です。

ESM インポートの必須化:AI SDK 7 では ESM インポート(import 構文または .mjs ファイル)が必須です。package.json に "type": "module" を追加するか、個々のファイルを .mjs 形式に移行してください。

移行スキルの提供:開発者がインストールし、エージェントに使用を指示できる専用移行スキルが用意されており、AI SDK v6 から v7 へのアップグレードをサポートします。

Codemods の利用可能化:v7 用の codemods は、名称変更とクリーンアップ移行の大部分をカバーしています。

開始するには、以下のプロンプトを AI コーディングエージェントに送信してください:

実験的機能からの脱却

以下のハイライトは、最も影響力のある昇格(実験的機能から一般機能への変更)を網羅しています:

experimental_customProvider が customProvider に変更

experimental_generateImage が generateImage に変更

experimental_output が output に変更

experimental_prepareStep が prepareStep に変更

experimental_telemetry が telemetry に変更

名称変更された API

以下のハイライトは、最も影響力のある名称変更を網羅しています:

system オプションが instructions に変更

プロンプトまたはメッセージ内のシステムメッセージには、allowSystemInMessages: true の設定が必要です

onFinish は onEnd に変更されました

StreamTextResult.fullStream は stream に変更されました

CallSettings はモデル生成オプションとリクエスト/トランスポートオプションに分割されました

非推奨 API

以下のハイライトは最も影響の大きい非推奨事項をカバーしています:

ツール承認: tool() および dynamicTool() における needsApproval は非推奨です。承認ロジックは generateText、streamText、または ToolLoopAgent の toolApproval に移動してください。

ストリームレスポンスヘルパー: result.toUIMessageStreamResponse() や result.toTextStreamResponse() などの Result メソッドは非推奨です。代わりに createUIMessageStreamResponse や createTextStreamResponse などのトップレベルヘルパーを使用してください。

Vue チャット: Vue Chat クラスは非推奨です。useChat コンポーザブルを使用してください。

その他のマイグレーションのテーマ

推論設定が一元化されました: トップレベルの reasoning オプションが、プロバイダー固有の推論設定と重複する部分を置き換えます(意図的にプロバイダー固有の上書きを行う場合を除く)。

OpenTelemetry が @ai-sdk/otel へ移動しました: OpenTelemetry スパン収集は ai パッケージに組み込まれなくなりました。テレメトリはグローバルに登録され、カスタムトレーサーは OpenTelemetry コンストラクタ内に移されます。

リクエストおよびレスポンスボディの保持はオプトイン方式になりました: デフォルトではテキスト生成結果からリクエストおよびレスポンスボディが除外されます。

マルチステップ結果は実行全体を表すようになりました: トップレベルの使用状況、コンテンツ、ツール呼び出し/結果、ファイル、ソース、警告はすべてのステップにわたって累積され、最終ステップのみのデータは finalStep の下に格納されます。

メッセージパーツはより標準化されました:従来のメディアおよび画像固有のパーツは、メディアタイプを持つファイルパーツへと移行します。

パッケージ固有の動作が変更されました:MCP HTTP/SSE リダイレクトはエラーとして扱われ、OpenAI Responses の推論サマリーは詳細モードがデフォルトとなり、Anthropic のキャッシュ作成トークンメタデータは標準的な使用量フィールドへ移動しました。

アップグレードパス

既存プロジェクトを AI SDK 7 へ移行するには、以下の手順に従ってください:

Node.js を 22+ に更新する:パッケージをアップグレードする前に、ランタイムおよび CI 環境が最小要件を満たしているか確認してください。

パッケージを更新する:package.json 内の ai およびすべての @ai-sdk/* パッケージを v7 リリースへアップデートしてください。

v7 codemods を実行する:codemods はリネーム、インポート変更、API の移動の大部分を自動化します。コミットする前に差分を確認してください。

OpenTelemetry を移行する:トレーシングを使用している場合は、設定を @ai-sdk/otel へ移行し、テレメトリをグローバルに登録してください。属性の詳細については、@ai-sdk/otel ドキュメントおよび OpenTelemetry スパンスキーマを参照してください。

セマンティックな変更を手動でレビューする:codemods では、ランタイム要件、ESM インポート、指示/メッセージの動作、ランタイム/ツールコンテキストの分離、承認ポリシーの配置、ストリームヘルパーの使用、多段階結果の形状などを完全に判断することはできません。完全な v7 移行ガイドを参照してください。

ガイド付き移行を行う場合は、AI SDK v7 移行スキルをインストールし、エージェントにアプリへ適用させるよう指示してください:

続きを読む

原文を表示

AI SDK 7 is a major release for building production agents in TypeScript. The SDK has grown from model calls and chat primitives into a broader agent platform for developing, running, integrating, and observing agents across text, audio, realtime, image, and video. Every major provider is supported out of the box.

At a Glance

Develop agents with reasoning control, tool and runtime context, provider files and skills support, MCP Apps, and a terminal UI.

Run agents with tool approvals, durable WorkflowAgent execution, first-class timeouts, and sandbox support.

Integrate any agent harness such as Codex, Claude Code, Deep Agents, OpenCode, or Pi.

Observe agent behavior with redesigned telemetry, @ai-sdk/otel, Node.js tracing channel support, lifecycle callbacks, and step performance statistics.

Build beyond text with stable speech/transcription APIs, richer file parts, image generation and editing, multimodal embeddings, reranking, realtime voice (experimental), and video generation (experimental).

Upgrade with clearer APIs through the new migration skill, codemods, and migration paths for ESM, Node.js 22, instructions, telemetry, stream, finalStep, runtimeContext, and toolsContext.

Before You Upgrade

AI SDK 7 introduces two breaking requirements:

Node.js 22 minimum: Node 22 is required because the SDK depends on APIs (including the native fetch implementation and improved AsyncLocalStorage semantics) that are not backported to earlier LTS lines.

ESM imports required: AI SDK 7 requires ESM imports (import syntax or .mjs files). CommonJS require() is not supported. Update your package.json to include "type": "module" or migrate individual files to .mjs.

Run the v7 codemods to automate the majority of import and rename changes before reviewing semantic migration items manually. See the full v7 migration guide.

Develop Agents

Provider-agnostic reasoning control: generateText and streamText now support a top-level reasoning option that maps to provider-native settings across OpenAI, Anthropic, Google, Groq, xAI, Bedrock, Fireworks, DeepSeek, Open Responses, and OpenAI-compatible providers. Note that exact behavior and available parameters vary by provider.

Typed runtime context: Shared orchestration state lives in runtimeContext and flows through prepareStep, approval functions, lifecycle callbacks, telemetry, ToolLoopAgent, and WorkflowAgent.

Scoped tool context: Tools can declare a contextSchema, and callers provide per-tool values through toolsContext, so third-party tools only receive the secrets or config they need.

Provider file uploads: uploadFile uploads large inputs once and reuses provider references in later calls, reducing redundant uploads in repeated PDF, dataset, image, and multi-step workflows.

Provider skill uploads: uploadSkill brings the same pattern to provider-managed skill environments.

MCP Apps: MCP support now includes model-visible versus app-only tools, app metadata, sandboxed iframe rendering, and JSON-RPC communication for tools, resources, logs, and display updates.

Terminal agent development: @ai-sdk/tui runs AI SDK agents in an interactive terminal UI, letting you test reasoning, tools, and markdown output before building a full app.

Run Agents in Production

AI SDK 7 adds the primitives agents need once they leave local demos.

Tool approvals: generateText, streamText, and ToolLoopAgent can define approval policies at the call or agent level. Policies can require user approval, auto-approve, auto-deny, or delegate to typed approval functions.

Hardened approval replay: Higher-risk approval flows can revalidate tool inputs and policies before continuation, use WorkflowAgent approval validation, and opt into HMAC signing. HMAC signing cryptographically binds the original tool inputs to the approval token, preventing tampering with tool arguments between the approval request and resumption.

Durable execution: @ai-sdk/workflow introduces WorkflowAgent for long-running agents. Execution state is persisted to durable storage between steps, so agents survive deploys, process restarts, interruptions, and delayed approvals. To learn more, see the WorkflowAgent docs.

Workflow-aware agent features: WorkflowAgent supports streaming, tools, approvals, typed runtime and tool context, lifecycle callbacks, stable telemetry, provider-executed approval resumption, and tool result conversion.

First-class timeouts: Text generation and agent APIs can define total, per-step, per-chunk, default tool, and per-tool timeout budgets. Timeout aborts use TimeoutError, and abort reasons flow through stream and UI protocols.

Sandboxed execution: The sandbox abstractions support command execution, streaming output, working directories, environment variables, abort signals, and step-level sandbox overrides.

Integrate Agent Harnesses

AI SDK 7 introduces a harness layer for bringing established coding agents into the AI SDK ecosystem. Wrap harnesses such as Claude Code, Codex, and Pi behind the same agent interface used by the rest of the SDK.

HarnessAgent: Run external agent harnesses through the AI SDK Agent interface, with standard generate and stream results.

Adapters for coding agents: Claude Code, Codex, and Pi harness adapters let teams plug existing agent runtimes into AI SDK apps.

Configurable harness runs: Harness agents can receive sandboxes, instructions, custom skills, and tools, so the same runtime can be shaped for different products and workflows.

Durable, resumable sessions: Workflow utilities, session bridging, and APIs for interrupted-turn continuation make harness runs suitable for longer coding tasks.

Gateway-ready authentication: Harness adapters support Vercel OIDC for AI Gateway, simplifying hosted and sandboxed agent execution.

Observe Agents

Global telemetry integrations: Register telemetry once and receive structured events across model calls, steps, tools, embeddings, reranking, and agent execution.

Dedicated OpenTelemetry package: OpenTelemetry support now lives in @ai-sdk/otel, with GenAI-semantic convention spans and metrics, supplemental AI SDK attributes, and span-enrichment hooks. To learn more, see the @ai-sdk/otel docs.

Node.js tracing channel: AI SDK 7 emits structured telemetry through the Node.js tracing channel, allowing observability providers to subscribe once while preserving async context across streaming and tool execution.

Sensitive context controls: Runtime and tool context can be deliberately included in telemetry, with controls to prevent secrets from being exposed by default.

Lifecycle callbacks: Callbacks are more consistent across core functions, agents, tools, embeddings, reranking, structured output, and UI streams. Callback payloads carry richer data for step, usage, content, file, source, warning, tool, model-call, and error events.

Performance statistics: Step results expose timing and throughput metrics, including response time, total step time, tool execution time, time to first output, and output tokens per second.

Build Beyond Text

AI SDK 7 expands the SDK across realtime, video, speech, transcription, images, files, embeddings, and structured output.

Realtime (experimental): Browser-to-provider WebSocket sessions for OpenAI, Google, and xAI, with audio/text conversations, client-driven tool calls, and normalized routing through AI Gateway.

Video generation (experimental): Video generation works across AI Gateway, Google AI Studio, Google Vertex, fal, Replicate, ByteDance Seedance, Kling AI, Prodia, and xAI, with support for long-running SSE responses and safer bounded downloads.

Stable speech and transcription: generateSpeech, transcribe, SpeechResult, and TranscriptionResult are stable exports.

Images as files: Image parts move toward the same canonical file model as other media. Tool outputs can use a single file shape for inline data, URLs, provider references, and text-backed content.

Richer media and model support: Providers add image generation, image editing, multimodal embeddings, speech, transcription, reranking, file references, reasoning files, and provider-specific media metadata.

Structured output reliability: JSON Schema post-processing is stricter for Zod and Standard Schema inputs, malformed JSON extraction and repair is available for structured outputs and tool calls, and array output mode preserves transforms, coercions, defaults, and pipes.

UI, Streams, and Message Handling

The UI and streaming work in v7 focuses on making agent streams correct, composable, and reliable.

Direct agent transport: DirectChatTransport can call an Agent directly from UI code.

Tool approval in UI flows: UI messages support automatic approval responses and improved approval replay behavior.

Framework improvements: React useChat callbacks update with current props/state; sendAutomaticallyWhen supports async conditions; Vue gains an idiomatic useChat composable; and Angular APIs are aligned with current AI SDK patterns.

More reliable streams: Provider streams that end before a finish chunk are treated as errors, tool execution errors are emitted and cleaned up predictably, and streaming reasoning edge cases are handled more consistently.

Provider metadata preservation: Provider metadata is retained across text generation, UI streams, tool invocations, and multi-turn provider ID mapping.

Multi-step results: Top-level content, tool calls/results, files, sources, warnings, and usage now represent the full run. Final-step-only details are available through finalStep.

Configure MCP

The MCP package grows from a tool transport layer into a richer integration surface for agent tools and app UIs.

Protocol and metadata: MCP clients support protocol version 2025-11-25, server metadata, server instructions, ping responses, negotiated protocol headers, and public listTools().

Typed tool outputs: MCP tools can expose outputSchema and structuredContent, and tool definitions can be separated from executable tools.

Resource content: Tool results and prompt messages can include MCP resource_link content.

App rendering: MCP Apps use tool metadata to render app-specific UI inside sandboxed iframes while keeping model-visible and app-only tools separate.

Transport reliability: HTTP, SSE, and OAuth transports support custom fetch, redirect configuration, OAuth refresh deduplication, state validation, asynchronous client authentication, richer errors, and better SSE frame handling.

Configure Runtime and Packaging

Node.js 22 minimum: AI SDK packages require Node.js 22 or later.

ESM imports required: AI SDK 7 requires ESM imports (import syntax or .mjs files). Update your package.json to include "type": "module" or migrate individual files to .mjs.

Migration skill available: A dedicated migration skill is available that developers can install and ask their agent to use for AI SDK v6-to-v7 upgrades.

Codemods available: The v7 codemods cover the majority of renames and cleanup migrations.

Send this prompt to your AI coding agent to get started:

Coming Out of Experimental

The following highlights cover the most impactful promotions:

experimental_customProvider becomes customProvider

experimental_generateImage becomes generateImage

experimental_output becomes output

experimental_prepareStep becomes prepareStep

experimental_telemetry becomes telemetry

Renamed APIs

The following highlights cover the most impactful renames:

system option becomes instructions

System messages inside prompt or messages require allowSystemInMessages: true

onFinish becomes onEnd

StreamTextResult.fullStream becomes stream

CallSettings is split into model generation options and request/transport options

Deprecated APIs

The following highlights cover the most impactful deprecations:

Tool approval: needsApproval on tool() and dynamicTool() is deprecated. Move approval logic to toolApproval on generateText, streamText, or ToolLoopAgent.

Stream response helpers: Result methods like result.toUIMessageStreamResponse() and result.toTextStreamResponse() are deprecated. Use top-level helpers like createUIMessageStreamResponse and createTextStreamResponse.

Vue chat: The Vue Chat class is deprecated. Use the useChat composable instead.

Other Migration Themes

Reasoning configuration is centralized: The top-level reasoning option replaces overlapping provider-specific reasoning settings unless a provider-specific override is intentional.

OpenTelemetry moved to @ai-sdk/otel: OpenTelemetry span collection is no longer built into the ai package. Telemetry is registered globally, and custom tracers move into the OpenTelemetry constructor.

Request and response body retention is opt-in: Text generation results exclude request and response bodies by default.

Multi-step results now represent the full run: Top-level usage, content, tool calls/results, files, sources, and warnings accumulate across all steps; final-step-only data lives under finalStep.

Message parts are more canonical: Legacy media and image-specific parts move toward file parts with media types.

Package-specific behavior changed: MCP HTTP/SSE redirects are treated as errors, OpenAI Responses reasoning summaries default to detailed, and Anthropic cache creation token metadata moves into standard usage fields.

Upgrade Path

Follow these steps to migrate an existing project to AI SDK 7:

Update Node.js to 22+: Verify your runtime and CI environments meet the minimum requirement before upgrading packages.

Update packages: Bump ai and all @ai-sdk/* packages to their v7 releases in your package.json.

Run the v7 codemods: The codemods automate the majority of renames, import changes, and API moves. Review the diff before committing.

Migrate OpenTelemetry: If you use tracing, move your setup to @ai-sdk/otel and register telemetry globally. Refer to the @ai-sdk/otel docs and the OpenTelemetry span schema for attribute details.

Review semantic changes manually: Codemods cannot fully decide runtime requirements, ESM imports, instruction/message behavior, runtime/tool context separation, approval policy placement, stream helper usage, and multi-step result shapes. See the full v7 migration guide.

For a guided migration, install the AI SDK v7 migration skill and ask your agent to apply it to your app:

Read more

この記事をシェア

関連記事

KDnuggets★42026年6月25日 23:00

テキスト、画像、音声、動画を処理する 5 つのオープンソース・オムニ AI モデル

KDnuggets は、テキスト、画像、音声、動画のすべてのメディアタイプを処理できる 5 つの主要なオープンソース型オムニ AI モデルを紹介した。

Vercel Blog★42026年6月25日 22:00

AI SDK 7 の発表

Vercel は、週に 1600 万回のダウンロードがある TypeScript 製 AI SDK の新バージョン「7」を発表した。このアップデートにより、推論制御やツール承認機能など、エージェント開発の生産性を高める機能が強化された。

TLDR AI★32026年6月25日 09:00

Qwen-AgentWorld(29 分間の読了時間)

TLDR AI が、アリババ傘下の通義千問(Qwen)を用いたエージェント開発環境「Qwen-AgentWorld」の解説記事を公開しました。

今日のまとめ

AI日報で今日の重要ニュースをまとめ読み

ニュース一覧に戻る元記事を読む