I had a fresh Microsoft Foundry resource created and when attempting to add
the resource into Content Understanding Studio, I made sure to check "Enable auto-deployment for required models if no defaults are
available."
But I was still getting the following error.
{
"error": {
"code": "InvalidRequest",
"message": "Invalid request.",
"innererror": {
"code": "DefaultsNotSet",
"message": "Defaults have not yet been set. Call 'PATCH /contentunderstanding/defaults' first."
}
}
}
The fix is (as mentioned in the error message), manually call the PATCH endpoint with an empty body before
adding the resource.
curl --location --request PATCH 'https://{foundry-resource}.cognitiveservices.azure.com/contentunderstanding/defaults?api-version=2025-11-01' `
--header 'ocp-apim-subscription-key: {ocp-apim-subscription-key}' `
--header 'Content-Type: application/json' `
--data '{
}'
Once this PATCH request is made, the Foundry resource gets added
successfully without any errors.
This appears to be a bug. When "Enable auto-deployment for required models if no defaults are
available" is checked, the PATCH call should be handled internally by the Studio.
Happy Coding.
Regards,
Jaliya
No comments:
Post a Comment