Minor Changes
-
#1860
f5b1dd8Thanks @mattzcarey! - Group SDK-managed initialization, startup, chat interactions, turns, and durable submissions into semantic phases. Storage-heavy setup, hydration, recovery, request persistence, and response persistence each receive a named bucket, keeping inference and tool spans visible without discarding lower-level Durable Object SQLite spans. Each span records agent identity, storage phase, a stable marker for UI grouping, and operation-specific metadata. No-op on runtimes without thetracingAPI. -
#1860
f5b1dd8Thanks @mattzcarey! - Addagents/observability/aiwithwrapAISDKfor AI SDK v6 andcreateAISDKTelemetryfor AI SDK v7. Both project Cloudflare-nativeinvoke_agent {agent},chat {model}, andexecute_tool {tool}spans using scalar OpenTelemetry GenAI attributes, including request settings, token usage, finish reasons, tool-call IDs, model-call time to first chunk, bounded AI SDK v6 approval lifecycle spans, and conditional AI Gateway log references. Payload storage is opt-in:storeMessageswrites OTel-schema input/output message arrays tochat({ role, parts }, canonical text/reasoning/tool parts, and outputfinish_reason; oldest messages are dropped past the budget while protecting the first two), andstoreToolswrites arguments/results toexecute_tool. The flags themselves are never emitted as span attributes. Schemas, request headers, provider options, and raw errors remain excluded.
Patch Changes
-
#1959
a3cbed1Thanks @mattzcarey! - Cache MCP JSON Schema conversion for the current catalog on each live connection, and let Think agents skip direct MCP AI-tool exposure when those tools are exposed through Code Mode or another mechanism outside Think's automatic tool set. -
#1963
3ce98ffThanks @mattzcarey! - Reconcile staleuseAgentChatserver-streaming state after an errored client reconnects.Reconnect probes now include correlation IDs, and
STREAM_RESUME_NONEdistinguishes globally idle agents from active continuations owned by another connection. The hook clears fallback streaming state only for a correlated idle response. Reconnect opens are retained while a prior resume or status transition settles, in-flight handshakes are retransmitted on replacement sockets, and all AI SDK resume entry points share one serialization gate. -
#1944
fff4131Thanks @cjol! - Make theagents/viteturndownstub fail with a diagnostic error when app code calls it directly, and document thestubTurndown: falseopt-out for applications that useturndownthemselves. -
#1926
6861933Thanks @mattzcarey! - Verify MCP OAuth callback state before changing a connection. Forged, expired, and replayed callbacks no longer disrupt the genuine authorization flow, andaddMcpServer()refreshes auth URLs whose embedded state has expired. -
#1924
c19d58aThanks @mattzcarey! - Harden MCP connection recovery: honor retry budgets for resolved connection failures, finish in-flight restore work before stable-id migration, and close connections replaced by the legacyconnect()path. -
#1923
33e59c4Thanks @mattzcarey! - Recover streamable HTTP connections when a server rejects a persisted session with HTTP 404. The client clears the stale session from memory and storage, initializes a new session, and rediscovers capabilities once.