feat: Add Mistral AI as first-class provider with GDPR-compliant EU data residency - #7856
feat: Add Mistral AI as first-class provider with GDPR-compliant EU data residency#7856DevAgarwal2 wants to merge 3 commits into
Conversation
|
@teknium1 This adds native first-class Mistral support to Hermes so users no longer need to configure Mistral as a custom endpoint. It includes Mistral Large 3, Mistral Small 4, and Pixtral vision support, with the provider showing up properly in |
|
Overlaps with #4485 which also adds Mistral AI as a first-class provider (bundled with Nebius and Scaleway). Maintainers should decide which to merge. |
|
+1 this PR. Thanks @DevAgarwal2! @teknium1 could we add Mistral to be first-class provider please? |
|
+1 🙏 |
|
Yes please. It's critical for EU companies. When using Mistral via the custom provider, Hermes leaks internal metadata fields (e.g. timestamp, reasoning_content, _empty_recovery_synthetic) into message objects in the request payload, which OpenAI/Anthropic silently ignore but Mistral rejects with HTTP 422 extra_forbidden due to strict Pydantic schema validation. |
|
+1, can we please get this added |
|
Thanks for working on native Mistral support. I opened an alternative implementation in #42357 while testing the current provider/onboarding flow. During testing, I also ran into a Mistral-specific strict validation issue: Mistral rejects replayed assistant messages containing The alternative PR includes:
Happy to consolidate approaches if maintainers prefer one direction. |
|
I would also like to see this feature added. Thanks @DevAgarwal2! @teknium1 @OutThisLife @kshitijk4poor. |
|
Thanks for the provider work and for documenting the Mistral-specific validation and EU-residency use cases. This automated hermes-sweeper review is closing this under the standing policy against adding new third-party/vendor LLM integrations to the core tree (
Please consider publishing the Mistral integration as a standalone provider-plugin repository for installation under Closed as not-planned per standing maintainer policy ( |
|
Sorry, but why is Mistral not added to the available integration options? This feels like total disrespect for EU. In my country Netherlands there is a growing debate about digital souvereignity, so non European models have to go. And there are surely more countries like Germany where the same debate is going. Chinese models are considered even more untrustworthy than US models. How can you totally ignore such a large user base? I can't sell Hermes agent to municipalities when I can only offer a non European model connected to it. And many municipalities won't run a local model because of the initial cost. Do you want Hermes to be a succes in Europe also, or are you Trump fans? |
|
I’m not going to echo every word of @Invisi-bi ’s post, but I generally agree. I didn’t find @teknium1 ’s justification convincing. In France, even though we’re experts at criticizing our own companies, and even though Mitral AI’s performance isn’t the best on the market by any means, we prefer to have the option of using LLM models whose creators are more likely to be aligned with European interests and values, especially as the world is caught up in a war of narratives. |
|
I have been looking into AI models a bit more today. It's incredibly hard to find European models. What I see, Mistral is more or less the only AI company of any significance. So Leaving out Mistral basically blocks out all European AI. I have tried to add Mistral with the custom provider, but I get some 422 errors still. I see that there has been work on resolving that issue and I saw a video of a person who connected to Mistral this way, but for me somehow it's not working. So a real Mistral connector is really useful. Or make the custom provider option more robust. |
|
Well then Does someone have that plugin repository? Also FWIW, I think Hermes Agent should have a click-easy way to install these plugins, or at least something via the command line, before creating this policy, as now it is just adding unnecessary friction to new providers that old providers don't; start deleting old providers and put them into plugins, if this policy is about maintainability, because else this is just then pulling up the ladder for "new" LLM providers (mistral was not "new") |
|
I now solved it to have Claude make a custom connector that works, so I was able to solve it for now. It lets me choose the model that the API offers like the default options. |
|
Many people in Europe would really appreciate if mistral was added. It's weak to just exclude those people because of the policy. |
Description
This PR adds Mistral AI as a fully-supported, first-class provider for Hermes Agent. Mistral models are now available directly in
hermes modelwithout requiring custom endpoint configuration.Motivation
Community members have been asking for native Mistral support, particularly for:
Previously, users had to configure Mistral as a "custom endpoint", which lacked the seamless integration experience of other providers.
Changes
1. Provider Registration (
hermes_cli/auth.py)PROVIDER_REGISTRYwith proper authentication configurationMISTRAL_API_KEYenvironment variableMISTRAL_BASE_URLfor enterprise deployments2. Curated Model List (
hermes_cli/models.py)Added 8 carefully selected models:
mistral-large-latestmistral-small-latestmistral-large-2512mistral-small-2603mistral-medium-latestcodestral-latestpixtral-large-latestministral-8b-latest3. Provider Overlay (
hermes_cli/providers.py)HERMES_OVERLAYSentry for Mistralopenai_chattransportmistral-ai,mistralaihttps://api.mistral.ai/v14. Vision Backend Support (
agent/auxiliary_client.py)_VISION_AUTO_PROVIDER_ORDER_try_mistral()for vision task routingpixtral-large-latestvision_analyze_toolGDPR & Compliance Benefits
This is particularly valuable for European enterprise customers:
Testing
Verified working:
hermes modeldisplays Mistral whenMISTRAL_API_KEYis setUsage
Or with specific model:
Environment Variables
MISTRAL_API_KEY(required): Your Mistral API key from https://console.mistral.ai/MISTRAL_BASE_URL(optional): Override for enterprise deployments or proxiesModel Pricing (as of implementation)
Checklist
PROVIDER_REGISTRYHERMES_OVERLAYconfigurationRelated Issues
Closes community requests for:
Screenshots
N/A - CLI-only changes
Breaking Changes
None. This is a purely additive feature.
Future Enhancements
Potential follow-ups: