Repository navigation
v1.3.0
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.DecideAsyncthrough 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.DecisionSourceand the newEDecisionSourceenum report the mechanism (ReadoutorNative), and the model-override decorators forward it, sois IDecisionProviderandDecisionSourcestay accurate after decoration; decorator selection also keepsis IEmbeddingProviderhonest 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/TopLogprobsandChatCompletionResponse.Logprobsexpose token log probabilities, with the newChatContentLogprobs,ChatTokenLogprob, andChatTopLogprobmodels. Mapped on theOpenAICompatible/HybridGatewayandKeyQuerywires; a protocol whose API carries no logprob field leaves the block null rather than inventing a distribution- Read-out configuration on
AIProviderOptions:DecisionReadoutEnabled(defaulttrue;falserestores theai/decision-not-supportedrefusal),DecisionReadoutPromptTemplate(placeholders{state},{instructions},{options}),DecisionReadoutOptionTokenStyle(uppercaseLetter,lowercaseLetter,levelIndex),DecisionReadoutTopLogprobs(default 20, also the read-out's option ceiling),DecisionReadoutBoolTokens(defaultyes,no),DecisionReadoutTemperature(default 0), andDecisionsMaxOptions(a declared Choice-option ceiling for both transports). Each is also seedable from a definition'sprotocolConfiguration, and both ceilings refuse withai/configuration-errorbefore 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) andai/decision-readout-unreadable(none of the declared option tokens appeared among the reported alternatives) EProviderProtocol.DecisionReadout(JSON"decisionReadout") as anendpoints["decisions"]override that explicitly declares the read-out on a chat-capable root; aDecisionReadoutentry on a root with no chat surface is rejected at registrationAIProviderServiceCollectionExtensions.SeedFromDefinition(AIProviderOptions, ProviderDefinition)is now public, so a provider registered throughAddProvider<TProvider>gets the same definition seeding as a built-in protocol — base URL, endpoint paths,requiresApiKey, the read-out members, andprotocolConfiguration. ANative-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:SupportsDecisionsandDecideAsyncare virtual members whose default body is the chat read-out, whileDecisionProviderandOpenAICompatibleDecisionProvideroverride them and reportEDecisionSource.Native. A consumer that readis IDecisionProvideras "this is a decision model" now getstruefor every chat-capable provider — checkDecisionSourceorSupportsDecisionsinstead. Only aDecision-rooted provider still refusesChatAsyncwithai/chat-not-supported, and a chat-capable provider no longer refuses decisions for lack of adecisionsdeclaration - A loopback base URL may now use plain
http: request pre-flight andendpointsvalidation accepthttp://localhost,http://127.0.0.1, andhttp://[::1], while routable hosts still require HTTPS - API-key requirements resolve in three layers:
AIProviderOptions.RequiresApiKey, thenProviderDefinition.RequiresApiKey(new JSON fieldrequiresApiKey), then a value derived from the configured address — a loopback host requires none.IAIProvider.RequiresApiKeyexposes 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