def test_get_metadata(test_llm: AzureAICompletionsModel, caplog):
    """
    Tests if we can get model metadata back from the endpoint. If so,
    model_name should not be 'unknown'. Some endpoints may not support this
    and in those cases a warning should be logged.
    """
    response = test_llm.metadata

    assert (
        response.model_name != "unknown"
        or "does not support model metadata retrieval" in caplog.text
    )

    Tests if we can get model metadata back from the endpoint. If so,
    model_name should not be 'unknown'. Some endpoints may not support this
    and in those cases a warning should be logged.
    
llama-index-integrations/llms/llama-index-llms-azure-inference/tests/test_llms_azure_inference.py