OpenRouter's Claude does not support PDF parsing. #920

Closed
opened 2026-02-16 10:21:00 -05:00 by yindo · 1 comment
Owner

Originally created by @dimsky on GitHub (Jan 6, 2026).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues Dify issues & Dify Official Plugins, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.1

Plugin version

latest

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

Current models such as Claude, GPT, and Gemini natively support the parsing of PDF and other files, so I don't need to go through any other steps for parsing.

✔️ Error log

No response

Originally created by @dimsky on GitHub (Jan 6, 2026). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.1 ### Plugin version latest ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="1563" height="807" alt="Image" src="https://github.com/user-attachments/assets/a78683d5-a63b-4ecb-9618-8000db92086e" /> Current models such as Claude, GPT, and Gemini natively support the parsing of PDF and other files, so I don't need to go through any other steps for parsing. ### ✔️ Error log _No response_
yindo added the bug label 2026-02-16 10:21:00 -05:00
yindo closed this issue 2026-02-16 10:21:00 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 6, 2026):

OpenRouter's Claude integration does not actually parse or extract content from PDF files. Instead, when you upload a PDF, the plugin just inserts a placeholder like [Document file uploaded]: <url> into the prompt, not the PDF's text or images. There is no code in the OpenRouter plugin that performs PDF content extraction for Claude models — this is a design limitation, not a bug or configuration issue (source).

However, Dify itself extracts text and images from PDFs before sending content to any model, using its core extraction pipeline. The PdfExtractor class parses PDF pages and images, saving them and embedding image links as Markdown in the extracted text (source). This means that, in most Dify workflows, the model (including Claude via OpenRouter) receives the extracted text and image links, not the raw PDF file.

If you need Claude to process PDF content, make sure your workflow uses Dify's document/RAG pipeline to extract the text and images first, then passes that extracted content to the model. If you need direct PDF parsing by the model itself, consider using a model or plugin that advertises native document or vision support (like Gemini 3 via OpenRouter), but for Claude via OpenRouter, direct PDF parsing is not supported (source).

If you have a specific workflow where the extracted content is not reaching Claude, it may be a configuration or pipeline issue in how files are routed, not a limitation of Claude's PDF support in Dify.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 6, 2026): <!-- Answer --> OpenRouter's Claude integration does not actually parse or extract content from PDF files. Instead, when you upload a PDF, the plugin just inserts a placeholder like `[Document file uploaded]: <url>` into the prompt, not the PDF's text or images. There is no code in the OpenRouter plugin that performs PDF content extraction for Claude models — this is a design limitation, not a bug or configuration issue [(source)](https://github.com/langgenius/dify-official-plugins/blob/04dcfdc4d2f2e2bba3829eaecb6089d587557267/models/openrouter/models/llm/llm.py#L44-L190). However, Dify itself extracts text and images from PDFs before sending content to any model, using its core extraction pipeline. The `PdfExtractor` class parses PDF pages and images, saving them and embedding image links as Markdown in the extracted text [(source)](https://github.com/langgenius/dify/blob/2cc89d30dbfef1b0d761738db72dffdc75b8215f/api/core/rag/extractor/pdf_extractor.py#L25-L177). This means that, in most Dify workflows, the model (including Claude via OpenRouter) receives the extracted text and image links, not the raw PDF file. If you need Claude to process PDF content, make sure your workflow uses Dify's document/RAG pipeline to extract the text and images first, then passes that extracted content to the model. If you need direct PDF parsing by the model itself, consider using a model or plugin that advertises native document or vision support (like Gemini 3 via OpenRouter), but for Claude via OpenRouter, direct PDF parsing is not supported [(source)](https://github.com/langgenius/dify-official-plugins/blob/04dcfdc4d2f2e2bba3829eaecb6089d587557267/models/openrouter/models/llm/llm.py#L44-L190). If you have a specific workflow where the extracted content is not reaching Claude, it may be a configuration or pipeline issue in how files are routed, not a limitation of Claude's PDF support in Dify. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/735c41df-06cf-43d9-95a7-471fae87f3ad?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/735c41df-06cf-43d9-95a7-471fae87f3ad?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/735c41df-06cf-43d9-95a7-471fae87f3ad?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/735c41df-06cf-43d9-95a7-471fae87f3ad?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/735c41df-06cf-43d9-95a7-471fae87f3ad?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/735c41df-06cf-43d9-95a7-471fae87f3ad?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/735c41df-06cf-43d9-95a7-471fae87f3ad?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=OpenRouter%27s%20Claude%20integration%20does%20not%20actually%20parse%20or%20extract%20content%20from%20PDF%20files.%20Instead%2C%20when%20you%20upload%20a%20PDF%2C%20the%20plugin%20just%20inserts%20a%20placeholder%20like%20%60%5BDocument%20file%20uploaded%5D%3A%20%3Curl%3E%60%20into%20the%20prompt%2C%20not%20the%20PDF%27s%20text%20or%20images.%20There%20is%20no%20code%20in%20the%20OpenRouter%20plugin%20that%20performs%20PDF%20content%20extraction%20for%20Claude%20models%E2%80%AF%E2%80%94%E2%80%AFthis%20is%20a%20design%20limitation%2C%20not%20a%20bug%20or%20configuration%20issue%20%5B%28source%29%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/04dcfdc4d2f2e2bba3829eaecb6089d587557267/models/openrouter/models/llm/llm.py%23L44-L190%29.%0A%0AHowever%2C%20Dify%20itself%20extracts%20text%20and%20images%20from%20PDFs%20before%20sending%20content%20to%20any%20model%2C%20using%20its%20core%20extraction%20pipeline.%20The%20%60PdfExtractor%60%20class%20parses%20PDF%20pages%20and%20images%2C%20saving%20them%20and%20embedding%20image%20links%20as%20Markdown%20in%20the%20extracted%20text%20%5B%28source%29%5D%28https%3A//github.com/langgenius/dify/blob/2cc89d30dbfef1b0d761738db72dffdc75b8215f/api/core/rag/extractor/pdf_extractor.py%23L25-L177%29.%20This%20means%20that%2C%20in%20most%20Dify%20workflows%2C%20the%20model%20%28including%20Claude%20via%20OpenRouter%29%20receives%20the%20extracted%20text%20and%20image%20links%2C%20not%20the%20raw%20PDF%20file.%0A%0AIf%20you%20need%20Claude%20to%20process%20PDF%20content%2C%20make%20sure%20your%20workflow%20uses%20Dify%27s%20document/RAG%20pipeline%20to%20extract%20the%20text%20and%20images%20first%2C%20then%20passes%20that%20extracted%20content%20to%20the%20model.%20If%20you%20need%20direct%20PDF%20parsing%20by%20the%20model%20itself%2C%20consider%20using%20a%20model%20or%20plugin%20that%20advertises%20native%20document%20or%20vision%20support%20%28like%20Gemini%203%20via%20OpenRouter%29%2C%20but%20for%20Claude%20via%20OpenRouter%2C%20direct%20PDF%20parsing%20is%20not%20supported%20%5B%28source%29%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/04dcfdc4d2f2e2bba3829eaecb6089d587557267/models/openrouter/models/llm/llm.py%23L44-L190%29.%0A%0AIf%20you%20have%20a%20specific%20workflow%20where%20the%20extracted%20content%20is%20not%20reaching%20Claude%2C%20it%20may%20be%20a%20configuration%20or%20pipeline%20issue%20in%20how%20files%20are%20routed%2C%20not%20a%20limitation%20of%20Claude%27s%20PDF%20support%20in%20Dify.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/2370)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#920