Skip to content
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

Tool call completion will not auto trigger request if message content isn't empty #4652

Closed
yyjhao opened this issue Feb 1, 2025 · 1 comment
Assignees
Labels
ai/ui bug Something isn't working

Comments

@yyjhao
Copy link

yyjhao commented Feb 1, 2025

Description

This line: https://github.com/vercel/ai/blob/main/packages/react/src/use-chat.ts#L351

breaks some agents that has non-empty message with a tool call. The message that the agent has is not necessarily the result of the tool call, it may just be the agent saying that they are going to use a tool. It breaks for me with sync client tool use.

Code example

No response

AI provider

No response

Additional context

No response

@yyjhao yyjhao added the bug Something isn't working label Feb 1, 2025
@lgrammel lgrammel self-assigned this Feb 1, 2025
@lgrammel
Copy link
Collaborator

lgrammel commented Feb 5, 2025

With [email protected] and @ai-sdk/[email protected] I have reworked the resubmit mechanism. Please check if those new versions work for you (and also consider using message parts). Details can be found here: #4670

@lgrammel lgrammel added the ai/ui label Feb 5, 2025
@lgrammel lgrammel closed this as completed Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/ui bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants