Skip to content

Release v7.74.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 20:24
efea5cf

Summary

Cratis.AI no longer appends metering readings to your application's event log. Each decision-engine call and each provider usage refresh used to append an event. In a busy application that was thousands of events a day that were not domain facts. Usage is now reported as OpenTelemetry metrics instead.

Changed

  • A decision call no longer appends DecisionUsageRecorded, and a provider usage refresh no longer appends AIProviderUsageSnapshotRecorded. Decision usage is reported on the Cratis.AI.Decisions meter: the counters cratis.ai.decision.input_tokens, cratis.ai.decision.output_tokens, cratis.ai.decision.calls, cratis.ai.decision.decisions and cratis.ai.decision.choices, tagged decision.engine, model and topic. Provider usage is reported on the Cratis.AI.Providers.UsageReporting meter as the gauge cratis.ai.provider.consumed_tokens, tagged provider and availability. Add both meters to your OpenTelemetry setup to collect them. (#651)
  • AllAIProviderUsageSnapshots keeps its name and result shape. It is now served from the in-process usage cache and only returns the providers configured in the current namespace. After a restart it is empty until each provider's usage is refreshed again.
  • DecisionUsageForLastThirtyDays no longer receives new data, because nothing appends DecisionUsageRecorded any more.
  • The constructors of ProviderUsageLevels and DecisionUsageRecorder no longer take ICommandPipeline, and IRecentUsageSnapshots has a new Observe() member. This only matters if you construct these types or implement the interface yourself.
  • Cratis.AI now depends on Cratis.Fundamentals 7.25.1 (was 7.19.4).

Deprecated

  • RecordDecisionUsage, DecisionUsageRecorded, DecisionUsageByDay, RecordAIProviderUsageSnapshot and AIProviderUsageSnapshotRecorded are obsolete. They remain so existing event stores still replay, and are removed in the next major release (part of #767).