ITADN

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

#5841Openananth7592 创建于 2026-05-06
needs-investigation
A
ananth7592commented
# [Embedding V0] New `Microsoft.Azure.Cosmos.Embedding` 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.Embedding` — 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.Embedding/ Directory.Build.props # versioning (EmbeddingOfficialVersion, EmbeddingPreviewVersion) src/ Microsoft.Azure.Cosmos.Embedding.csproj AssemblyInfo.cs tests/ Microsoft.Azure.Cosmos.Embedding.Tests/ Microsoft.Azure.Cosmos.Embedding.Tests.csproj ``` ### csproj requirements - **Target frameworks**: `net8.0;netstandard2.0` (mirror what core SDK targets for broad compatibility). - **PackageId**: `Microsoft.Azure.Cosmos.Embedding` - **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: ```xml <EmbeddingOfficialVersion>1.0.0</EmbeddingOfficialVersion> <EmbeddingPreviewVersion>1.0.0</EmbeddingPreviewVersion> <EmbeddingPreviewSuffixVersion>preview.0</EmbeddingPreviewSuffixVersion> ``` ## Acceptance criteria - `dotnet build Microsoft.Azure.Cosmos.Embedding/src/Microsoft.Azure.Cosmos.Embedding.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.Embedding/` (new folder tree) - `Microsoft.Azure.Cosmos.sln` (new project entries) - `Directory.Build.props` (version properties) ## Dependencies - #5831 — needs `IEmbeddingGenerator` to be defined in the core SDK.
0 条评论