Skip to content

Update azure-ai-inference docs/samples to include type of endpoint #44517

@lmolkova

Description

@lmolkova

azure-ai-inference playground sample does not work

Image

It results in the 404 to https://*.services.ai.azure.com/models/chat/completions?api-version=2024-08-01-preview.

15:44:41.862 [main] INFO  c.a.a.i.i.C.completeSync - {"az.sdk.message":"HTTP response","statusCode":404,"url":"https://*.services.ai.azure.com/models/chat/completions?api-version=2024-08-01-preview","durationMs":946,"content-length":56,"Date":"Wed, 05 Mar 2025 23:44:41 GMT","redactedHeaders":"Content-Type,x-content-type-options,Strict-Transport-Security,apim-request-id","content-length":56,"body":"{\"error\":{\"code\":\"404\",\"message\": \"Resource not found\"}}"}
Exception in thread "main" com.azure.core.exception.ResourceNotFoundException: Status code 404, "{"error":{"code":"404","message": "Resource not found"}}"

Workarounds

  • Downgrade API version to 2024-05-01-preview when using inference endpoint
  • Use OpenAI endpoint like https://*.openai.azure.com/openai/deployments/gpt-4o-mini and not provide model to chatCompletionOptions

Suggestions

Based on the inference readme examples, it's not clear which type of the endpoint to use with/without the model:

  • Please provide clarification/hints on which endpoint should be used in readme samples (inference/openai/services), e.g. in a form of .endpoint("https://{your resource}.openai.azure.com/openai/deployments/{model}")
  • Please add separate examples with and without model name set through ChatCompletionOptions - it's not clear when to set/not set it

Metadata

Metadata

Assignees

Labels

AI Model InferenceClientThis issue points to a problem in the data-plane of the library.Docs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions