-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix: 🚑 Tool descriptions are not being added for nativeTool enabled models #6934
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, CI/CD is likely to fail on this PR until #6933 gets merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chezsmithy systemMessageDescription is included in the system message when using system message tools, not native tools, see
https://github.com/continuedev/continue/blob/main/core/tools/systemMessageTools/buildToolsSystemMessage.ts#L112
System Message Description is an alternative to the tools JSON, only to be used for system message tools. It exists because dumber models need more targeted explanations/examples for tool use, and aren't trained well on the JSON descriptions
Could you reiterate the fix here?
@chezsmithy could merge parallel fix on separate pr! |
@RomneyDa in my debugging for say AWS Bedrock with Sonnet. I noticed that the System Message doesn't include any of the tool definitions as it's native tool use, but then in the tools array passed to the model, the tool description is just the description field and not the systemMessageDescription. Thus the model gets a list of tools, with a very basic agent system message and is left to figure out how to use the tools from the shape of the payloads and a VERY basic tool description. This results in the model using the tools very poorly. Does that make sense? This fix, re-introduces what would have been in the decription back to the tools array description field fixing tools use for native tools using models. |
The system message description is brief blurb + an example of calling the tool using system message tools, e.g. TOOL_NAME: read_file
BEGIN_ARG: filepath
test.js
END_ARG It doesn't apply for native tools, it's mostly duplicate. In many cases, it's more concise. If there is information missing from the normal tool description which is in the system message description, we should add it to the normal tool description. |
Another way of putting this is that when I added systemMessageDescriptions (specifically used for system message tools) I did not remove anything from the other descriptions. If I did, it was my mistake! |
Ah! Gotcha. So yeah we lost some significant content from the descriptions. |
@chezsmithy which tools lost content? |
I took a look through and it looks like in all cases the JSON descriptions are at least as thorough as the alternative system message ones, although the system message tools search and replace description seems to have missed an update during a merge. Any tools seem off to you? |
Closing this for now but keeping a close eye on any agent issues so please reopen something if needed or if I missed something! Also the parallel note would be a nice change, have also noticed claude tends to still do series calls |
Description
🚨 PR: #6723 is no longer added the full tool description when the model can use native tool calling. The tool description was refactored to have a description and a systemMessageDescription. For non native models, the tool descriptions are appended to the system message. For native tool calling models the description should include all the needed information.
This change updates the tool description for native tool calling models by concating the tool description and the systemMessgeDescription. I've noted in testing this fixes the tool calling issues that have been introduced after #6723 was merged to main.
I'd recommend merging this fix before releasing another pre-release. Also note this fix must be bundled with #6723 in any release to not cause a broken tool calling experience.
This should be viewed as a critical hotfix to the pre-release channel.
Note, I've also updated the parallel tool calling instruction to make it more forceful. I'm willing to put that into a separate PR if it might be risky. I've noted with this change I see parallel tool calls with claude sonnet 4.
Checklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
I've not added any new tests. I've performed inspection of the options.tools values by debugging and the system messages when nativeTool use is enabled.
Summary by cubic
Fixed an issue where tool descriptions were missing for models with nativeTool enabled, ensuring all relevant tool information is included.