You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copilot is always BYOK, so requests use the end user's provider credential rather than a shared centralized credential. Restricting Copilot passthrough to an explicit route allowlist does not provide the same security benefit as it does for centralized providers and causes new Copilot endpoints to fail until they are added manually.
Allow all non-bridged Copilot routes to pass through to the configured upstream. More specific bridged inference routes continue to take precedence.
Changes
Replace the Copilot passthrough allowlist with a catch-all route.
Clarify that providers using centralized credentials should restrict passthrough routes to known-safe operations.
Cover known and unknown Copilot passthrough routes.
Verify bridged routes take precedence over the passthrough catch-all.
docs/ai-coder/ai-gateway/reference.md - The GitHub Copilot section lists a passthrough allowlist (/models(/*), /agents/*, /mcp/*, /.well-known/*) and states "Any route that is not listed above returns 404." With the catch-all passthrough, these listed routes are no longer exhaustive and the 404 claim no longer applies. Update both the list and the "not listed → 404" line to match the new behavior (all non-bridged routes now pass through).
docs/ai-coder/ai-gateway/reference.md - This was addressed. The Copilot passthrough section now states that all Copilot routes other than the intercepted ones pass through to the configured upstream, and the stale "not listed → 404" claim is gone. Confirmed accurate against aibridge/provider/copilot.go (PassthroughRoutes() returns the catch-all "/") and the diff. A prior iteration added concrete examples (/models, /_ping, /auto, /agents/*, /mcp/*, /.well-known/*) plus an "AI Gateway authentication is still required" line; this iteration removed both. The catch-all sentence is complete and accurate on its own, so removing the examples creates no gap.
Note
Evidence: searched docs/ for the old literals /_ping, /copilot/auto, /auto, /models(, /agents/, /mcp/, well-known, and passthrough. No page outside docs/reference/ enumerates these Copilot routes, so reference.md was the sole consumer of the allowlist and no stale copy of the old fact persists elsewhere. The providers.md/auth.md conceptual pages describe BYOK semantics but do not enumerate routes, so they need no change.
Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Copilot is always BYOK, so requests use the end user's provider credential rather than a shared centralized credential. Restricting Copilot passthrough to an explicit route allowlist does not provide the same security benefit as it does for centralized providers and causes new Copilot endpoints to fail until they are added manually.
Allow all non-bridged Copilot routes to pass through to the configured upstream. More specific bridged inference routes continue to take precedence.
Changes
Related to #28494
Related to internal Slack thread.
Note
Generated by Coder Agents on behalf of @ssncferreira.