Skip to content

feat(mistralai): upgrade to SDK v2#5163

Merged
davidzhao merged 11 commits intolivekit:mainfrom
Pauldevillers:paul/feat/upgrade-mistralai-sdk-v2
Mar 24, 2026
Merged

feat(mistralai): upgrade to SDK v2#5163
davidzhao merged 11 commits intolivekit:mainfrom
Pauldevillers:paul/feat/upgrade-mistralai-sdk-v2

Conversation

@Pauldevillers
Copy link
Copy Markdown
Contributor

Summary

  • Upgrade mistralai dependency from >=1.9.11,<2.0.0 to >=2.0.0
  • Update import paths for SDK v2 module reorganization
  • Rename ChatCompletionStreamRequestMessagesTypedDict to singular form

No runtime API changes. Reverses the v1 lock from #5116.

Test plan

  • ruff format + ruff check pass
  • mypy strict passes (0 errors in 6 files)
  • Plugin imports cleanly
  • Tested with live agent in console mode (Mistral LLM + STT working)

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 19, 2026

CLA assistant check
All committers have signed the CLA.

@davidzhao
Copy link
Copy Markdown
Member

@Pauldevillers should we update the default models here for LLM to "ministral-8b-latest?

@Pauldevillers
Copy link
Copy Markdown
Contributor Author

Hi @davidzhao, will recommend to choose latest version of 8B model with ministral-8b-latest, will follow up if/when we believe there is a better model for this use.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

…ralai/llm.py


devin

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 8 additional findings in Devin Review.

Open in Devin Review

dependencies = [
"livekit-agents>=1.5.0",
"mistralai>=1.9.11,<2.0.0",
"mistralai>=2.0.0,<3.0.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 uv.lock not updated to match new mistralai >=2.0.0 dependency requirement

The pyproject.toml was updated to require mistralai>=2.0.0,<3.0.0, but the uv.lock file was not regenerated. The lock file still pins mistralai==1.12.4 (a v1.x release) and its metadata still shows specifier = ">=1.9.11,<2.0.0" (uv.lock:2584). Since the new code uses v2-specific import paths (mistralai.client, mistralai.client.models, mistralai.client.errors.sdkerror), anyone installing via uv sync (which is the project's standard installation method per AGENTS.md) will get v1.x, and the plugin will fail with ImportError at runtime.

Prompt for agents
Run `uv sync` (or `make install`) from the repository root to regenerate uv.lock with the updated mistralai>=2.0.0,<3.0.0 dependency. The lock file at uv.lock currently pins mistralai==1.12.4 with specifier >=1.9.11,<2.0.0, which is inconsistent with the pyproject.toml change at livekit-plugins/livekit-plugins-mistralai/pyproject.toml:26.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@davidzhao davidzhao merged commit 596fa7f into livekit:main Mar 24, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants