This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.
C# SDK for the Voyage AI embedding and reranking API, auto-generated from the Voyage AI OpenAPI specification using AutoSDK. Published as a NuGet package under the tryAGI organization.
# Build the solution
dotnet build VoyageAI.slnx
# Build for release (also produces NuGet package)
dotnet build VoyageAI.slnx -c Release
# Run integration tests (requires VOYAGEAI_API_KEY env var)
dotnet test src/tests/VoyageAI.IntegrationTests/VoyageAI.IntegrationTests.csproj
# Regenerate SDK from OpenAPI spec
cd src/libs/VoyageAI && ./generate.shThe SDK code is entirely auto-generated -- do not manually edit files in src/libs/VoyageAI/Generated/.
src/libs/VoyageAI/openapi.yaml-- the Voyage AI OpenAPI spec (fetched fromhttps://raw.githubusercontent.com/voyage-ai/openapi/main/voyage-openapi.yml)src/helpers/FixOpenApiSpec/-- converts OpenAPI 3.1 to 3.0 format for compatibilitysrc/libs/VoyageAI/generate.sh-- orchestrates: download spec, fix spec, run AutoSDK CLI, output toGenerated/- CI auto-updates the spec and creates PRs if changes are detected
| Path | Purpose |
|---|---|
Extensions/VoyageAIClient.EmbeddingGenerator.cs |
MEAI IEmbeddingGenerator<string, Embedding<float>> implementation |
Extensions/MultimodalInput.cs |
Typed helpers for multimodal embeddings (text + image inputs) |
Extensions/RateLimitRetryHandler.cs |
HTTP 429 retry with exponential backoff |
| Project | Purpose |
|---|---|
src/libs/VoyageAI/ |
Main SDK library (VoyageAIClient) |
src/tests/VoyageAI.IntegrationTests/ |
Integration tests against real Voyage AI API |
src/helpers/FixOpenApiSpec/ |
OpenAPI spec fixer tool |
src/helpers/GenerateDocs/ |
Documentation generator from integration tests |
src/helpers/TrimmingHelper/ |
NativeAOT/trimming compatibility validator |
- Target:
net10.0(single target) - Language: C# preview with nullable reference types
- Signing: Strong-named assemblies via
src/key.snk - Versioning: Semantic versioning from git tags (
vprefix) via MinVer - Analysis: All .NET analyzers enabled, AOT/trimming compatibility enforced
- Testing: MSTest + FluentAssertions
- Uses shared workflows from
HavenDV/workflowsrepo - Dependabot updates NuGet packages weekly (auto-merged)
- Documentation deployed to GitHub Pages via MkDocs Material