Hi, Antonio
My feeling is that it is unlikely to work. The llama-3-2-1b-instruct-1 (any open source LLM) is deployed to *.inference.ml.azure.com that is different to the GPT models deployment as a part of Azure OpenAI service.
Guess you used the target uri from the deployment endpoint in the format of: https://xxxxx.eastus2.inference.ml.azure.com. if you compare this with your working GPT-4o's endpoint url, you will notice the difference.
On the other hand, the GPT-4o's request structure would be slightly different to llama 3.2's. the error you see is likely related to the authentication. If you go to Consume tab, and look at the example python code, the required auth header is a bearer header, but the AzureOpenAiChatModel would be using a api-key header.
In short, dont believe the AzureOpenAiChatModel support llama-3-2-1b-instruct-1 model out of the box yet.