Azure/azure-sdk-for-net

[BUG] `AzureOpenAIModelFactory` has disappeared in Azure.AI.OpenAI 2.0.0-betas

Opened this issue · 2 comments

Library name and version

Azure.AI.OpenAI 2.0.0-beta2

Describe the bug

There was a bug raised previously about the Azure.AI.OpenAI package not being conformant with the Azure SDK guidelines and not supporting mocking.

#36462 was raised and it was resolved by introducing AzureOpenAIModelFactory.
In the 2.0.0-beta versions of the package, the constructors are again internal and not mockable except for when using reflection.

Expected behavior

AzureOpenAIModelFactory is available and allows instantiating custom instances of the various classes used for testing.

Actual behavior

AzureOpenAIModelFactory is missing.

Reproduction Steps

Try to use AzureOpenAIModelFactory - find it is not there :-)

Environment

No response

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @ralph-msft @trrwilson.

klinki commented

I had the same problem as you - it seems it is finally addressed in openai/openai-dotnet 2.0.0-beta.11 https://github.com/openai/openai-dotnet/blob/main/CHANGELOG.md#200-beta11-2024-09-03