New in v15.0 - ✨ Tools now use function calling #1306
olimorris
announced in
Announcements
Replies: 3 comments 2 replies
-
Hi @olimorris Thank you and all community for this big update. It's inspiring how motivated you're on every release. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is such a huge update I’ve been looking forward to it for a while, and I’m really excited to start using it! Thank you and thanks to everyone mentioned, truly grateful for all your efforts! |
Beta Was this translation helpful? Give feedback.
0 replies
-
EDIT: Can confirm Gemini 2.5 is working in Copilot |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
This is a big one and I am very excited to announce two headline features for
v15.0
of CodeCompanion.ToolsandAgenticWorkflows.mp4
🏗️ Function Calling
This has been a monumental PR and I want to thank those in #1141 who tried this out as I was building it.
❓Why
I won't go into too much of the background, but about a year ago, I needed to come up with a universal way which would allow any LLM to make use of tools within CodeCompanion. To that end, I came up with a pretty novel approach, which involved teaching the LLMs to output XML, which could then be parsed by the plugin. This was unique and this worked reasonably well for some of the higher performing LLMs, but could be hit and miss for the rest.
Around the same time, a lot of LLMs started implementing function calling, which is the ability for an LLM to call functions on a user's machine. A lot of these LLMs have been fine-tuned to do this, so the result is they are incredibly performant and incredibly accurate.
🚀 Impact
👍🏼 There's some obvious pros to moving to function calling, as you'll see in the video. It's lightning fast and it's super reliable. I've run 100+ tests and I'm yet to have a single failure on all of the models which we support. So I'm very excited to see what you all create with this. I'm hoping it will also be easier for users to create their own tools as we now use OpenAI's function calling schema in the plugin.
Oh, and you use tools in the exact same way you did before!
👎🏼 Unfortunately, there are some downsides. There are a number of models which are not yet supported, and I cover that in a compatibility section here. The most notable omission is a Ollama, which quite simply is broken. I've tried numerous ways of getting this to work and have been unable to do so. To account for these, I've created a separate branch called has-xml-tools. For those who don't want to use the new function calling, you can simply pin CodeCompanion to that branch. Whilst I won't be supporting that branch moving forward, I will happily merge any pull requests which users have to keep that branch as active as possible. And I note, this branch does have access to the new extensions API too.
There are still some minor niggles with some models and function calling. For example, in the Copilot adapter, some models struggle to run multiple tools in one response, so you may find yourself having to prompt it. I just send over a blank prompt and it normally knows what it needs to do next.
🧱 Extensions API courtesy of @ravitemer
There are some awesome suggestions that people post in discussions every week. I try to keep CodeCompanion's scope pretty tight as maintaining additional features takes a lot of time and effort. So having an API which plugin authors can easily tap into is the next stage in building a thriving ecosystem. @ravitemer has done an awesome job of adding this in and updating the docs, showing how you can get started.
👏🏼 Acknowledgements
I also want to give a big shout out to @ravitemer and @Davidyz who maintain mcphub.nvim and VectorCode, respectively. They were very kind to give up their time to review #1141 and update their projects, ensuring backwards compatibility. If you aren't using both of these plugins in your Neovim and CodeCompanion workflow, then you're missing out!
👣 What's Next
Function Calling marks a significant milestone in the plugin and I am hoping that I see an uptick in PRs from the community. Both mcphub.nvim and VectorCode, combined with the new function calling implementation, should allow everyone to get up to speed with CodeCompanion's codebase, super quickly. This will make it much easier to contribute to this project and I've updated CONTRIBUTING.md to show how you can use CodeCompanion to contribute to CodeCompanion.
There's a couple of slash commands I'll be adding next. I also have a cool idea for adding "live areas" (or self updating areas - haven't thought of a name yet) to a prompt. And, I plan on adding native vision support too. Oh and of course adding tool support to adapters like Mistral and Novita.
It's been a loooooong couple of months (both with work and CodeCompanion) so I will be taking a week or two in downtime at some point in May.
Really hope you love this release as much as I do.
Thanks!
Oli
Beta Was this translation helpful? Give feedback.
All reactions