Update E-Document AI tools to GPT-5.3 chat latest#8544
Conversation
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>
|
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()); |
There was a problem hiding this comment.
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.
| 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()); |
There was a problem hiding this comment.
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.
| 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
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/docsupdated to match.Notes
GetGPT4TokenCountcall inEDocAIToolProcessoris an AOAI token-counter API, not a model selector, so it stays.EDocPOCopilotMatchingis left as-is; revisit if a different cap is desired for the new model.