mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-04-04 19:51:18 +00:00
**Problem:** GitHub Copilot API returns 400 error "missing required Copilot-Vision-Request header for vision requests" when requests contain image content blocks, even though the requests are valid Claude API calls. **Root Cause:** The GitHub Copilot executor was not detecting vision content in requests and did not add the required `Copilot-Vision-Request: true` header. **Solution:** - Added `detectVisionContent()` function to check for image_url/image content blocks - Automatically add `Copilot-Vision-Request: true` header when vision content is detected - Applied fix to both `Execute()` and `ExecuteStream()` methods **Testing:** - Tested with Claude Code IDE requests containing code context screenshots - Vision requests now succeed instead of failing with 400 errors - Non-vision requests remain unchanged Fixes issue where GitHub Copilot executor fails all vision-enabled requests, causing unnecessary fallback to other providers and 0% utilization. Co-Authored-By: Claude (claude-sonnet-4.5) <noreply@anthropic.com>