-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Update of @langchain/mistralai necessary for using Mistral API in Autogen Studio #6147
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
This may be resovled by #6063 |
@ekzhu Thank you for information. You're absolutely right — this issue can definitely be addressed via the modular transformer system in #6063. To keep things more maintainable though, how about resolving this in a separate PR after #6063 is merged? That way, we can track model-specific issues more clearly, while keeping #6063 focused on structural improvements. |
To be addressed by: #6151 -- help wanted |
## Why are these changes needed? FIX/mistral could not recive name field, so add model transformer for mistral ## Related issue number Closes #6147 ## Checks - [ ] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [x] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [x] I've made sure all auto checks have passed. Co-authored-by: Eric Zhu <[email protected]>
What happened?
Describe the bug
When using Autogen Studio with the Mistral API, the generated request payload includes an extra field ("name") inside the user object. The Mistral API only accepts "role" and "content" for user messages, so including the "name" field causes a HTTP 422 error ("Extra inputs are not permitted"). This issue causes all API calls to fail unless the extra field is removed.
To Reproduce
Expected behavior
The API request payload should only include the "role" and "content" keys for the user object. With the correct payload structure, the Mistral API call should succeed without returning a 422 error.
Additional context
This issue has been addressed in the underlying library @langchain/mistralai, which in version 0.0.19 removes the extra "name" field from the request. Updating to version 0.0.19 resolves the problem.
Since Autogen Studio currently uses an older version, please update the dependency to @langchain/mistralai version 0.0.19 (or later) to ensure compatibility with the stricter validation rules of the Mistral API.
Feedback or further questions are welcome.
Which packages was the bug in?
AutoGen Studio (autogensudio)
AutoGen library version.
Python dev (main branch)
Other library version.
No response
Model used
All mistral models
Model provider
Mistral AI
Other model provider
No response
Python version
None
.NET version
None
Operating system
None
The text was updated successfully, but these errors were encountered: