Skip to content

[BUG] o3-mini cannot be called from C# using the Azure OpenAI SDK because there is no place to add the api-reference #49011

Open
@benperk

Description

@benperk

Library name and version

Azure.AI.OpenAI 2.1.0

Describe the bug

o3-mini cannot be called from C# using the Azure OpenAI SDK because there is no place to add the api-reference and it defaults to 2025-01-31. I receive this error. This is not happening with o1-mini or gpt-4o-mini.

HTTP 400 (BadRequest)Model {modelName} is enabled only for api versions 2024-12-01-preview and later.

When I append "?api-version=2024-12-01-preview" to the endpoint I receive this error.

HTTP 404 (404)Resource not found

Expected behavior

Expect the same behavior as with 01-mini and gpt-40-mini

Actual behavior

HTTP 400 (BadRequest)Model {modelName} is enabled only for api versions 2024-12-01-preview and later.

Reproduction Steps

var aoai_client = new AzureOpenAIClient(new Uri(parametersO3MINI.Endpoint), new DefaultAzureCredential());
chatClientO3MINI = aoai_client.GetChatClient(parametersO3MINI.Model);
optionsO3MINI = new()
{
Temperature = parametersO3MINI.Temperature,
FrequencyPenalty = parametersO3MINI.FrequencyPenalty,
PresencePenalty = parametersO3MINI.PresencePenalty,
Seed = parametersO3MINI.Seed,
};

var messagesO3MINI = new ChatMessage[]
{
new SystemChatMessage(system_prompt),
new UserChatMessage(user_prompt)
};
ChatCompletion completionO3MINI = chatClientO3MINI.CompleteChat(messagesO3MINI, optionsO3MINI);

Environment

.NET 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.OpenAIService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions