Skip to content

Mistral plugin is broken with the latest mistralai 2.0 release #5115

@csanz91

Description

@csanz91

Bug Description

Mistral recently released version 2.0 of their Python SDK. This release includes several breaking changes that cause the current LiveKit Mistral plugin to fail. The plugin needs to be updated to support the new API client and method signatures introduced in v2.0.

Expected Behavior

The llm inference should work without crashing

Reproduction Steps

1. uv add "livekit-agents[mistralai]~=1.4"
2. Run the mistral example

The code will fail with:
ImportError: cannot import name 'ChatCompletionStreamRequestMessagesTypedDict' from 'mistralai' (unknown location)

Operating System

macOS

Models Used

mistral-large-2512

Package Versions

livekit-plugins-mistralai==1.4.5
livekit==1.1.2
livekit-agents==1.4.5

Session/Room/Call IDs

No response

Proposed Solution

We should either lock the mistralai package to mistralai<2.0.0 or refactor the plugin to make it work with the latest library.

Additional Context

No response

Screenshots and Recordings

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions