fix(agent): block non-pdf assets in read_pdf_pages and remove mediaType fallback in AgentChatPromptBuilder

This commit is contained in:
yiling
2026-07-20 11:01:22 +08:00
parent fea153e94f
commit 4ad0df5876
3 changed files with 35 additions and 2 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ export function createReadPdfPagesTool(
}
const proxyType = (asset.media as PrismaJson.MediaInfo | null)?.proxyType
if (proxyType && proxyType !== 'pdf') {
if (proxyType !== 'pdf') {
return {
content: [{ type: 'text', text: `Asset ${targetAssetId} is not a PDF or document.` }],
details: {},