semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: Bug: o3-mini cannot be used with OpenAIAssistantAgent

Open fribergpg opened this issue 1 year ago • 5 comments

Description To create an Assistant API-based system using OpenAI directly you need to use the OpenAIAssistantAgent entity, which takes an OpenAIAssistantDefinition, which takes a string for the model's ID.

In the background a "temperature" parameter (as well as a "top_p" parameter) seems to always be added. The problem is that the new o3 family doesn't allow these parameters to exist at all.

To Reproduce Steps to reproduce the behavior:

  1. Create the agent
            var clientProvider = OpenAIClientProvider.FromClient(new OpenAIClient(_options.ApiKey));

            var assistantDefinition = new OpenAIAssistantDefinition("o3-mini")
            {
                Instructions = AssistantInstructions,
            };

            var assistantAgent = OpenAIAssistantAgent.CreateAsync(clientProvider, assistantDefinition, kernel, cancellationToken: cancellationToken).Result;

  1. Interact with the agent
  2. See error

Expected behavior A response. The model works fine in platform.openai.com --> Playground

Error message Unsupported parameter: 'temperature' is not supported with this model.

Platform

  • Language: C#
  • Source: NuGet package version 1.37.0 (latest as of today, 18th of February)
  • AI model: o3-mini
  • IDE: Rider
  • OS: MacOS

Additional context Passing Temperature = null in the assistandDefinition didn't solve anything.

fribergpg avatar Feb 18 '25 13:02 fribergpg

+1, I have the same message

JP-droidic avatar Feb 18 '25 15:02 JP-droidic

Hi team, do you have any update on this or at least an idea how to mitigate this issue until there is a proper fix?

thanks

JP-droidic avatar Feb 19 '25 20:02 JP-droidic

The latest package may address this as we've updated our approach on option handling. I'll review this scenario with the current changes.

crickman avatar Feb 21 '25 19:02 crickman

I've verified Sample: Step01_Assistant.cs against o3-mini using main branch.

Image

crickman avatar Feb 21 '25 19:02 crickman

YEs working for us alos - thank you

JP-droidic avatar Feb 23 '25 16:02 JP-droidic