🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

feat: support Anthropic /v1/messages route on Copilot - #26911

Merged
dannykopping merged 2 commits into
mainfrom
dk/copilot-messages-support
Jul 1, 2026
Merged

feat: support Anthropic /v1/messages route on Copilot#26911
dannykopping merged 2 commits into
mainfrom
dk/copilot-messages-support

Conversation

@dannykopping

@dannykopping dannykopping commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Implements AIGOV-481. Adds the Anthropic-style /v1/messages route to the Copilot provider.

GitHub Copilot CLI (1.0.65) using the default Claude Sonnet 4.6 (default) model sends Anthropic-style /v1/messages requests through aibridgeproxyd to the Copilot provider. The provider only registered the OpenAI-compatible /chat/completions and /responses routes, so these requests failed:

CAPIError: 404 404 404 route not supported: POST /copilot/v1/messages

This PR was produced by opencode (agent) using the anthropic/claude-opus-4-8 model, under human direction and review.

GitHub Copilot CLI targeting Claude models sends Anthropic-style
/v1/messages requests. The Copilot provider only registered the
OpenAI-compatible /chat/completions and /responses routes, so these
requests failed with "route not supported: POST /copilot/v1/messages".

Register /v1/messages as a bridged route and reuse the existing
intercept/messages logic to handle it. Copilot is BYOK with no Bedrock
backing, so the per-user bearer token flows through unchanged.
@linear-code

linear-code Bot commented Jul 1, 2026

Copy link
Copy Markdown

AIGOV-481

@dannykopping dannykopping changed the title feat(aibridge/provider): support Anthropic /v1/messages route on Copilot feat: support Anthropic /v1/messages route on Copilot Jul 1, 2026

@dannykopping dannykopping left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review: ✅

@dannykopping
dannykopping marked this pull request as ready for review July 1, 2026 09:14
@dannykopping
dannykopping requested a review from ssncferreira July 1, 2026 09:14

@ssncferreira ssncferreira left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Comment thread aibridge/provider/copilot_internal_test.go Outdated
The Authorization check in CreateInterceptor runs before route
dispatch and is route-independent, so it is already covered by the
existing MissingAuthorizationHeader test.
@dannykopping
dannykopping enabled auto-merge (squash) July 1, 2026 12:07
@dannykopping
dannykopping merged commit cf75dd0 into main Jul 1, 2026
28 of 29 checks passed
@dannykopping
dannykopping deleted the dk/copilot-messages-support branch July 1, 2026 12:16
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants