Skip to content

Update E-Document AI tools to GPT-5.3 chat latest#8544

Open
Groenbech96 wants to merge 1 commit into
microsoft:mainfrom
Groenbech96:magnushar/edoc-ai-tools-upgrade-to-gpt53
Open

Update E-Document AI tools to GPT-5.3 chat latest#8544
Groenbech96 wants to merge 1 commit into
microsoft:mainfrom
Groenbech96:magnushar/edoc-ai-tools-upgrade-to-gpt53

Conversation

@Groenbech96

Copy link
Copy Markdown
Contributor

Summary

Switches every AI-tool caller in the E-Document app from the GPT-4.1 deployments to GetGPT53ChatLatest():

  • E-Doc. AI Tool Processor (LLM tool processor)
  • E-Doc. Multi-Modal LLM Handler (structured document import)
  • E-Doc. PO Copilot Matching (Copilot PO line matching)

Docs under src/Apps/W1/EDocument/App/src/Processing/docs updated to match.

Notes

  • The GetGPT4TokenCount call in EDocAIToolProcessor is an AOAI token-counter API, not a model selector, so it stays.
  • The 22K prompt-size threshold comment in EDocPOCopilotMatching is left as-is; revisit if a different cap is desired for the new model.

Switch all AI-tool callers in the E-Document app from GetGPT41Latest()/GetGPT41MiniPreview() to GetGPT53ChatLatest():

- E-Doc. AI Tool Processor (LLM tool processor)

- E-Doc. Multi-Modal LLM Handler (structured document import)

- E-Doc. PO Copilot Matching (Copilot PO line matching)

Docs (CLAUDE.md, business-logic.md) updated to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Groenbech96 Groenbech96 requested a review from a team as a code owner June 9, 2026 08:52
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork labels Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link.

Base64Data := Base64Convert.ToBase64(InStream);

// Build AOAI call
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT41MiniPreview());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Performance} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

Cost regression: Mini model replaced by full GPT-5.3

The previous model GetGPT41MiniPreview() was a deliberately chosen smaller/cheaper model for high-volume document processing. Replacing it with the full GetGPT53ChatLatest() model will substantially increase token costs per document processed through the MLLM extraction path, without any evidence the task complexity justifies the upgrade.

Recommendation:

  • If a multimodal-capable GPT-5.3 mini or smaller variant is available (e.g., GetGPT53MiniLatest()), prefer it for the MLLM handler to preserve the cost profile. Reserve the full GPT-5.3 model for the matching and tool-processor codeunits where the reasoning complexity is higher.
Suggested change
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT41MiniPreview());
// Prefer a mini/smaller variant for cost efficiency if available:
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT53MiniLatest());

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

Base64Data := Base64Convert.ToBase64(InStream);

// Build AOAI call
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT41MiniPreview());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟠\ High\ Severity\ —\ Upgrade} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

Vision model replaced with chat-only model

The MLLM handler uses AddFilePart() to attach Base64-encoded PDF documents (via 'data:application/pdf;base64,%1') and then calls GenerateChatCompletion. This requires a vision/multimodal-capable model. GetGPT41MiniPreview() was specifically a multimodal model; if GetGPT53ChatLatest() is a text-only chat model, the file attachment will either be rejected by the API or silently ignored, causing every MLLM extraction to fall back to ADI instead of using the AI extraction path.

Recommendation:

  • Verify that the deployment returned by GetGPT53ChatLatest() supports multimodal / vision inputs (file parts). If it does not, use a GPT-5.3 deployment that explicitly supports vision, or retain a vision-capable model for this handler. Add an integration test that confirms file-part content is correctly processed by the new model.
Suggested change
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT41MiniPreview());
// If GPT-5.3 has a vision variant, use it:
AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT53VisionLatest());
// Otherwise keep GPT-4.1 Mini (vision) until a multimodal GPT-5.3 deployment is available:
// AzureOpenAI.SetAuthorization(Enum::"AOAI Model Type"::"Chat Completions", AOAIDeployments.GetGPT41MiniPreview());

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants