#10205 Deprecate Text Completion API in AI SDK (work item 621038)
The Text Completion API in the Azure OpenAI AI module is marked obsolete and guarded with conditional compilation to prepare for its removal, as Azure OpenAI has retired the davinci models.
- 6files
- 4AL files
- 4objects
Pull request · merged into main (BC30) on 2026-08-17 by martinsrui-msft · 6 files (+48 -3), 4 AL · obsoletion · tier official · reviewed (checked by Opus)
What changed
- Four public GenerateTextCompletion methods in codeunit 7771 marked [Obsolete] and guarded with #if not CLEAN29
- Text completion implementation in codeunit 7772 and related parameter objects (7765, 7766) guarded with conditional compilation
- Authorization and SendRequest plumbing intentionally retained to avoid cascading compilation errors
- Text completion enum value left for follow-up deprecation
- Verified runtime compatibility: API continues working before CLEAN29 cleanup
AL objects touched
- Codeunit 7771 “Azure OpenAI”, System Application: modified
- Codeunit 7772 “Azure OpenAI Impl”, System Application: modified
- Codeunit 7765 “AOAI Text Completion Params”, System Application: modified
- Codeunit 7766 “AOAI TextCompletionParams Impl”, System Application: modified
Obsoletions
- Azure OpenAI: GenerateTextCompletion
- AOAI Text Completion Params
- AOAI TextCompletionParams Impl
Context
- Work items: AB#620033
- Labels: AL: System Application, Team: Integrations
- Systems: copilot
- From the description: “Text completion (davinci) models are retired by Azure OpenAI.”
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).