Skip to content

[Embedding V0] New Microsoft.Azure.Cosmos.Embedding package — scaffold #5841

@ananth7592

Description

@ananth7592

[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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions