---
id: change/bcapps/10205
type: change
title: "#10205 Deprecate Text Completion API in AI SDK (work item 621038)"
summary: 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.
tier: official
language: en
tags:
  - obsoletion
  - main
  - bc30
  - codeunit azure openai
  - codeunit azure openai impl
  - codeunit aoai text completion params
  - codeunit aoai textcompletionparams impl
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:08:45.380Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 0f8288ec3b8ffe5bacbb949c50002d7013279665
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10205
    title: "microsoft/BCApps#10205: Deprecate Text Completion API in AI SDK (work item 621038)"
    date: "2026-08-17"
    commit: 0f8288ec3b8ffe5bacbb949c50002d7013279665
    t: null
    quote: Text completion (davinci) models are retired by Azure OpenAI.
links:
  learn: []
  objects:
    - object/codeunit/7771
    - object/codeunit/7772
    - object/codeunit/7765
    - object/codeunit/7766
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10205
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10205
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-17T08:52:47Z"
author: martinsrui-msft
author_type: User
community_contribution: false
labels:
  - "AL: System Application"
  - "Team: Integrations"
change_class: code
change_kind: obsoletion
behavior_change: false
breaking: false
files:
  count: 6
  additions: 48
  deletions: 3
  al: 4
apps:
  - System Application
objects_touched:
  - key: codeunit/7771
    page: codeunit/7771
    type: codeunit
    id: 7771
    name: Azure OpenAI
    app: System Application
    status: modified
  - key: codeunit/7772
    page: codeunit/7772
    type: codeunit
    id: 7772
    name: Azure OpenAI Impl
    app: System Application
    status: modified
  - key: codeunit/7765
    page: codeunit/7765
    type: codeunit
    id: 7765
    name: AOAI Text Completion Params
    app: System Application
    status: modified
  - key: codeunit/7766
    page: codeunit/7766
    type: codeunit
    id: 7766
    name: AOAI TextCompletionParams Impl
    app: System Application
    status: modified
objects_unjoined: []
obsoletions:
  - object: Azure OpenAI
    member: GenerateTextCompletion
    replacement: null
  - object: AOAI Text Completion Params
    member: null
    replacement: null
  - object: AOAI TextCompletionParams Impl
    member: null
    replacement: null
backports: []
fixes_issues: []
work_items:
  - 620033
systems:
  - copilot
quote: Text completion (davinci) models are retired by Azure OpenAI.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #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.

[Pull request](https://github.com/microsoft/BCApps/pull/10205) · 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"](../../objects/codeunit/7771.md), System Application: modified
- [Codeunit 7772 "Azure OpenAI Impl"](../../objects/codeunit/7772.md), System Application: modified
- [Codeunit 7765 "AOAI Text Completion Params"](../../objects/codeunit/7765.md), System Application: modified
- [Codeunit 7766 "AOAI TextCompletionParams Impl"](../../objects/codeunit/7766.md), 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).
