microsoft-foundry / microsoft-foundry/foundry-samples

Mistral AI python sample mistral-ocr-with-vlm.ipynb: 500 error while performing OCR or unexisting model is required

Open
#289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Bicep
Stars
445
Forks
494
Avg merge
11h 35m
Merged PRs (30d)
38

Description

In the file mistral-ocr-with-vlm.ipynb the instruction requires to use the mistralai-ocr-2503 model for OCR, however such a model doesn't exist in the AI Foundry model catalog. When I look for "ocr", only the new mistral-document-ai model appears:

Image

I tried to use this model and provided its URL endpoint, but executing the following the function _call_ocr_model() results in 500 error.

I tested different options of the URL, like https://MY_RESOURCE.services.ai.azure.com/providers/mistral/azure/ocr and https://MY_RESOURCE.services.ai.azure.com/providers/mistral/azure (the code appends /v1/ocr), but without success.

The mistral-ocr-2503 model is mentioned in the payload variable in the function _call_ocr_model() - I tried to replace it with mistral-document-ai-2505 with using the full endpoint URL and with removed appending /v1/ocr, but still 500 is returned.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect mistral-ocr-with-vlm.ipynb, starting with _call_ocr_model() and its payload and endpoint construction. Verify the currently available AI Foundry OCR model and endpoint behavior, then update the sample so its OCR call completes without a 500 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.