Skip to content

[BUG CLIENT]: Pydantic ValidationError shadows actual server error #278

@jpic

Description

@jpic

Python -VV

3.13

Pip Freeze

1.9.11

Reproduction Steps

client = Mistral(api_key='correct api key')
client.chat.complete(model='invalid model name', messages=messages)

Expected Behavior

excepted to getting the assistant message returning the error "Requested model is unsupported"...
... without resorting to a breakpoint in chat.py

Additional Context

Pydantic ValidationError

Suggested Solutions

Dunno, perhaps don't shadow the server responses with pydantic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions