Cognative Services - Form Recognizer (specified model not found or not ready)

Paul Mac 16 Reputation points


We are trying to integrate the Azure Form Recognizer technology into our product and can't seem to get this last step to work. It just happens to be the bit that does the actual work .:)

We have used Form Recognizer Studio (API version 2022-06-30-preview) to build and train a model successfully.

We are building in .Net 4.8 C# and using the client library Azure.AI.FormRecognizer Latest Stable 3.1.1 (have also tried pre-release 4.0.0-beta.4).

Sample of the code code:

                // Establish an Azure Client object  
                var recognizerClient = new FormRecognizerClient(new Uri(endpoint), new AzureKeyCredential(key));  

                // Seek to the start of the stream  
                DocumentStream.Seek(0, SeekOrigin.Begin);  

                // Start the recognition process  
                var operation = recognizerClient.StartRecognizeCustomForms(  
                    ModelId, DocumentStream,  
                    new RecognizeCustomFormsOptions { ContentType = contentType });  

                // Wait for the recognition process to complete  
                Collection = await operation.WaitForCompletionAsync();  

Exception occurs when the StartRecognizeCustomForms function is called.

Exception message returned by the SDK package.

Specified model not found or not ready, Model Id: {Model GUID as listed in the models list from Form Recognizer Studio}
Status: 400 (Bad Request)
ErrorCode: 1001

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,203 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,192 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. romungi-MSFT 41,321 Reputation points Microsoft Employee

    @Paul Mac The mapping of API versions to SDK is as mentioned below:

    SDK Version -> 3.1.X -> API Version -> 2.0,2.1
    SDK Version -> 4.0.0-beta.4 -> API Version -> 2.0, 2.1, 2022-06-30-preview

    This is documented on this page for reference.

    So, using the 4.0.0-beta.4 SDK version is appropriate in your case since you have used API version 2022-06-30-preview for training your model.

    With respect to the error, I think this is a model issue in the backend since you are seeing the error with the latest beta SDK version too.
    You should be seeing the same behavior with the form recognizer studio too. Did you get a chance to test from the studio?

    If this error persists, I recommend trying a different model id in your code and check if it is able to use the client to get a successful result.

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    1 person found this answer helpful.