-
Notifications
You must be signed in to change notification settings - Fork 5k
[System.ClientModel] Support all properties needed to create a client in ClientCache and consolidate ClientConnection.Credential usage #49315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[System.ClientModel] Support all properties needed to create a client in ClientCache and consolidate ClientConnection.Credential usage #49315
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews Azure.AI.OpenAI |
It would be good if ClientConnection.Credential was typed as AuthenticationTokenProvider and not Object. |
@ShivangiReja , @christothes, should we remove ClientConnection.ApiKeyCredential and use the ClientConnection.Credential property for API key case? |
84d7f0b
to
cb0ba90
Compare
…o shreja/SCM_ClientCache_Options
API change check APIView has identified API level changes in this PR and created following API reviews. Azure.AI.OpenAI |
sdk/ai/Azure.AI.Inference/api/Azure.AI.Inference.netstandard2.0.cs
Outdated
Show resolved
Hide resolved
… in ClientCache and consolidate ClientConnection.Credential usage (#49315) [System.ClientModel] Add support for client options in ClientCache
Task 1:
Enhanced the
ClientCache
to support client reuse based on all necessary properties required to create a client instance.IEquatable<object>
identifier.AzureOpenAIClientOptions
) are cached and retrieved independently.Example:
Both clients are now stored as distinct entries if
options1 != options2
.Task 2:
Simplified
ClientConnection
by removing theApiKeyCredential
property.Credential
property.