Reputation: 722
I am often under the impression that available API versions of Azure infrastructure components provided by different components of the Azure stack do not match.
In this particular case, I was trying to upgrade client code using the old Form Recognizer to use the more recent Document Intelligence. My client code is written in python and I wanted to upgrade the library from azure-ai-formrecognizer=3.2.2
to azure-ai-documentintelligence=1.0.0b3
. This new library is not compatible with the API version I was using for Microsoft.CognitiveServices/accounts
, which was 2023-05-01
. According to the SDK documentation, the new library targets the API version 2024-02-09-preview
. This version, however, is not listed among the available versions as claimed by the ARM plane, which reads:
2024-06-01-preview
2024-04-01-preview
2023-10-01-preview
2023-06-01-preview
2023-05-01
2022-12-01
2022-10-01
2022-03-01
2021-10-01
2021-04-30
2017-04-18
2016-02-01-preview
I am aware that some API versions are only available in some regions, but in my particular case I made sure this is not the issue. The region should be correct (West Europe):
There is a further turn to this issue, which is that the APIs returned by the ARM plane do not seem to match very well those established in the official documentation:
We all accept that MSFT documentation is what it is, but I just want to make clear that this is not a documentation problem. By browsing into the SDK library code we indeed find:
I know it cannot be that API versions supported by the SDK just lag behing what is available according to the ARM plane (although that also happens), because if it were, the API version targeted by the python library should also appear in the ARM error message, i.e. the API versions supported by all SDK libraries should be a subset of those supported by the ARM plane, and that is not the case.
One option is that MSFT just decides to stop supporting certain API libraries and take them out of the ARM reponse message, but until that happens they have already published a complete official client library that supports an API version that they were not sure they wanted to support.
The other option is that I am making the mistake of assuming that all these API versions refer to the same APIs.
So my question is:
P.S. In my particular case, the solution was to use the aforementioned python library with the closest but earlier than 2024-02-09-preview
API version among those available according to the ARM plane response. Of course, this procedure cannot be used if the functionality being sought is the one in the latest release, but that has to do with the fact that, indeed, SDK versions usually lag behind ARM supported ones (another problem).
Upvotes: 0
Views: 77