Skip to content

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 18 Oct 14:13
· 2 commits to master since this release
07e5a4e

Added

  • Decisions are now a capability of every provider, not a separate provider family: any chat-capable provider that declares no native decisions surface answers IDecisionProvider.DecideAsync through a read-out over its own chat surface — one chat turn per question, the option tokens' logprobs read from the response, with distinct token variants of one option combined and a repeated token counted once, then renormalised with softmax. IDecisionProvider.DecisionSource and the new EDecisionSource enum report the mechanism (Readout or Native), and the model-override decorators forward it, so is IDecisionProvider and DecisionSource stay accurate after decoration; decorator selection also keeps is IEmbeddingProvider honest in both directions — an embedding-capable provider keeps that capability after decoration, and a provider without an embeddings surface is never wrapped in a decorator that claims one
  • ChatCompletionRequest.Logprobs / TopLogprobs and ChatCompletionResponse.Logprobs expose token log probabilities, with the new ChatContentLogprobs, ChatTokenLogprob, and ChatTopLogprob models. Mapped on the OpenAICompatible/HybridGateway and KeyQuery wires; a protocol whose API carries no logprob field leaves the block null rather than inventing a distribution
  • Read-out configuration on AIProviderOptions: DecisionReadoutEnabled (default true; false restores the ai/decision-not-supported refusal), DecisionReadoutPromptTemplate (placeholders {state}, {instructions}, {options}), DecisionReadoutOptionTokenStyle (uppercaseLetter, lowercaseLetter, levelIndex), DecisionReadoutTopLogprobs (default 20, also the read-out's option ceiling), DecisionReadoutBoolTokens (default yes,no), DecisionReadoutTemperature (default 0), and DecisionsMaxOptions (a declared Choice-option ceiling for both transports). Each is also seedable from a definition's protocolConfiguration, and both ceilings refuse with ai/configuration-error before any request leaves the process
  • Two error codes for a read-out that cannot produce a distribution: ai/decision-readout-unavailable (the chat response carried no logprobs block) and ai/decision-readout-unreadable (none of the declared option tokens appeared among the reported alternatives)
  • EProviderProtocol.DecisionReadout (JSON "decisionReadout") as an endpoints["decisions"] override that explicitly declares the read-out on a chat-capable root; a DecisionReadout entry on a root with no chat surface is rejected at registration
  • AIProviderServiceCollectionExtensions.SeedFromDefinition(AIProviderOptions, ProviderDefinition) is now public, so a provider registered through AddProvider<TProvider> gets the same definition seeding as a built-in protocol — base URL, endpoint paths, requiresApiKey, the read-out members, and protocolConfiguration. A Native-id provider is skipped by the automatic registration loop, so its own factory is the only place the definition can be applied

Changed

  • Decision support is a default capability of AIProviderBase: SupportsDecisions and DecideAsync are virtual members whose default body is the chat read-out, while DecisionProvider and OpenAICompatibleDecisionProvider override them and report EDecisionSource.Native. A consumer that read is IDecisionProvider as "this is a decision model" now gets true for every chat-capable provider — check DecisionSource or SupportsDecisions instead. Only a Decision-rooted provider still refuses ChatAsync with ai/chat-not-supported, and a chat-capable provider no longer refuses decisions for lack of a decisions declaration
  • A loopback base URL may now use plain http: request pre-flight and endpoints validation accept http://localhost, http://127.0.0.1, and http://[::1], while routable hosts still require HTTPS
  • API-key requirements resolve in three layers: AIProviderOptions.RequiresApiKey, then ProviderDefinition.RequiresApiKey (new JSON field requiresApiKey), then a value derived from the configured address — a loopback host requires none. IAIProvider.RequiresApiKey exposes the effective value without a cast, and the per-call check re-derives it from an overridden address

Full Changelog: v1.2.0...v1.3.0