From abf10dd6ea072f5a25ebc6f811fc1e3004295ebe Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:47:02 +0000 Subject: [PATCH] Update CommunityToolkit VectorData package names (#14333) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Motivation and Context CommunityToolkit/AI renamed the Cosmos MongoDB and Cosmos NoSQL VectorData providers. Semantic Kernel references should point to the renamed packages and source locations. ### Description - **README links** - Updated Cosmos MongoDB README to `MEVD/src/AzureDocumentDB` - Updated Cosmos NoSQL README to `MEVD/src/AzureCosmosDB` - **Central package versions** - `CommunityToolkit.VectorData.CosmosMongoDB` → `CommunityToolkit.VectorData.AzureDocumentDB` - `CommunityToolkit.VectorData.CosmosNoSql` → `CommunityToolkit.VectorData.AzureCosmosDB` - **Sample references** - Updated affected sample project package references. - Updated renamed extension method call sites: - `AddCosmosMongo...` → `AddDocumentDB...` - `AddCosmosNoSql...` → `AddCosmos...` ### Contribution Checklist - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com> Co-authored-by: Adam Sitnik --- dotnet/Directory.Packages.props | 4 ++-- .../Concepts/Caching/SemanticCachingWithFilters.cs | 12 ++++++------ dotnet/samples/Concepts/Concepts.csproj | 4 ++-- .../VectorStoreRAG/Options/ApplicationConfig.cs | 8 ++++---- .../Demos/VectorStoreRAG/Options/CosmosConfig.cs | 4 ++-- dotnet/samples/Demos/VectorStoreRAG/Program.cs | 12 ++++++------ dotnet/samples/Demos/VectorStoreRAG/README.md | 10 +++++----- .../Demos/VectorStoreRAG/VectorStoreRAG.csproj | 6 +++--- dotnet/samples/Demos/VectorStoreRAG/appsettings.json | 2 +- .../samples/InternalUtilities/TestConfiguration.cs | 4 ++-- dotnet/src/VectorData/CosmosMongoDB/README.md | 2 +- dotnet/src/VectorData/CosmosNoSql/README.md | 2 +- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index 0c1eb563ee..ad2272d9cb 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -187,8 +187,8 @@ - - + + diff --git a/dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs b/dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs index 8549d40d14..e199a2d440 100644 --- a/dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs +++ b/dotnet/samples/Concepts/Caching/SemanticCachingWithFilters.cs @@ -77,18 +77,18 @@ public class SemanticCachingWithFilters(ITestOutputHelper output) : BaseTest(out } /// - /// Executing similar requests two times using Azure Cosmos DB for MongoDB caching store to compare execution time and results. + /// Executing similar requests two times using Azure DocumentDB caching store to compare execution time and results. /// Second execution is faster, because the result is returned from cache. - /// How to setup Azure Cosmos DB for MongoDB cluster: https://learn.microsoft.com/en-gb/azure/cosmos-db/mongodb/vcore/quickstart-portal + /// How to set up Azure DocumentDB: https://learn.microsoft.com/azure/documentdb/quickstart-portal /// [Fact] - public async Task CosmosMongoDBCacheAsync() + public async Task DocumentDbCacheAsync() { var kernel = GetKernelWithCache(services => { - services.AddCosmosMongoVectorStore( - TestConfiguration.CosmosMongo.ConnectionString, - TestConfiguration.CosmosMongo.DatabaseName); + services.AddDocumentDBVectorStore( + TestConfiguration.AzureDocumentDb.ConnectionString, + TestConfiguration.AzureDocumentDb.DatabaseName); }); var result1 = await ExecuteAsync(kernel, "First run", "What's the tallest building in New York?"); diff --git a/dotnet/samples/Concepts/Concepts.csproj b/dotnet/samples/Concepts/Concepts.csproj index 5345cdface..9633d7893f 100644 --- a/dotnet/samples/Concepts/Concepts.csproj +++ b/dotnet/samples/Concepts/Concepts.csproj @@ -9,7 +9,7 @@ true $(NoWarn);CS8618,IDE0009,IDE1006,CA1051,CA1050,CA1707,CA1054,CA2007,VSTHRD111,CS1591,RCS1110,RCS1243,CA5394,SKEXP0001,SKEXP0010,SKEXP0020,SKEXP0040,SKEXP0050,SKEXP0060,SKEXP0101,SKEXP0110,OPENAI001,CA1724,IDE1006,IDE0009,MEVD9000 - + true Library 5ee045b0-aea3-4f08-8d31-32d1a6f8fed0 @@ -52,7 +52,7 @@ - + diff --git a/dotnet/samples/Demos/VectorStoreRAG/Options/ApplicationConfig.cs b/dotnet/samples/Demos/VectorStoreRAG/Options/ApplicationConfig.cs index 1090200f25..3b9658419e 100644 --- a/dotnet/samples/Demos/VectorStoreRAG/Options/ApplicationConfig.cs +++ b/dotnet/samples/Demos/VectorStoreRAG/Options/ApplicationConfig.cs @@ -15,7 +15,7 @@ internal sealed class ApplicationConfig private readonly OpenAIEmbeddingsConfig _openAIEmbeddingsConfig = new(); private readonly RagConfig _ragConfig = new(); private readonly AzureAISearchConfig _azureAISearchConfig = new(); - private readonly CosmosConfig _cosmosMongoConfig = new(); + private readonly CosmosConfig _azureDocumentDBConfig = new(); private readonly CosmosConfig _cosmosNoSqlConfig = new(); private readonly QdrantConfig _qdrantConfig = new(); private readonly RedisConfig _redisConfig = new(); @@ -43,8 +43,8 @@ internal sealed class ApplicationConfig .GetRequiredSection($"VectorStores:{AzureAISearchConfig.ConfigSectionName}") .Bind(this._azureAISearchConfig); configurationManager - .GetRequiredSection($"VectorStores:{CosmosConfig.MongoConfigSectionName}") - .Bind(this._cosmosMongoConfig); + .GetRequiredSection($"VectorStores:{CosmosConfig.DocumentDBConfigSectionName}") + .Bind(this._azureDocumentDBConfig); configurationManager .GetRequiredSection($"VectorStores:{CosmosConfig.NoSqlConfigSectionName}") .Bind(this._cosmosNoSqlConfig); @@ -71,7 +71,7 @@ internal sealed class ApplicationConfig public AzureAISearchConfig AzureAISearchConfig => this._azureAISearchConfig; - public CosmosConfig CosmosMongoConfig => this._cosmosMongoConfig; + public CosmosConfig AzureDocumentDBConfig => this._azureDocumentDBConfig; public CosmosConfig CosmosNoSqlConfig => this._cosmosNoSqlConfig; diff --git a/dotnet/samples/Demos/VectorStoreRAG/Options/CosmosConfig.cs b/dotnet/samples/Demos/VectorStoreRAG/Options/CosmosConfig.cs index 2abe9ee2d1..8b128f8b35 100644 --- a/dotnet/samples/Demos/VectorStoreRAG/Options/CosmosConfig.cs +++ b/dotnet/samples/Demos/VectorStoreRAG/Options/CosmosConfig.cs @@ -5,11 +5,11 @@ using System.ComponentModel.DataAnnotations; namespace VectorStoreRAG.Options; /// -/// Azure CosmosDB service settings for use with CosmosMongo and CosmosNoSql. +/// Azure DocumentDB and Azure Cosmos DB service settings. /// internal sealed class CosmosConfig { - public const string MongoConfigSectionName = "CosmosMongoDB"; + public const string DocumentDBConfigSectionName = "AzureDocumentDB"; public const string NoSqlConfigSectionName = "CosmosNoSql"; [Required] diff --git a/dotnet/samples/Demos/VectorStoreRAG/Program.cs b/dotnet/samples/Demos/VectorStoreRAG/Program.cs index ff3b2e934e..e7382eb9e7 100644 --- a/dotnet/samples/Demos/VectorStoreRAG/Program.cs +++ b/dotnet/samples/Demos/VectorStoreRAG/Program.cs @@ -76,14 +76,14 @@ switch (appConfig.RagConfig.VectorStoreType) new Uri(appConfig.AzureAISearchConfig.Endpoint), new AzureKeyCredential(appConfig.AzureAISearchConfig.ApiKey)); break; - case "CosmosMongoDB": - kernelBuilder.Services.AddCosmosMongoCollection>( + case "AzureDocumentDB": + kernelBuilder.Services.AddDocumentDBCollection>( appConfig.RagConfig.CollectionName, - appConfig.CosmosMongoConfig.ConnectionString, - appConfig.CosmosMongoConfig.DatabaseName); + appConfig.AzureDocumentDBConfig.ConnectionString, + appConfig.AzureDocumentDBConfig.DatabaseName); break; case "CosmosNoSql": - kernelBuilder.Services.AddCosmosNoSqlCollection>( + kernelBuilder.Services.AddCosmosCollection>( appConfig.RagConfig.CollectionName, appConfig.CosmosNoSqlConfig.ConnectionString, appConfig.CosmosNoSqlConfig.DatabaseName); @@ -120,7 +120,7 @@ switch (appConfig.RagConfig.VectorStoreType) switch (appConfig.RagConfig.VectorStoreType) { case "AzureAISearch": - case "CosmosMongoDB": + case "AzureDocumentDB": case "CosmosNoSql": case "InMemory": case "Redis": diff --git a/dotnet/samples/Demos/VectorStoreRAG/README.md b/dotnet/samples/Demos/VectorStoreRAG/README.md index 80cc2f0f56..95f4b19093 100644 --- a/dotnet/samples/Demos/VectorStoreRAG/README.md +++ b/dotnet/samples/Demos/VectorStoreRAG/README.md @@ -9,7 +9,7 @@ The sample can be configured in various ways: 1. You can choose your preferred vector store by setting the `Rag:VectorStoreType` configuration setting in the `appsettings.json` file to one of the following values: 1. AzureAISearch - 1. CosmosMongoDB + 1. AzureDocumentDB 1. CosmosNoSql 1. InMemory 1. Qdrant @@ -110,14 +110,14 @@ dotnet user-secrets set "VectorStores:AzureAISearch:Endpoint" "https://" ``` -### Azure CosmosDB MongoDB +### Azure DocumentDB -If you want to use Azure CosmosDB MongoDB as your vector store, you will need to create an instance of Azure CosmosDB MongoDB and add +If you want to use Azure DocumentDB as your vector store, you will need to create an Azure DocumentDB instance and add the following secrets here: ```cli -dotnet user-secrets set "VectorStores:CosmosMongoDB:ConnectionString" "" -dotnet user-secrets set "VectorStores:CosmosMongoDB:DatabaseName" "" +dotnet user-secrets set "VectorStores:AzureDocumentDB:ConnectionString" "" +dotnet user-secrets set "VectorStores:AzureDocumentDB:DatabaseName" "" ``` ### Azure CosmosDB NoSQL diff --git a/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj b/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj index e4640a13f8..6e9d9f62fc 100644 --- a/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj +++ b/dotnet/samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj @@ -6,7 +6,7 @@ enable enable $(NoWarn);SKEXP0001;SKEXP0010 - + true c4203b00-7179-47c1-8701-ee352e381412 @@ -18,8 +18,8 @@ - - + + diff --git a/dotnet/samples/Demos/VectorStoreRAG/appsettings.json b/dotnet/samples/Demos/VectorStoreRAG/appsettings.json index aa10a42eba..8ba1a69521 100644 --- a/dotnet/samples/Demos/VectorStoreRAG/appsettings.json +++ b/dotnet/samples/Demos/VectorStoreRAG/appsettings.json @@ -29,7 +29,7 @@ "Endpoint": "", "ApiKey": "" }, - "CosmosMongoDB": { + "AzureDocumentDB": { "ConnectionString": "", "DatabaseName": "" }, diff --git a/dotnet/src/InternalUtilities/samples/InternalUtilities/TestConfiguration.cs b/dotnet/src/InternalUtilities/samples/InternalUtilities/TestConfiguration.cs index 2918cc97d3..e64e97904a 100644 --- a/dotnet/src/InternalUtilities/samples/InternalUtilities/TestConfiguration.cs +++ b/dotnet/src/InternalUtilities/samples/InternalUtilities/TestConfiguration.cs @@ -48,7 +48,7 @@ public sealed class TestConfiguration public static MistralAIConfig MistralAI => LoadSection(); public static GoogleAIConfig GoogleAI => LoadSection(); public static VertexAIConfig VertexAI => LoadSection(); - public static CosmosMongoConfig CosmosMongo => LoadSection(); + public static AzureDocumentDbConfig AzureDocumentDb => LoadSection(); public static ApplicationInsightsConfig ApplicationInsights => LoadSection(); public static CrewAIConfig CrewAI => LoadSection(); public static BedrockConfig Bedrock => LoadSection(); @@ -278,7 +278,7 @@ public sealed class TestConfiguration public string Endpoint { get; set; } = "http://localhost:11434"; } - public class CosmosMongoConfig + public class AzureDocumentDbConfig { public string ConnectionString { get; set; } public string DatabaseName { get; set; } diff --git a/dotnet/src/VectorData/CosmosMongoDB/README.md b/dotnet/src/VectorData/CosmosMongoDB/README.md index 4249572f0c..7ee56dd591 100644 --- a/dotnet/src/VectorData/CosmosMongoDB/README.md +++ b/dotnet/src/VectorData/CosmosMongoDB/README.md @@ -1 +1 @@ -The code for Microsoft.SemanticKernel.Connectors.CosmosMongoDB can now be found in the [CommunityToolkit/AI repository](https://github.com/CommunityToolkit/AI/tree/main/MEVD/src/CosmosMongoDB) +The code for Microsoft.SemanticKernel.Connectors.CosmosMongoDB can now be found in the [CommunityToolkit/AI repository](https://github.com/CommunityToolkit/AI/tree/main/MEVD/src/AzureDocumentDB) diff --git a/dotnet/src/VectorData/CosmosNoSql/README.md b/dotnet/src/VectorData/CosmosNoSql/README.md index dbca4ed223..1189e11446 100644 --- a/dotnet/src/VectorData/CosmosNoSql/README.md +++ b/dotnet/src/VectorData/CosmosNoSql/README.md @@ -1 +1 @@ -The code for Microsoft.SemanticKernel.Connectors.CosmosNoSql can now be found in the [CommunityToolkit/AI repository](https://github.com/CommunityToolkit/AI/tree/main/MEVD/src/CosmosNoSql) +The code for Microsoft.SemanticKernel.Connectors.CosmosNoSql can now be found in the [CommunityToolkit/AI repository](https://github.com/CommunityToolkit/AI/tree/main/MEVD/src/AzureCosmosDB)