Summary
The Mistral OCR API (POST /v1/ocr) is not instrumented. Calls to client.ocr.process() and client.ocr.process_async() produce zero Braintrust tracing. This is a documented, production API in the Mistral platform for extracting text and structured content from images and documents using vision models.
The Braintrust Mistral integration instruments chat completions, embeddings, FIM, and agents, but has no patchers for the OCR resource.
What is missing
| Mistral Resource |
Method |
Instrumented? |
client.chat |
complete(), stream() |
Yes |
client.embeddings |
create() |
Yes |
client.fim |
complete(), stream() |
Yes |
client.agents |
complete(), stream() |
Yes |
client.ocr |
process(), process_async() |
No |
At minimum, instrumentation should create spans capturing:
- Input: the document/image reference and any processing configuration
- Output: the extracted text/structured content
- Metrics: latency, token usage (if reported by the API)
- Metadata: model, document type, page count
The OCR API is a generative vision execution surface — it uses Mistral vision models to understand and extract content from visual inputs. It is analogous to Google GenAI's models.generate_content() with document inputs, which IS instrumented in this repo.
Braintrust docs status
not_found — The Mistral integration page documents chat completions only. No mention of OCR API support.
Upstream sources
Local files inspected
py/src/braintrust/integrations/mistral/patchers.py — defines patchers for Chat, Embeddings, Fim, Agents; zero references to ocr or Ocr
py/src/braintrust/integrations/mistral/tracing.py — wrapper functions for chat, embeddings, FIM, agents only; no OCR wrapper
py/src/braintrust/integrations/mistral/integration.py — integration class registers 4 composite patchers (ChatPatcher, EmbeddingsPatcher, FimPatcher, AgentsPatcher); no OcrPatcher
py/src/braintrust/integrations/mistral/test_mistral.py — no OCR test cases
py/noxfile.py — test_mistral session tests against LATEST and 1.12.4; no OCR coverage
Summary
The Mistral OCR API (
POST /v1/ocr) is not instrumented. Calls toclient.ocr.process()andclient.ocr.process_async()produce zero Braintrust tracing. This is a documented, production API in the Mistral platform for extracting text and structured content from images and documents using vision models.The Braintrust Mistral integration instruments chat completions, embeddings, FIM, and agents, but has no patchers for the OCR resource.
What is missing
client.chatcomplete(),stream()client.embeddingscreate()client.fimcomplete(),stream()client.agentscomplete(),stream()client.ocrprocess(),process_async()At minimum, instrumentation should create spans capturing:
The OCR API is a generative vision execution surface — it uses Mistral vision models to understand and extract content from visual inputs. It is analogous to Google GenAI's
models.generate_content()with document inputs, which IS instrumented in this repo.Braintrust docs status
not_found — The Mistral integration page documents chat completions only. No mention of OCR API support.
Upstream sources
POST /v1/ocr(documented at https://docs.mistral.ai/api/)mistralaiv2.3.1 on PyPI): https://pypi.org/project/mistralai/ — includes OCR resourceLocal files inspected
py/src/braintrust/integrations/mistral/patchers.py— defines patchers forChat,Embeddings,Fim,Agents; zero references toocrorOcrpy/src/braintrust/integrations/mistral/tracing.py— wrapper functions for chat, embeddings, FIM, agents only; no OCR wrapperpy/src/braintrust/integrations/mistral/integration.py— integration class registers 4 composite patchers (ChatPatcher, EmbeddingsPatcher, FimPatcher, AgentsPatcher); no OcrPatcherpy/src/braintrust/integrations/mistral/test_mistral.py— no OCR test casespy/noxfile.py—test_mistralsession tests againstLATESTand1.12.4; no OCR coverage