---
title: "Codeunit 7759 AOAI Token, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/points/
object: https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/
app: "System Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 7759 AOAI Token, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/points/

5 procedures and triggers with a step in src/System Application/App/AI/src/Azure OpenAI/AOAIToken.Codeunit.al, in source order, read from the text, not from a run.

## GetGPT35TokenCount

[Line 22](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L22).

- [24](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L24) calls [Codeunit 7772 Azure OpenAI Impl](https://jonas-paprotka.de/ref/codeunit/7772-azure-openai-impl/) `GetTokenCount`

## GetGPT4TokenCount

[Line 32](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L32).

- [34](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L34) calls [Codeunit 7772 Azure OpenAI Impl](https://jonas-paprotka.de/ref/codeunit/7772-azure-openai-impl/) `GetTokenCount`

## GetAdaTokenCount

[Line 42](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L42).

- [44](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L44) calls [Codeunit 7772 Azure OpenAI Impl](https://jonas-paprotka.de/ref/codeunit/7772-azure-openai-impl/) `GetTokenCount`

## GetDavinciTokenCount

[Line 52](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L52).

- [54](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L54) calls [Codeunit 7772 Azure OpenAI Impl](https://jonas-paprotka.de/ref/codeunit/7772-azure-openai-impl/) `GetTokenCount`

## GetTotalServerSessionTokensConsumed

[Line 64](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L64).

- [66](https://jonas-paprotka.de/ref/codeunit/7759-aoai-token/source/#L66) calls [Codeunit 7772 Azure OpenAI Impl](https://jonas-paprotka.de/ref/codeunit/7772-azure-openai-impl/) `GetTotalServerSessionTokensConsumed`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
