Update CommunityToolkit VectorData package names (#14333)

### 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

<!-- Before submitting this PR, please make sure: -->

- [ ] 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 😄

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: adamsitnik <[email protected]>
Co-authored-by: Adam Sitnik <[email protected]>
This commit is contained in:
Copilot
2026-08-26 15:47:02 +00:00
committed by GitHub
co-authored by adamsitnik Adam Sitnik
parent 6eab62d273
commit abf10dd6ea
12 changed files with 35 additions and 35 deletions
+2 -2
View File
@@ -187,8 +187,8 @@
<PackageVersion Include="Testcontainers.MongoDB" Version="4.14.0" />
<!-- VectorData Dependencies -->
<PackageVersion Include="CommunityToolkit.VectorData.AzureAISearch" Version="1.0.0" />
<PackageVersion Include="CommunityToolkit.VectorData.CosmosMongoDB" Version="1.0.0" />
<PackageVersion Include="CommunityToolkit.VectorData.CosmosNoSql" Version="1.0.0" />
<PackageVersion Include="CommunityToolkit.VectorData.AzureDocumentDB" Version="1.0.0" />
<PackageVersion Include="CommunityToolkit.VectorData.AzureCosmosDB" Version="1.0.0" />
<PackageVersion Include="CommunityToolkit.VectorData.InMemory" Version="1.0.1" />
<PackageVersion Include="CommunityToolkit.VectorData.PgVector" Version="1.0.0" />
<PackageVersion Include="CommunityToolkit.VectorData.Qdrant" Version="1.0.0" />
@@ -77,18 +77,18 @@ public class SemanticCachingWithFilters(ITestOutputHelper output) : BaseTest(out
}
/// <summary>
/// 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
/// </summary>
[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?");
+2 -2
View File
@@ -9,7 +9,7 @@
<IsTestProject>true</IsTestProject>
<!-- Suppress: "Declare types in namespaces", "Require ConfigureAwait", "Experimental" -->
<NoWarn>$(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</NoWarn>
<!-- CommunityToolkit.VectorData.CosmosNoSql pulls Microsoft.Azure.Cosmos which added a mandatory Newtonsoft.Json explicit-reference check; disable it since we don't use Newtonsoft.Json directly -->
<!-- CommunityToolkit.VectorData.AzureCosmosDB pulls Microsoft.Azure.Cosmos which added a mandatory Newtonsoft.Json explicit-reference check; disable it since we don't use Newtonsoft.Json directly -->
<AzureCosmosDisableNewtonsoftJsonCheck>true</AzureCosmosDisableNewtonsoftJsonCheck>
<OutputType>Library</OutputType>
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
@@ -52,7 +52,7 @@
<PackageReference Include="AWSSDK.SecurityToken" />
<PackageReference Include="Grpc.Net.ClientFactory" />
<PackageReference Include="CommunityToolkit.VectorData.AzureAISearch" />
<PackageReference Include="CommunityToolkit.VectorData.CosmosMongoDB" />
<PackageReference Include="CommunityToolkit.VectorData.AzureDocumentDB" />
<PackageReference Include="CommunityToolkit.VectorData.InMemory" />
<PackageReference Include="CommunityToolkit.VectorData.Qdrant" />
<PackageReference Include="CommunityToolkit.VectorData.PgVector" />
@@ -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;
@@ -5,11 +5,11 @@ using System.ComponentModel.DataAnnotations;
namespace VectorStoreRAG.Options;
/// <summary>
/// Azure CosmosDB service settings for use with CosmosMongo and CosmosNoSql.
/// Azure DocumentDB and Azure Cosmos DB service settings.
/// </summary>
internal sealed class CosmosConfig
{
public const string MongoConfigSectionName = "CosmosMongoDB";
public const string DocumentDBConfigSectionName = "AzureDocumentDB";
public const string NoSqlConfigSectionName = "CosmosNoSql";
[Required]
@@ -76,14 +76,14 @@ switch (appConfig.RagConfig.VectorStoreType)
new Uri(appConfig.AzureAISearchConfig.Endpoint),
new AzureKeyCredential(appConfig.AzureAISearchConfig.ApiKey));
break;
case "CosmosMongoDB":
kernelBuilder.Services.AddCosmosMongoCollection<TextSnippet<string>>(
case "AzureDocumentDB":
kernelBuilder.Services.AddDocumentDBCollection<TextSnippet<string>>(
appConfig.RagConfig.CollectionName,
appConfig.CosmosMongoConfig.ConnectionString,
appConfig.CosmosMongoConfig.DatabaseName);
appConfig.AzureDocumentDBConfig.ConnectionString,
appConfig.AzureDocumentDBConfig.DatabaseName);
break;
case "CosmosNoSql":
kernelBuilder.Services.AddCosmosNoSqlCollection<string, TextSnippet<string>>(
kernelBuilder.Services.AddCosmosCollection<string, TextSnippet<string>>(
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":
@@ -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://<yourserv
dotnet user-secrets set "VectorStores:AzureAISearch:ApiKey" "<yoursecret>"
```
### 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" "<yourconnectionstring>"
dotnet user-secrets set "VectorStores:CosmosMongoDB:DatabaseName" "<yourdbname>"
dotnet user-secrets set "VectorStores:AzureDocumentDB:ConnectionString" "<yourconnectionstring>"
dotnet user-secrets set "VectorStores:AzureDocumentDB:DatabaseName" "<yourdbname>"
```
### Azure CosmosDB NoSQL
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0010</NoWarn>
<!-- CommunityToolkit.VectorData.CosmosNoSql pulls Microsoft.Azure.Cosmos which added a mandatory Newtonsoft.Json explicit-reference check; disable it since we don't use Newtonsoft.Json directly -->
<!-- CommunityToolkit.VectorData.AzureCosmosDB pulls Microsoft.Azure.Cosmos which added a mandatory Newtonsoft.Json explicit-reference check; disable it since we don't use Newtonsoft.Json directly -->
<AzureCosmosDisableNewtonsoftJsonCheck>true</AzureCosmosDisableNewtonsoftJsonCheck>
<UserSecretsId>c4203b00-7179-47c1-8701-ee352e381412</UserSecretsId>
</PropertyGroup>
@@ -18,8 +18,8 @@
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" />
<PackageReference Include="PdfPig" />
<PackageReference Include="CommunityToolkit.VectorData.AzureAISearch" />
<PackageReference Include="CommunityToolkit.VectorData.CosmosMongoDB" />
<PackageReference Include="CommunityToolkit.VectorData.CosmosNoSql" />
<PackageReference Include="CommunityToolkit.VectorData.AzureDocumentDB" />
<PackageReference Include="CommunityToolkit.VectorData.AzureCosmosDB" />
<PackageReference Include="CommunityToolkit.VectorData.InMemory" />
<PackageReference Include="CommunityToolkit.VectorData.Qdrant" />
<PackageReference Include="CommunityToolkit.VectorData.Redis" />
@@ -29,7 +29,7 @@
"Endpoint": "",
"ApiKey": ""
},
"CosmosMongoDB": {
"AzureDocumentDB": {
"ConnectionString": "",
"DatabaseName": ""
},
@@ -48,7 +48,7 @@ public sealed class TestConfiguration
public static MistralAIConfig MistralAI => LoadSection<MistralAIConfig>();
public static GoogleAIConfig GoogleAI => LoadSection<GoogleAIConfig>();
public static VertexAIConfig VertexAI => LoadSection<VertexAIConfig>();
public static CosmosMongoConfig CosmosMongo => LoadSection<CosmosMongoConfig>();
public static AzureDocumentDbConfig AzureDocumentDb => LoadSection<AzureDocumentDbConfig>();
public static ApplicationInsightsConfig ApplicationInsights => LoadSection<ApplicationInsightsConfig>();
public static CrewAIConfig CrewAI => LoadSection<CrewAIConfig>();
public static BedrockConfig Bedrock => LoadSection<BedrockConfig>();
@@ -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; }
@@ -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)
+1 -1
View File
@@ -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)