fix: enable PDF upload support for Web UI agents#582
Merged
yaozheng-fang merged 1 commit intoJun 5, 2026
Conversation
Add pdf_to_images_before_model_callback to all Web UI agents to handle PDF file uploads locally without requiring OpenAI API credentials. Changes: - Add PDF processing callback to web_demo agent - Add PDF processing callback to dogfooding agent (smart mode builder) - Add PDF processing callback to dogfooding_b agent (A/B compare mode) - Add PDF processing callback to front_with_sso agent Fixes the error: "Missing credentials. Please pass an 'api_key'..." when users upload PDF files in the Web UI. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
c0e67bf to
b9a85ee
Compare
yaozheng-fang
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
修复 Web UI 中 PDF 文件上传时的错误:
用户在
web_demo、dogfooding、dogfooding_b、front_with_sso等 agent 中上传 PDF 文件时,系统报错:Missing credentials. Please pass an 'api_key', 'workload_identity', 'admin_api_key',
or set the 'OPENAI_API_KEY' or 'OPENAI_ADMIN_KEY' environment variable.
根本原因
before_model_callback参数修复方案
为所有 Web UI agent 添加 VeADK 内置的 PDF 处理回调: