Skip to content

@cloudflare/think@0.14.0

Choose a tag to compare

@github-actions github-actions released this 22 Jul 16:34
83e093b

Minor Changes

  • #1860 f5b1dd8 Thanks @mattzcarey! - Think agents emit Cloudflare-native traces out of the box with no tracing setup beyond enabling Worker traces. Named lifecycle and storage-phase spans group Durable Object internals around startup, request persistence, turn preparation, inference, result persistence, recovery, alarms, and durable submissions. Every inference call produces an invoke_agent {agent class} span with chat {model} and execute_tool {tool} children. Think supplies durable identity and turn metadata. Payload storage remains off by default; agents can set storeMessages for OTel-schema model messages ({ role, parts }, canonical tool parts, and output finish_reason) on chat and storeTools for tool arguments/results on execute_tool. These flags configure the wrapper and are never emitted as metadata or attributes. Model streams are finalized on early exit, and durable submissions run from their awaited alarm invocation so spans do not outlive invocation boundaries.

Patch Changes

  • #1860 f5b1dd8 Thanks @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 the tracing API.

  • #1959 a3cbed1 Thanks @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 3ce98ff Thanks @mattzcarey! - Reconcile stale useAgentChat server-streaming state after an errored client reconnects.

    Reconnect probes now include correlation IDs, and STREAM_RESUME_NONE distinguishes 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.

  • #1937 ed9f42b Thanks @cjol! - Forward routing props through the Think onStart lifecycle wrapper.

  • #1860 f5b1dd8 Thanks @mattzcarey! - Run durable submissions only from their awaited scheduled drain, preventing model work and tracing spans from outliving the short submission-acceptance invocation.

  • #1949 32e7390 Thanks @cjol! - Warn when getSkills() makes an overridden getSystemPrompt() fallback-only and document using Session context blocks for always-on instructions.