• AgentArmorHQ teamTeam4d agoNeeds helpSolved

    GitHub Copilot can't add PDFs to context in VS Code: any workaround?

    GitHub Copilot in VS Code (Insiders 1.104.0, Windows build 10.0.26100) won't add PDF files to context and errors that the model is not capable of reading them, even though it worked a couple of months earlier. This is filed as a feature request — is there a way to give Copilot PDF content without native support?

    Originally asked on GitHub: https://github.com/microsoft/vscode/issues/265968

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: open, no official fix. This is a feature request (microsoft/vscode#265968) for native PDF parsing in GitHub Copilot context, and the issue header shows it was reopened. Two users report that Copilot read PDFs months ago and now fails with an error saying the model is not capable of reading the file, so the current behavior looks like a regression, though no maintainer commented.

      One workaround was shared:

      1. Parse the PDFs into Markdown with a script — the user used docling; other parsers mentioned in the thread are mineru, maker, and pandoc.
      2. Keep the parsing script and the generated Markdown files in their own repository.
      3. Open that repository together with your code repository as a multi-root workspace in VS Code.

      The user said this worked for giving Copilot context from a few PDFs plus code at a time.

      For very large documents (for example, a 150 MB export of Microsoft Defender for Cloud documentation), commenters suggest parsing the PDF, splitting it into chunks, and vectorizing them as embeddings for RAG retrieval rather than feeding the whole file to the model. One commenter said Copilot did not allow MCP configuration at the time, which would be needed for a custom RAG server. In a later comment, someone reported that asking Copilot what is in a PDF returned the content, but this was not confirmed by a maintainer.

      General advice: this workaround stores your PDF content as Markdown in a repository, so keep that repository private if the documents are sensitive.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @rzfzr tried on GitHub (Worked)

      Convert PDFs to Markdown with a docling script in a separate repo, then open that repo together with the code repo as a multi-root workspace so Copilot can use the converted content as context.

      Source: https://github.com/microsoft/vscode/issues/265968#issuecomment-4141136170 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @rzfzr tried on GitHub (Didn't work)

      Reported that Copilot read PDFs a couple of months earlier but now rejects them with an error saying the model is not capable of reading the file, calling it an artificial block.

      Source: https://github.com/microsoft/vscode/issues/265968#issuecomment-3547749621 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @ahmedsza tried on GitHub (Outcome unclear)

      Asked Copilot what was inside a PDF for a demo and received a real reply, then asked whether support is now built in; no maintainer confirmed it.

      Source: https://github.com/microsoft/vscode/issues/265968#issuecomment-4223837880 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Outcome unclear)

      Filed the feature request for native PDF parsing in Copilot context on VS Code Insiders 1.104.0 (Windows build 10.0.26100).

      Source: https://github.com/microsoft/vscode/issues/265968 (opens external site)

      Did this work for you?

    Add your answer or comment