[Embedding V0] New Microsoft.Azure.Cosmos.AI package ΓÇö scaffold
Part of: #5830 (V0 embedding generation).
Background
The concrete embedding provider implementation (Azure OpenAI / Foundry) ships as a separate optional package, analogous to Microsoft.Azure.Cosmos.Encryption. This keeps the core SDK free of Azure AI SDK dependencies for the vast majority of customers who are not using vector search.
- Core SDK:
Microsoft.Azure.Cosmos ΓÇö defines IEmbeddingGenerator interface only.
- Provider package:
Microsoft.Azure.Cosmos.AI ΓÇö ships AzureOpenAIEmbeddingGenerator (and any future providers).
Scope
Scaffold the new project structure (no business logic yet ΓÇö that is in the next sub-issue):
Microsoft.Azure.Cosmos.AI/
Directory.Build.props # versioning (CosmosAIOfficialVersion, CosmosAIPreviewVersion)
src/
Microsoft.Azure.Cosmos.AI.csproj
AssemblyInfo.cs
tests/
Microsoft.Azure.Cosmos.AI.Tests/
Microsoft.Azure.Cosmos.AI.Tests.csproj
csproj requirements
- Target frameworks:
net8.0;netstandard2.0 (mirror what core SDK targets for broad compatibility).
- PackageId:
Microsoft.Azure.Cosmos.AI
- NuGet dependencies:
Microsoft.Azure.Cosmos (project reference when SdkProjectRef=True, otherwise NuGet pin)
Azure.AI.OpenAI (the Azure OpenAI client SDK)
Azure.Core (for TokenCredential)
- Strong-name signing: use the same
35MSSharedLib1024.snk as the core SDK.
- Follow the exact same
SdkProjectRef / IsPreview conditional-reference pattern as Microsoft.Azure.Cosmos.Encryption.csproj.
Solution file
Add the new src and tests projects to Microsoft.Azure.Cosmos.sln.
Directory.Build.props
Add version properties alongside Encryption's entries:
<CosmosAIOfficialVersion>1.0.0</CosmosAIOfficialVersion>
<CosmosAIPreviewVersion>1.0.0</CosmosAIPreviewVersion>
<CosmosAIPreviewSuffixVersion>preview.0</CosmosAIPreviewSuffixVersion>
Acceptance criteria
dotnet build Microsoft.Azure.Cosmos.AI/src/Microsoft.Azure.Cosmos.AI.csproj succeeds with zero warnings.
- Test project (
dotnet test) runs zero tests (empty) but exits cleanly.
SdkProjectRef=True project reference path works.
- Package metadata (description, tags, license, icon) is correct.
Files likely touched
Microsoft.Azure.Cosmos.AI/ (new folder tree)
Microsoft.Azure.Cosmos.sln (new project entries)
Directory.Build.props (version properties)
Dependencies
[Embedding V0] New
Microsoft.Azure.Cosmos.AIpackage ΓÇö scaffoldPart of: #5830 (V0 embedding generation).
Background
The concrete embedding provider implementation (Azure OpenAI / Foundry) ships as a separate optional package, analogous to
Microsoft.Azure.Cosmos.Encryption. This keeps the core SDK free of Azure AI SDK dependencies for the vast majority of customers who are not using vector search.Microsoft.Azure.CosmosΓÇö definesIEmbeddingGeneratorinterface only.Microsoft.Azure.Cosmos.AIΓÇö shipsAzureOpenAIEmbeddingGenerator(and any future providers).Scope
Scaffold the new project structure (no business logic yet ΓÇö that is in the next sub-issue):
csproj requirements
net8.0;netstandard2.0(mirror what core SDK targets for broad compatibility).Microsoft.Azure.Cosmos.AIMicrosoft.Azure.Cosmos(project reference whenSdkProjectRef=True, otherwise NuGet pin)Azure.AI.OpenAI(the Azure OpenAI client SDK)Azure.Core(forTokenCredential)35MSSharedLib1024.snkas the core SDK.SdkProjectRef/IsPreviewconditional-reference pattern asMicrosoft.Azure.Cosmos.Encryption.csproj.Solution file
Add the new
srcandtestsprojects toMicrosoft.Azure.Cosmos.sln.Directory.Build.props
Add version properties alongside Encryption's entries:
Acceptance criteria
dotnet build Microsoft.Azure.Cosmos.AI/src/Microsoft.Azure.Cosmos.AI.csprojsucceeds with zero warnings.dotnet test) runs zero tests (empty) but exits cleanly.SdkProjectRef=Trueproject reference path works.Files likely touched
Microsoft.Azure.Cosmos.AI/(new folder tree)Microsoft.Azure.Cosmos.sln(new project entries)Directory.Build.props(version properties)Dependencies
IEmbeddingGeneratorto be defined in the core SDK.