-
Notifications
You must be signed in to change notification settings - Fork 159
CohereChatGenerator using command-r
model doesn't work with Agent
#1693
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
Comments
Hey @vblagoje out of curiosity would you call this a bug or just a limitation of the |
@sjrl I'm suspecting (but we need to verify) command-r is using an old function/tool calling definitions and can't recognize these new ones coming from MCP, or the OpenAI format that we use by default. |
No, wrong, I forgot to update CohereChatGenerator to handle ToolSet @sjrl - that could be the cause why |
@sjrl here is what happened - https://docs.cohere.com/v2/docs/command-r#model-details lists command-r models. In September 24, Cohere migrated to v2 API which changed tool calling format among many other things. They didn't move the Given these revelations I propose that in #1691 we update the default model to |
@vblagoje that sounds good to me! |
Fixed with #1691 |
Describe the bug
command-r
(Cohere model) fails during tool calling in a Haystack Agent pipeline. Although our test suite passes when evaluating tool use with the live model, actual runs frequently trigger aPipelineRuntimeError
due to the model not returning valid tool calls or responses.Error observed:
To Reproduce
Run a Haystack Agent pipeline using
CohereChatGenerator
with thecommand-r
model and a valid tool registered. The agent setup completes, but at runtime, the model fails to return a proper tool call.This works with
command-r-plus
, and withcommand-a-03-2025
but fails consistently withcommand-r
.Describe your environment (please complete the following information):
2.13.0
cohere-haystack-3.0.0
Notes:
At first I thought this must have been related to MCP as we have tool tests in test suite but I eliminated that possibility by testing an Agent instance with single Tool used in integration tests (fake weather tool) and that doesn't work either so it is likely something related to Agent, tools and
command-r
combinationThe text was updated successfully, but these errors were encountered: