Repository navigation
v1.1.0
Added
- Optional embeddings capability via
IEmbeddingProviderwith OpenAI-compatible/embeddingswire mapping, separateDefaultEmbeddingModelconfiguration, and dedicated error codes (ai/embedding-failed,ai/embedding-model-not-configured) - Per-request (runtime) credential and model resolution: the
RequestCredentialsrecord (key-maskedToString) and theICredentialResolverhook let a consumer supply an API key, base URL, and model per call — across chat, streaming, model discovery, and embeddings — without rebuilding the DI graph or leaving the singleton provider behind. Resolution priority isGetProvideroverrides >ICredentialResolver> configured options IAIProviderFactory.GetProvider(providerId, RequestCredentials overrides)returns a transient provider bound to the supplied overrides; the shared singleton resolved byGetProvider(providerId)is never mutated. A provider id that has model-override entries is decorated, and the decorator exposes no embeddings through either overloadAddAiProviders(b => b.UseCredentialResolver(resolver))registers a consumer-suppliedICredentialResolver(the library ships no default implementation)
Changed
AIProviderOptions.DefaultModelis now applied at runtime as the fallback model when a request carries no model and no per-call override supplies one; it was previously inert. An empty effective chat model now throwsAiExceptionwithai/invalid-request- Provider configuration is validated against the effective values (per-call override combined with configured options) before the model is resolved, so a provider configured with an empty API key or base URL completes a call once an override supplies the missing value, still fails when nothing does, and keeps reporting the actionable configuration error when the request also carries no model
IAIProviderFactorygains theGetProvider(providerId, RequestCredentials)member — a breaking change for consumers who implementIAIProviderFactorythemselves, who must now also implement the new overload
Full Changelog: v1.0.0...v1.1.0