community postCopilot & Agentscommunity - not Microsoftreviewed - checked by Opus

Copilot Quota and AI consumption in Business Central.

Copilot and AI features in Business Central now consume Copilot Credits with limits. The System Application provides codeunit 7785 'Copilot Quota' that checks tenant capacity, and developers can use it as a pre-flight check before calling AI models. Additional tools track billing type, token usage, and consumption telemetry to monitor AI costs.

post Stefano Demiliani

Stefano Demiliani · 2026-12-03 · 1,365 words · about 6 min

"If the platform can't return quota details, the method returns false. On-premises or in a Docker sandbox you should not expect true."

Key points

  • AI features are billed via Copilot Credits with capacity limits; CanConsume() checks if the tenant can still consume capacity
  • The public facade codeunit 7785 delegates to internal implementation 7786, which communicates with the platform through ALCopilotFunctions
  • Developers should wrap CanConsume() once and check before building prompts; in unattended processing, check once before the loop, not per record
  • Three billing types exist: Not Billed, Microsoft Billed, and Custom Billed; declared when registering a capability
  • Token usage can be estimated pre-call with GetGPT4TokenCount or measured post-call with GetTotalServerSessionTokensConsumed; telemetry signals 0000LT4 and RT0055 track consumption

Quotes

  • “If the platform can’t return quota details, the method returns false. On-premises or in a Docker sandbox you should not expect true.” (Critical context that CanConsume() is SaaS-specific and developers must handle on-premises environments differently)

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

No source states these links: they share an object, a model read them, or a person found the same subject.

Heads up

  • gotcha: “If the platform can’t return quota details, the method returns false. On-premises or in a Docker sandbox you should not expect true” (about codeunit Copilot Quota)
  • warning: “Calling it in a tight loop produces telemetry noise, so call it once per user action.” (about codeunit Copilot Quota)
  • gotcha: “It’s cumulative for the server session, across all models. There’s no split by prompt and completion, capability or app.” (about codeunit AOAI Token)

Context

  • Features: Copilot quota checking, Copilot Credits consumption, Billing type declaration, Token counting, AI consumption telemetry, Quota notifications, Background task result handling
  • Versions: 27.0

Source: Stefano Demiliani, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.