semantic-kernel
semantic-kernel copied to clipboard
.Net: Bug: Google AI client ignores modelId passed to PromptExecutionSettings
Describe the bug
Google AI client always uses modelId passed to the constructor
To Reproduce Steps to reproduce the behavior:
- Create an instance of Google AI client
- Pass model1 to the constructor
- Use a different model in PromptExecutionSettings passed to any generation method
- Client ignores the
ModelIdproperty
Expected behavior Client should always prefer ModelId from PromptExecutionSettings
Platform
- Language: C#
- Source: Microsoft.SemanticKernel.Connectors.Google 1.66.0-alpha (nuget)
- AI model: any
- IDE: Rider
- OS: any
Same goes for OpenAIChatCompletionService. It only uses this._client.ModelId, a executionSettings?.ModelId ?? would be nice.