Codeunit 7786 Copilot Quota Impl.

System Application, System.AI

Source AL, 123 lines

src/System Application/App/AI/src/Copilot/Consumption and Billing/CopilotQuotaImpl.Codeunit.allines 9 to 24 of 123, Copyright (c) Microsoft Corporation. MIT

codeunit 7786 "Copilot Quota Impl."{    Access = Internal;    InherentEntitlements = X;    InherentPermissions = X;    var        CopilotCapabilityImpl: Codeunit "Copilot Capability Impl";        InvalidUsageTypeErr: Label 'The value "%1" is not a valid Copilot Quota Usage Type.', Comment = '%1=a value such as "AI response" or "5"';        CapabilityNotRegisteredTelemetryMsg: Label 'Capability "%1" is not registered in the system but is logging usage.', Locked = true;        LoggingUsageTelemetryMsg: Label 'Capability "%1" is logging %2 usage of type %3, excluded from billing: %4.', Locked = true;    trigger OnRun()    var        ALCopilotFunctions: DotNet ALCopilotFunctions;        ALCopilotQuotaDetails: Dotnet ALCopilotQuotaDetails;

All 123 lines

Public procedures 4 in 29

CanConsume(): Booleannew in 26
LogQuotaUsage(CopilotCapability: Enum "Copilot Capability"; Usage: Integer; CopilotQuotaUsageType: Enum "Copilot Quota Usage Type"; CallerModuleInfo: ModuleInfo)new in 26
IsAgentUserAIConsumptionLogged(UniqueID: Text[1024]): Booleannew in 27
LogAgentUserAIConsumption(CopilotCapability: Enum "Copilot Capability"; Usage: Integer; CopilotQuotaUsageType: Enum "Copilot Quota Usage Type"; CallerModuleInfo: ModuleInfo; AgentTaskID: BigInteger; ActionsCharged: Text[1024]; Description: Text; UniqueID: Text[1024]; ExcludeFromBilling: Boolean)new in 28

All 5 procedures in 26-29

Changes 2 in 28

List17181920212223242526272829
Procedures22
LogAgentUserAIConsumption(CopilotCapability: Enum "Copilot Capability"; Usage: Integer; CopilotQuotaUsageType: Enum "Copilot Quota Usage Type"; CallerModuleInfo: ModuleInfo; AgentTaskID: BigInteger; ActionsCharged: Text[1024]; Description: Text; UniqueID: Text[1024])27 to 27
gone
LogAgentUserAIConsumption(CopilotCapability: Enum "Copilot Capability"; Usage: Integer; CopilotQuotaUsageType: Enum "Copilot Quota Usage Type"; CallerModuleInfo: ModuleInfo; AgentTaskID: BigInteger; ActionsCharged: Text[1024]; Description: Text; UniqueID: Text[1024]; ExcludeFromBilling: Boolean)new in 28
added

All 4 changes in 26-29