Referencing a PDF file produces AI_UnsupportedFunctionalityError #945

Closed
opened 2026-02-16 17:28:52 -05:00 by yindo · 9 comments
Owner

Originally created by @laughedelic on GitHub (Jul 27, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Hi! I'm trying to reference a PDF file in my prompt asking it to use an MCP server to convert it to markdown, but just the fact of referencing the PDF file produces an error and it doesn't do anything with it:

Image

any interaction after that just repeats the error, so I have to restart it.

Meanwhile, if I just write down the filename (not as a reference), it is able to run the tool:

Image

A general question: I know that the model (Claude 4 Sonnet) is able to process PDFs, so do I really need to use an MCP server to be able to attach PDFs to the context, or should it (in theory) work out of the box (i.e. via direct file reference)?

This might be related to

Originally created by @laughedelic on GitHub (Jul 27, 2025). Originally assigned to: @adamdotdevin on GitHub. Hi! I'm trying to reference a PDF file in my prompt asking it to use an MCP server to convert it to markdown, but just the fact of referencing the PDF file produces an error and it doesn't do anything with it: <img width="764" height="195" alt="Image" src="https://github.com/user-attachments/assets/6bece688-55ad-44bb-a53e-3e9fc58d86e9" /> any interaction after that just repeats the error, so I have to restart it. Meanwhile, if I just write down the filename (not as a reference), it is able to run the tool: <img width="602" height="178" alt="Image" src="https://github.com/user-attachments/assets/ea5e41a6-00bb-4dec-ad17-14a3fc30e747" /> --- A general question: I know that the model (Claude 4 Sonnet) is able to process PDFs, so do I really need to use an MCP server to be able to attach PDFs to the context, or should it (in theory) work out of the box (i.e. via direct file reference)? This might be related to - https://github.com/sst/opencode/issues/1351
yindo closed this issue 2026-02-16 17:28:52 -05:00
Author
Owner

@adamdotdevin commented on GitHub (Aug 13, 2025):

@laughedelic which provider are you using? i believe some providers don't support PDF, like GH copilot

@adamdotdevin commented on GitHub (Aug 13, 2025): @laughedelic which provider are you using? i believe some providers don't support PDF, like GH copilot
Author
Owner

@laughedelic commented on GitHub (Aug 13, 2025):

Thanks! I can confirm that it works in the latest version with the appropriate model 👍 (e.g. Claude 4 Sonnet)

But when I tried it with GPT-4.1, it failed with the same error. I think the error message is rather opaque, it doesn't indicate that the model doesn't support that file type, so it can be confusing.

Image
@laughedelic commented on GitHub (Aug 13, 2025): Thanks! I can confirm that it works in the latest version with the appropriate model 👍 (e.g. Claude 4 Sonnet) But when I tried it with GPT-4.1, it failed with the same error. I think the error message is rather opaque, it doesn't indicate that the model doesn't support that file type, so it can be confusing. <img width="416" height="217" alt="Image" src="https://github.com/user-attachments/assets/c0859df2-bbd2-460f-a1c0-7440ec47a099" />
Author
Owner

@laughedelic commented on GitHub (Aug 13, 2025):

Sorry, I kind of replied to the comment in the other issue.

Yes, I was using GPT-4.1 via GitHub Copilot. It's good to know that it depends on the provider, not only the model. But could you make the error message more informative?

@laughedelic commented on GitHub (Aug 13, 2025): Sorry, I kind of replied to the comment in the other issue. Yes, I was using GPT-4.1 via GitHub Copilot. It's good to know that it depends on the provider, not only the model. But could you make the error message more informative?
Author
Owner

@adamdotdevin commented on GitHub (Aug 15, 2025):

@thdxr curious what your thoughts are around how we expose AI SDK errors; if we could make them nicer across the board that'd be great, but not sure how we tackle it

@adamdotdevin commented on GitHub (Aug 15, 2025): @thdxr curious what your thoughts are around how we expose AI SDK errors; if we could make them nicer across the board that'd be great, but not sure how we tackle it
Author
Owner

@munim commented on GitHub (Sep 10, 2025):

Github Copilot with GPT-4.1 was able to convert a PDF file using Markitdown MCP server. Wondering why wouldn't it work with OpenCode!

@munim commented on GitHub (Sep 10, 2025): Github Copilot with GPT-4.1 was able to convert a PDF file using Markitdown MCP server. Wondering why wouldn't it work with OpenCode!
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Author
Owner

@markthepixel commented on GitHub (Jan 11, 2026):

running into an issue where sonnet just has a weird error and gpt5.2 just says it doesnt support it. Is it hte model or opencode?

@markthepixel commented on GitHub (Jan 11, 2026): running into an issue where sonnet just has a weird error and gpt5.2 just says it doesnt support it. Is it hte model or opencode?
Author
Owner

@rekram1-node commented on GitHub (Jan 11, 2026):

@markthepixel what provider? what error? It's coming from ur provider

@rekram1-node commented on GitHub (Jan 11, 2026): @markthepixel what provider? what error? It's coming from ur provider
Author
Owner

@markthepixel commented on GitHub (Jan 11, 2026):

It's antigravity then

@markthepixel commented on GitHub (Jan 11, 2026): It's antigravity then
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#945