Skip to content

@cloudflare/think@0.16.0

Choose a tag to compare

@github-actions github-actions released this 18 Aug 09:08
· 4 commits to main since this release
d424945

Minor Changes

  • #2063 3de6c8e Thanks @cjol! - Remove the convention-driven Think framework, including the Vite plugin, generated Worker entry and virtual modules, CLI, Studio, framework helpers, and server-entry helpers. Remove the separate create-think scaffolder and its starter templates. Think remains available as an explicit runtime for hand-written Worker entries.

    Migration for existing framework users

    If you only use the Think runtime, React integration, messengers, workflows, extensions, or tools, no migration is required.

    Existing use Required change
    @cloudflare/think/vite Use agents/vite for decorators and agents:skills, alongside @cloudflare/vite-plugin.
    virtual:think/entry Add a real Worker entry, such as src/server.ts, that explicitly exports each Think class.
    Generated bindings, migrations, and routing Declare top-level Durable Object bindings and migrations in wrangler.jsonc; route with routeAgentRequest() and, for custom sub-agent routing, routeSubAgentRequest().
    @cloudflare/think/framework Move generated configuration and class exports into application code.
    @cloudflare/think/server-entry Use Agents SDK routing helpers and application-owned request handlers.
    think types Use wrangler types.
    think init or create-think Use npx create-cloudflare@latest --template cloudflare/agents-starter, or manually configure a Think Worker.
    think studio, think state, or think inspect No direct replacement.

    Existing deployments must preserve generated ThinkAgent_* and ThinkSubAgent_* constructor names and existing migration history. Sub-agent registries use Class.name, so export aliases alone do not preserve compatibility. If renaming classes, use a data-preserving Durable Object rename migration.

  • #2049 ce0e608 Thanks @cjol! - Preserve spacing between streamed text segments separated by tool calls. Think messenger delivery and Voice now share the same boundary-aware text joining logic from agents/chat.

    Existing users must:

    • Replace imports of textDeltaFromStreamChunk() from @cloudflare/think/messengers with TextStreamCallback, passing it the complete structured stream events.
    • Upgrade to agents@0.21.0 when installing @cloudflare/think@0.16.0 or @cloudflare/voice@0.3.6; both now require agents >=0.20.2.
    • Update exact-text expectations if they relied on segments around tool calls being concatenated without a space.

Patch Changes

  • #2082 9d35e81 Thanks @cjol! - Emit workspace image reads as image-data model content so AI SDK v6 routes them as images, while preserving file-data output for PDFs.

    Existing consumers that inspect raw workspace tool content must handle image-data for images; PDFs continue to use file-data. Normal tool callers require no change.

  • #2023 2b2b598 Thanks @threepointone! - Treat useAgentChat observer error frames as terminal responses.

    Plain-text error bodies are no longer parsed as stream chunks or merged into an empty assistant message. Error frames now clear observer streaming, replay, recovery, and tool-continuation state even when they omit done, matching the transport-owned stream behavior.

    Existing observer UIs that displayed error bodies as assistant messages must move those diagnostics to a dedicated error surface.

  • #1996 753a674 Thanks @mattzcarey! - Update PartyServer and the Cloudflare Workers development toolchain for @cloudflare/workers-types v5 compatibility. New Think projects now use Workers Types v5 with matching Wrangler and Vite plugin versions.

  • #2062 882ae63 Thanks @ben-reitz! - Expose TurnConfig.repairToolCall so callers can repair malformed tool calls before tool execution.