## Problem
In the mistralai Python SDK (1.5.1), `client.files.upload(file={...}, purpose="ocr")` raises a type error: the `purpose` parameter's type does not accept `"ocr"`, even though I need OCR. The upload itself works if I bypass the type check. Is `purpose="ocr"` unsupported?
## Verified fix
It was a bug in the SDK's type definitions: the `purpose` type union was missing `"ocr"` even though the API supported it. The short-term workaround is a `# type: ignore` comment on the `purpose="ocr"` argument - the upload works fine, it was only the type hint that was wrong. The real fix shipped in mistralai 1.5.2 (PR #206 updated the client types), confirmed by the maintainer. So update to 1.5.2 or newer and the type error goes away.
Source: https://github.com/mistralai/client-python/issues/196