8000 [releases/26.x] [AI] Add GPT41 and GPT41 mini to AOAI deployments by darjoo · Pull Request #3925 · microsoft/BCApps · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[releases/26.x] [AI] Add GPT41 and GPT41 mini to AOAI deployments #3925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ codeunit 324 "No. Series Copilot Impl."
if not AzureOpenAI.IsEnabled(Enum::"Copilot Capability"::"No. Series Copilot") then
exit;

AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT4oLatest());
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT41Latest());
AzureOpenAI.SetCopilotCapability(Enum::"Copilot Capability"::"No. Series Copilot");
AOAIChatCompletionParams.SetMaxTokens(MaxOutputTokens());
AOAIChatCompletionParams.SetTemperature(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@ codeunit 7768 "AOAI Deployments"
exit(AOAIDeploymentsImpl.GetGPT4Preview(CallerModuleInfo));
end;
#endif

#if not CLEAN27
/// <summary>
/// Returns the name of the latest AOAI deployment model of GPT4o.
/// </summary>
/// <returns>The deployment name.</returns>
[Obsolete('GPT4o deployment name is no longer supported from 15 July 2025. Use GetGPT41Latest instead (or GetGPT41Preview for testing upcoming versions).', '27.0')]
procedure GetGPT4oLatest(): Text
var
CallerModuleInfo: ModuleInfo;
Expand All @@ -125,6 +126,7 @@ codeunit 7768 "AOAI Deployments"
/// Returns the name of preview AOAI deployment model of GPT4o.
/// </summary>
/// <returns>The deployment name.</returns>
[Obsolete('GPT4o deployment name is no longer supported from 15 July 2025. Use GetGPT41Latest instead (or GetGPT41Preview for testing upcoming versions).', '27.0')]
procedure GetGPT4oPreview(): Text
var
CallerModuleInfo: ModuleInfo;
Expand All @@ -137,6 +139,7 @@ codeunit 7768 "AOAI Deployments"
/// Returns the name of the latest AOAI deployment model of GPT4o-Mini.
/// </summary>
/// <returns>The deployment name.</returns>
[Obsolete('GPT4o mini deployment name is no longer supported from 15 July 2025. Use GetGPT41Latest instead (or GetGPT41Preview for testing upcoming versions).', '27.0')]
procedure GetGPT4oMiniLatest(): Text
var
CallerModuleInfo: ModuleInfo;
Expand All @@ -149,11 +152,61 @@ codeunit 7768 "AOAI Deployments"
/// Returns the name of preview AOAI deployment model of GPT4o-Mini.
/// </summary>
/// <returns>The deployment name.</returns>
[Obsolete('GPT4o mini deployment name is no longer supported from 15 July 2025. Use GetGPT41Latest instead (or GetGPT41Preview for testing upcoming versions).', '27.0')]
procedure GetGPT4oMiniPreview(): Text
var
CallerModuleInfo: ModuleInfo;
begin
NavApp.GetCallerModuleInfo(CallerModuleInfo);
exit(AOAIDeploymentsImpl.GetGPT4oMiniPreview(CallerModuleInfo));
end;
#endif

/// <summary>
/// Returns the name of the latest AOAI deployment model of GPT-4.1.
/// </summary>
/// <returns>The deployment name.</returns>
procedure GetGPT41Latest(): Text
var
CallerModuleInfo: ModuleInfo;
begin
NavApp.GetCallerModuleInfo(CallerModuleInfo);
exit(AOAIDeploymentsImpl.GetGPT41Latest(CallerModuleInfo));
end;

/// <summary>
/// Returns the name of the preview AOAI deployment model of GPT-4.1.
/// </summary>
/// <returns>The deployment name.</returns>
procedure GetGPT41Preview(): Text
var
CallerModuleInfo: ModuleInfo;
begin
NavApp.GetCallerModuleInfo(CallerModuleInfo);
exit(AOAIDeploymentsImpl.GetGPT41Preview(CallerModuleInfo));
end;

/// <summary>
/// Returns the name of the latest AOAI deployment model of GPT-4.1 mini.
/// </summary>
/// <returns>The deployment name.</returns>
procedure GetGPT41MiniLatest(): Text
var
CallerModuleInfo: ModuleInfo;
begin
NavApp.GetCallerModuleInfo(CallerModuleInfo);
exit(AOAIDeploymentsImpl.GetGPT41MiniLatest(CallerModuleInfo));
end;

8000 /// <summary>
/// Returns the name of the preview AOAI deployment model of GPT-4.1 mini.
/// </summary>
/// <returns>The deployment name.</returns>
procedure GetGPT41MiniPreview(): Text
var
CallerModuleInfo: ModuleInfo;
begin
NavApp.GetCallerModuleInfo(CallerModuleInfo);
exit(AOAIDeploymentsImpl.GetGPT41MiniPreview(CallerModuleInfo));
end;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ codeunit 7769 "AOAI Deployments Impl"

var
Telemetry: Codeunit Telemetry;
#if not CLEAN27
GPT4oLatestLbl: Label 'gpt-4o-latest', Locked = true;
GPT4oPreviewLbl: Label 'gpt-4o-preview', Locked = true;
GPT4oMiniLatestLbl: Label 'gpt-4o-mini-latest', Locked = true;
GPT4oMiniPreviewLbl: Label 'gpt-4o-mini-preview', Locked = true;
#endif
GPT41LatestLbl: Label 'gpt-41-latest', Locked = true;
GPT41PreviewLbl: Label 'gpt-41-preview', Locked = true;
GPT41MiniLatestLbl: Label 'gpt-41-mini-latest', Locked = true;
GPT41MiniPreviewLbl: Label 'gpt-41-mini-preview', Locked = true;
DeprecatedDeployments: Dictionary of [Text, Date];
DeprecationDatesInitialized: Boolean;
DeprecationMessageLbl: Label 'We detected usage of the Azure OpenAI deployment "%1". This model is obsoleted starting %2 and the quality of your results might vary after that date. Check out codeunit 7768 AOAI Deployments to find the supported deployments.', Comment = 'Telemetry message where %1 is the name of the deployment and %2 is the date of deprecation';
Expand Down Expand Up @@ -86,7 +92,7 @@ codeunit 7769 "AOAI Deployments Impl"
exit(GetDeploymentName(GPT4LatestLbl));
end;
#endif

#if not CLEAN27
procedure GetGPT4oPreview(CallerModuleInfo: ModuleInfo): Text
begin
exit(GetDeploymentName(GPT4oPreviewLbl));
Expand All @@ -106,6 +112,27 @@ codeunit 7769 "AOAI Deployments Impl"
begin
exit(GetDeploymentName(GPT4oMiniLatestLbl));
end;
#endif

procedure GetGPT41Preview(CallerModuleInfo: ModuleInfo): Text
begin
exit(GetDeploymentName(GPT41PreviewLbl));
end;

procedure GetGPT41Latest(CallerModuleInfo: ModuleInfo): Text
begin
exit(GetDeploymentName(GPT41LatestLbl));
end;

procedure GetGPT41MiniPreview(CallerModuleInfo: ModuleInfo): Text
begin
exit(GetDeploymentName(GPT41MiniPreviewLbl));
end;

procedure GetGPT41MiniLatest(CallerModuleInfo: ModuleInfo): Text
begin
exit(GetDeploymentName(GPT41MiniLatestLbl));
end;

// Initializes dictionary of deprecated models
local procedure InitializeDeploymentDeprecationDates()
Expand All @@ -122,6 +149,12 @@ codeunit 7769 "AOAI Deployments Impl"
DeprecatedDeployments.Add(Turbo0301SaasLbl, DMY2Date(1, 11, 2024));
DeprecatedDeployments.Add(GPT40613SaasLbl, DMY2Date(1, 11, 2024));
DeprecatedDeployments.Add(Turbo0613SaasLbl, DMY2Date(1, 11, 2024));
#endif
#if not CLEAN27
DeprecatedDeployments.Add(GPT4oLatestLbl, DMY2Date(15, 7, 2025));
DeprecatedDeployments.Add(GPT4oPreviewLbl, DMY2Date(15, 7, 2025));
DeprecatedDeployments.Add(GPT4oMiniLatestLbl, DMY2Date(15, 7, 2025));
DeprecatedDeployments.Add(GPT4oMiniPreviewLbl, DMY2Date(15, 7, 2025));
#endif
DeprecationDatesInitialized := true;
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ codeunit 2012 "Entity Text Impl."
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", Endpoint, Deployment, ApiKey)
else
if (not IsNullGuid(CallerModuleInfo.Id())) and (CallerModuleInfo.Publisher() = EntityTextModuleInfo.Publisher()) then
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT4oLatest())
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT41Latest())
else begin
TelemetryCD.Add('CallerModuleInfo', Format(CallerModuleInfo.Publisher()));
TelemetryCD.Add('EntityTextModuleInfo', Format(EntityTextModuleInfo.Publisher()));
Expand Down
Loading
0