How to fix 'missing required Copilot-Vision-Request header' when playwright-mcp takes a screenshot in GitHub Copilot?
When using playwright-mcp through GitHub Copilot in VS Code, asking Copilot to take a screenshot fails with HTTP 400: missing required Copilot-Vision-Request header for vision requests. What does this error mean and how can I make screenshots work? The thread does not mention specific playwright-mcp or VS Code versions.
Originally asked on GitHub: https://github.com/microsoft/playwright-mcp/issues/718
5 answers
The issue was closed as completed, but the thread does not document a code fix in playwright-mcp. A commenter explained that the 400 response comes from the Copilot API and indicates the request did not tell Copilot that vision should be enabled. They suspected this is either a limitation of the model being used (some models do not support vision) or a bug in VS Code Copilot, and suggested filing an issue at the main VS Code issue tracker.
A member of the repo team said to make sure you are using multimodal-enabled models for screenshots; otherwise, use playwright-mcp command line flags to disable sending images to the LLM. The exact flag names are not stated in the thread, so check playwright-mcp's CLI help or README for the option that disables image sending.
One user confirmed a practical workaround: setting the Copilot model to 'auto' let the screenshot request proceed. However, another user reported getting the same error while using the multimodal model Claude Sonnet 4.5, so model selection alone may not fix every setup. If the error persists with a vision-capable model, the thread's advice is to report it to the VS Code Copilot team.
Did this work for you?What @alex-teletrack-app tried on GitHub (Worked)
User set the Copilot model to 'auto' and the screenshot request proceeded.
Source: https://github.com/microsoft/playwright-mcp/issues/718#issuecomment-4146250898 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter asked Copilot to use playwright-mcp to take a screenshot and got HTTP 400 with 'missing required Copilot-Vision-Request header for vision requests'.
Source: https://github.com/microsoft/playwright-mcp/issues/718 (opens external site)
Did this work for you?What @philtillman tried on GitHub (Didn't work)
User reported using the multimodal model Claude Sonnet 4.5 and still getting the same error.
Source: https://github.com/microsoft/playwright-mcp/issues/718#issuecomment-3743839661 (opens external site)
Did this work for you?What @gundermanc tried on GitHub (Outcome unclear)
A commenter suggested the error is a Copilot API response indicating vision was not enabled, possibly a model limitation or VS Code bug, and recommended filing an issue with the VS Code team.
Source: https://github.com/microsoft/playwright-mcp/issues/718#issuecomment-3097664690 (opens external site)
Did this work for you?
Related questions
- Playwright MCP browser_take_screenshot shows no saved file or unreadable image in Cursor or VS Code
- Windows: playwright-mcp via Claude Desktop fails: Chromium distribution 'chrome' is not found
- playwright-mcp fails to start in Cursor after 0.0.19/0.0.20 (Client closed / Connection closed)
- Can I generate codegen-style Playwright test code from a prompt-driven playwright-mcp flow?
- Does Playwright MCP have a quiet mode to reduce page snapshot tokens?