fix(tts): lift mistralai blanket-ban behind opt-in gate (#34503) - #34506
Closed
Bartok9 wants to merge 1 commit into
Closed
fix(tts): lift mistralai blanket-ban behind opt-in gate (#34503)#34506Bartok9 wants to merge 1 commit into
Bartok9 wants to merge 1 commit into
Conversation
Contributor
Author
|
Closing as superseded by #34841 ( My PR lifted the post-2026-05-12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mistralSTT/TTS providers, which currently refuse unconditionally even for users on a verified-cleanmistralaiinstall.2.4.6can never be re-enabled by this path.Motivation
Closes #34503.
The
mistralaiPyPI project was quarantined on 2026-05-12 after the malicious 2.4.6 release (Mini Shai-Hulud). In response the runtime hard-blocked themistralprovider in both STT (tools/transcription_tools.py) and TTS (tools/tts_tool.py). The quarantine was version-specific —2.4.8+ is clean — but the ban left users who manually verified a clean install with no escape hatch (silent"none"for STT, JSON error for TTS).Rather than the issue's bare "check for credentials" approach (which would trust any installed version, including the malicious 2.4.6), this PR mirrors the repo's existing
HERMES_ALLOW_PRIVATE_URLSopt-in pattern:tools/lazy_deps.mistralai_unlock_status() -> (allowed, reason).HERMES_ALLOW_MISTRALAIis truthy (explicit user acknowledgment), andmistralaiis>= 2.4.8(MISTRALAI_MIN_SAFE_VERSION).2.4.6is always refused.tools/lazy_deps.pyis the canonical home for the quarantine logic (it already documents the mistral quarantine and has version-checking helpers), so STT and TTS share one source of truth.The
mistralauto-detect skip in STT is intentionally left in place — only explicitprovider: mistralselection is unblocked, keeping the change focused and avoiding surprising auto-routing to a paid provider.Verification
python3 -m pytest tests/tools/test_lazy_deps.py tests/tools/test_tts_mistral.py tests/tools/test_transcription_tools.py— 182 passedTestMistralaiUnlockStatus(6 tests): locked-by-default, opt-in-but-missing, below-floor (2.4.6) refused, clean 2.4.8 allowed, newer allowed, falsey env stays locked.none/error; unlocked + clean + key → routes to provider.check_tts_requirementscapability probe (a separate "is any TTS available" check, not part of the ban).Notes