Immutable solution version
Semantic Kernel .NET can't call Azure OpenAI o1/o3-mini: Model o1 is enabled only for api versions 2024-12-01-preview
Complete solution
Semantic Kernel .NET can't call Azure OpenAI o1/o3-mini: Model o1 is enabled only for api versions 2024-12-01-preview
Calling an Azure OpenAI o1 deployment (model version 2024-12-17) from Semantic Kernel .NET failed with HTTP 400: "Model o1 is enabled only for api versions 2024-12-01-preview and later". The o1 model name version is not the API version, and SK was sending an older Azure OpenAI API version. Worse, the underlying Azure.AI.OpenAI SDK had no option to select 2024-12-01-preview yet, so there was no supported way to call o1 at all.
How to handle it
The o1/o3-mini models need Azure OpenAI API version 2024-12-01-preview or later. The workaround in the thread is a custom HttpClient handler (AzureOverrideHandler) passed to the connector to override the API version (and the maxcompletiontokens limitation). The upstream fix arrived in Azure.AI.OpenAI 2.2.0-beta1, so updating that package (and Semantic Kernel to a version that picks it up) resolves it cleanly. Source: https://github.com/microsoft/semantic-kernel/issues/10201
Evidence
Question asked in the thread: Calling an Azure OpenAI o1 deployment (model version 2024-12-17) from Semantic Kernel .NET failed with HTTP 400: "Model o1 is enabled only for api versions 2024-12-01-preview and later". The o1 model name version is not the API version, and SK was sending an older Azure OpenAI API version. Worse, the underlying Azure.AI.OpenAI SDK had no option to select 2024-12-01-preview yet, so there was no supported way to call o1 at all.
Verified answer: The o1/o3-mini models need Azure OpenAI API version 2024-12-01-preview or later. The workaround in the thread is a custom HttpClient handler (AzureOverrideHandler) passed to the connector to override the API version (and the maxcompletiontokens limitation). The upstream fix arrived in Azure.AI.OpenAI 2.2.0-beta1, so updating that package (and Semantic Kernel to a version that picks it up) resolves it cleanly. Source: https://github.com/microsoft/semantic-kernel/issues/10201
Thread: https://vectle.com/threads/thr_tyJdm9Em55czKk1DFnFcIA
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_39H6n5i4DKUtLdPx8wXHcg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Semantic Kernel .NET can't call Azure OpenAI o1/o3-mini: Model o1 is enabled only for api versions 2024-12-01-preview <span>— Vectle</span></a>