-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(core): update chunk concat logic to match on missing ID fields #8987
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
fix(core): update chunk concat logic to match on missing ID fields #8987
Conversation
🦋 Changeset detectedLatest commit: e8cd966 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Co-authored-by: Hunter Lovell <[email protected]>
|
@hntrl ok pushed a couple changes. I think either I'm losing it or we are reaching the logic where one or more IDs are undefined, because the tests still pass. Maybe the named conditions make it clearer? |
|
@mcblum i really have no idea anymore what's going on, but i tested this change locally w anthropic claude and I see chunks with 'id' being undefined so the check needs to also merge if (note: we're using portkey ai gateway in between our service and anthropic so maybe this is useful information too. we only have this issue with claude/anthropic atm though) (sorry for the verbose output) this ends up as (note: args are in a separate chunk now): also checking for falsy
|
|
@flipace yeah what you're seeing is a different issue that got reported this morning, but is relevant for this PR. Thanks for the suggestion, have added it! |
…8987) Co-authored-by: Hunter Lovell <[email protected]> Co-authored-by: Hunter Lovell <[email protected]>
…8987) Co-authored-by: Hunter Lovell <[email protected]> Co-authored-by: Hunter Lovell <[email protected]>
…8987) Co-authored-by: Hunter Lovell <[email protected]> Co-authored-by: Hunter Lovell <[email protected]>
This PR updates the logic so that if tool chunk indices match and one chunk does not have an ID, the tool chunks are then merged.
Fixes #8985