An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
Hi @b u
Direct answers to your two questions first.
- There is no documented soft delete or name retention period for model IDs in Document Intelligence. A delete is supposed to be immediate and permanent. However, what you're hitting is a known pattern: deletion can leave orphaned model metadata in the backend that keeps the ID "taken" even though the model is gone from the Studio list. This has been reported before with the exact same symptoms.
- There is no hard purge command, and no Azure CLI command for Document Intelligence model management at all (it's a data plane operation). The DELETE REST call is the only delete that exists. So the way forward is to find out where the stale reference lives:
Step 1. Check if the model still exists on the service, since the Studio list is not the source of truth:
GET {endpoint}/documentintelligence/documentModels/custom_model_v1?api-version=2024-11-30
Ocp-Apim-Subscription-Key: {your-key}
Step 2. If that returns 200, the model was never fully deleted. Delete it through the API:
DELETE {endpoint}/documentintelligence/documentModels/custom_model_v1?api-version=2024-11-30
A 204 response means it's gone. Then retry the compose.
Step 3. If the GET returns 404, the name is actually free on the service side and the block is only in Studio's UI validation. Do a hard refresh or try an incognito window, and if Studio still blocks it, bypass Studio and compose directly via the REST API (POST {endpoint}/documentintelligence/documentModels:compose) or the SDK, passing custom_model_v1 as the modelId. The service will accept it if the ID is really free.
Step 4. If the GET returns 404 but the compose API itself also rejects the ID with a conflict, that confirms orphaned backend metadata, and only Microsoft can purge it. Open a support request from the portal with the resource name, region, model ID and timestamps, and they can clear it server side.
References: https://learn.microsoft.com/en-us/rest/api/aiservices/document-models/delete-model?view=rest-aiservices-v4.0%20(2024-11-30) https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/how-to-guides/compose-custom-models?view=doc-intel-4.0.0