@cloudflare/voice@0.3.6

cloudflare/agents@cloudflare/voice@0.3.6Aug 18, 2026by github-actions[bot]

AI Summary

This update refines transcript handling for Voice turns, improves text streaming spacing, and passes full keyword arrays to STT models.

Key Highlights

  • Define `VoiceTurnContext.messages` as completed history
  • Pass full `keyterms` array to Workers AI Flux and Nova-3 STT
  • Preserve spacing between streamed text segments

Breaking Changes

  • If passing `context.messages` directly as input, append `transcript` exactly once

New Features

  • Transcript history handling fix
  • STT keyword improvements
  • Text spacing improvements

Full Release Notes

### Patch Changes

-   [#2083](https://github.com/cloudflare/agents/pull/2083) [`48eeba7`](https://github.com/cloudflare/agents/commit/48eeba71f59eee41fc541b215150377e0aba3593) Thanks [@cjol](https://github.com/cjol)! - Define `VoiceTurnContext.messages` as completed history before the current transcript for both text and audio turns, preventing duplicate user messages when following the documented prompt construction.

    Existing `onTurn()` implementations:

    -   If you pass `context.messages` directly as the complete LLM input, append `transcript` exactly once.
    -   If you already append `transcript` to `context.messages`, no change is required.
    -   Direct `getConversationHistory()` calls inside `onTurn()` continue to include the current transcript.

-   [#2004](https://github.com/cloudflare/agents/pull/2004) [`0efd545`](https://github.com/cloudflare/agents/commit/0efd545a58c9075885977627e5d853b6e98f6d54) Thanks [@cjol](https://github.com/cjol)! - Pass the full `keyterms` array to Workers AI Flux and Nova-3 STT instead of only the first term.

-   [#2049](https://github.com/cloudflare/agents/pull/2049) [`ce0e608`](https://github.com/cloudflare/agents/commit/ce0e608675e41794b02178dce0fb13bb62530aa8) Thanks [@cjol](https://github.com/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.