-
Notifications
You must be signed in to change notification settings - Fork 1
Enable Cloudflare Agents SDK with ai sdk v5 #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
note - can't use cloudflare ai models yet - see cloudflare/ai#173 failure message
root cause in type:error chunk
|
|
Known problems - the first two possibly caused by incorrect implementation in this PR 😝
|
|
cc @whoiskatrin |
|
@whoiskatrin after the fixes in cloudflare/agents@72df075, the MCP tools are working, but now response messages appear to be persisted as raw sse data. Was that intentional? e.g. when running guides/human-in-the-loop
|
|
Response streaming to the client is working much better now - thanks @whoiskatrin 🙏 The only outstanding issue I see is that error reponses are not being caught in the data.error path on the client: TODO (on this end)
|
|
@jldec could you check again please, just in case, I just pushed some changes a minute ago |
|
@whoiskatrin now I'm seeing tool call and error responses as type:"text" blobs with the multi-line sse data stream on the client (like earlier).
Also, client-side streaming UI stopped working |
|
Update as of cloudflare/agents#391 (comment)
|
|
As of cloudflare/agents@ec0ca29 Sending back just the text-deltas from the server side prevents tool call results from arriving at the client. |
|
can you try workers-ai-provider@beta for workers ai models and tell me if works for you? please and thank you! |
|
sorry, I mean via |
|
Awesome! Released |
|
works - and agents v0.1.0 shipped today - merging with JSON tool responses, and without capturing subagent responses. |










Trying out ai sdk v5 with this PR 391 from cloudflare
agentssdk.Testing with locally installed
agentsbuild from the v5-migration branch.. (seefile:link in package.json)