Skip to content

Commit 295ffc9

Browse files
Merge pull request #495 from cloudflare/changeset-release/main
Version Packages
2 parents 60d9b02 + 1e06562 commit 295ffc9

7 files changed

Lines changed: 16 additions & 21 deletions

File tree

.changeset/eager-tool-input-end.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

demos/mcp-server-bearer-auth/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ export const renderApproveContent = async (
314314
<div class="max-w-md mx-auto bg-white p-8 rounded-lg shadow-md text-center">
315315
<div class="mb-4">
316316
<span class="inline-block p-3 ${status === "success"
317-
? "bg-green-100 text-green-800"
318-
: "bg-red-100 text-red-800"} rounded-full">
317+
? "bg-green-100 text-green-800"
318+
: "bg-red-100 text-red-800"} rounded-full">
319319
${status === "success" ? "✓" : "✗"}
320320
</span>
321321
</div>

demos/remote-mcp-server-autorag/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ export const renderApproveContent = async (
314314
<div class="max-w-md mx-auto bg-white p-8 rounded-lg shadow-md text-center">
315315
<div class="mb-4">
316316
<span class="inline-block p-3 ${status === "success"
317-
? "bg-green-100 text-green-800"
318-
: "bg-red-100 text-red-800"} rounded-full">
317+
? "bg-green-100 text-green-800"
318+
: "bg-red-100 text-red-800"} rounded-full">
319319
${status === "success" ? "✓" : "✗"}
320320
</span>
321321
</div>

demos/remote-mcp-server/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ export const renderApproveContent = async (
314314
<div class="max-w-md mx-auto bg-white p-8 rounded-lg shadow-md text-center">
315315
<div class="mb-4">
316316
<span class="inline-block p-3 ${status === "success"
317-
? "bg-green-100 text-green-800"
318-
: "bg-red-100 text-red-800"} rounded-full">
317+
? "bg-green-100 text-green-800"
318+
: "bg-red-100 text-red-800"} rounded-full">
319319
${status === "success" ? "✓" : "✗"}
320320
</span>
321321
</div>

packages/workers-ai-provider/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# workers-ai-provider
22

3+
## 3.1.11
4+
5+
### Patch Changes
6+
7+
- [#494](https://github.com/cloudflare/ai/pull/494) [`ed6112a`](https://github.com/cloudflare/ai/commit/ed6112a7938ea3b9136876edb6830f3f1138d2b4) Thanks [@threepointone](https://github.com/threepointone)! - Emit `tool-input-end` and `tool-call` events eagerly when streaming multiple tool calls, instead of deferring all of them to stream close. Previously, all tool calls appeared "in progress" simultaneously because `tool-input-end` was only emitted in `flush()`. Now each tool call is closed as soon as the next one starts or a null finalization chunk is received, matching the behavior of other AI SDK providers.
8+
39
## 3.1.10
410

511
### Patch Changes

packages/workers-ai-provider/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "workers-ai-provider",
3-
"version": "3.1.10",
3+
"version": "3.1.11",
44
"description": "Workers AI Provider for the vercel AI SDK",
55
"keywords": [
66
"ai",

packages/workers-ai-provider/test/stream-text.test.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,9 +2028,7 @@ describe("Eager tool-input-end streaming (issue #488)", () => {
20282028

20292029
const allToolEvents = events
20302030
.map((e, i) => ({ ...e, idx: i }))
2031-
.filter((e) =>
2032-
["tool-input-start", "tool-input-end", "tool-call"].includes(e.type),
2033-
);
2031+
.filter((e) => ["tool-input-start", "tool-input-end", "tool-call"].includes(e.type));
20342032

20352033
// Expected order: start(0), end(0), call(0), start(1), end(1), call(1)
20362034
expect(allToolEvents.map((e) => e.type)).toEqual([
@@ -2125,9 +2123,7 @@ describe("Eager tool-input-end streaming (issue #488)", () => {
21252123
},
21262124
// Tool 0 args
21272125
{
2128-
tool_calls: [
2129-
{ index: 0, function: { arguments: 'ath":"a.txt"}' } },
2130-
],
2126+
tool_calls: [{ index: 0, function: { arguments: 'ath":"a.txt"}' } }],
21312127
},
21322128
// Tool 1 start (should close tool 0)
21332129
{
@@ -2208,9 +2204,7 @@ describe("Eager tool-input-end streaming (issue #488)", () => {
22082204
],
22092205
},
22102206
{
2211-
tool_calls: [
2212-
{ index: 0, function: { arguments: 'ation":"NYC"}' } },
2213-
],
2207+
tool_calls: [{ index: 0, function: { arguments: 'ation":"NYC"}' } }],
22142208
},
22152209
{ finish_reason: "tool_calls" },
22162210
"[DONE]",

0 commit comments

Comments
 (0)