Skip to content

[MISTRAL] ImportError: cannot import name 'UNSET' from 'mistralai' #4727

@pintaf1

Description

@pintaf1

Initial Checks

Description

Hello.

When installing pydantic-ai-slim with mistral dependency, we get this error:
ImportError: cannot import name 'UNSET' from 'mistralai'

Mistral has recently deployed a new major version (2.0.x) of their python client.
The issue is not present with pre-2.0.x versions.

Minimal, Reproducible Example

Logfire Trace

No response

Python, Pydantic AI & LLM client version

  • Python: 3.21
  • Pydantic AI: 1.70.0
  • LLM provider SDK: 2.0.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugReport that something isn't working, or PR implementing a fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions