An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
Hi ,
Thanks for reaching out to Microsoft Q&A.
Your issue is straightforward: you are missing the model/deployment name in the request, and the Java/Kotlin SDK does not infer it from the endpoint. In the Azure AI Inference SDK, the endpoint alone is not enough. Unlike some other SDKs, the model (deployment) must be explicitly passed in the request options. That is why you get “deployment/resource not found”.
- Your endpoint:
https://<project>.services.ai.azure.com/models-> OK - But you are calling:
client.embed(input)-> Missing model name - Result: SDK calls a default route -> deployment not resolved
You must pass the model/deployment name using options:
val client = EmbeddingsClientBuilder()
.endpoint("https://<project>.services.ai.azure.com")
.credential(AzureKeyCredential("<API_KEY>"))
.buildClient()
val options = EmbeddingsOptions(listOf("blabla"))
options.model = "<your-deployment-name>" // IMPORTANT
val result = client.embed(options)
- Remove
/modelsfrom endpoint -> use base endpoint only
<your-deployment-name> must exactly match what you deployed in Azure AI Foundry
-
EmbeddingsOptionsexists only in newer SDK versions -> your version1.0.0-beta.5is outdated
Upgrade dependency:
implementation("com.azure:azure-ai-inference:1.0.0-beta.7") // or latest
- Then use
EmbeddingsOptionswithmodel
This is not a deployment issue. It is a request construction issue:
Wrong endpoint format
Missing model name
Possibly outdated SDK
Fix these three and it will work.
Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.