FrameworksOfficial

AI SDK 7.0.181 exposes tool-loop stop reasons and per-call warnings while tightening extraction telemetry metadata

AI SDK 7.0.181 adds per-call onWarning to generateText, streamText, and ToolLoopAgent, plus stoppedBy values that distinguish model completion, stop conditions, tools without executors, and pending approval. It also preserves the real end reason for late steering and removes text/file providerOptions from extraction telemetry.

Why it matters

A generative interface needs to know why a tool loop stopped so it can separately render pending approval, a missing executor, a reached stop condition, or model completion. Call-level warnings let each surface handle unsupported settings and conversion issues. Telemetry filtering reduces the chance that provider metadata crosses the host boundary.

A closer look

stoppedBy appears on generateText/streamText results, onEnd, and finish stream parts with model, stop-condition, tool-without-execute, or approval. finishReason still describes the last model call. onWarning covers the three text/agent entry points and suppresses the global logger for that call. The steering fix retains aborted, error, and other real end reasons for late messages. Extraction telemetry removes providerOptions from text and file parts before and after state preparation.

Who this is for

Teams building tool loops, approval surfaces, streaming conversations, runtime observability, or privacy boundaries.

Original sources

Revisions & corrections (1)

— Complete primary-source evidence supports publication; the existing Bel review is revised in place with the paper's actual first-submission date.

Related events

Frameworks

AI SDK raises the Responses event limit for large generated images, fixing 'images arrived but the request failed'

On November 26, AI SDK added configurable maxEventSize handling and raised the per-event limit used by OpenAI and xAI Responses models from the 64 MiB default to 512 MiB. Because response.completed repeats every output item, several large base64 images could exceed the limit and fail the request after the images had already reached the client.