litellm - ✅(Solved) Fix [Feature]: Add support for configurable GitHub Copilot endpoints [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#25914Fetched 2026-04-17 08:28:11
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×2closed ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #25915: Add capability to override default GitHub Copilot authentication endp…

Description (problem / solution / changelog)

Relevant issues

Fixes #25914

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

<!-- Include screenshots, screen recordings, or log output demonstrating that your changes work as expected. For bug fixes: show reproduction before the fix and passing behavior after. For new features: show the feature working end-to-end. For UI changes: include before/after screenshots. -->

Type

<!-- Select the type of Pull Request --> <!-- Keep only the necessary ones -->

🆕 New Feature

Changes

  • Add support for configurable GitHub Copilot endpoints (via environment variables) to allow usage with GitHUb Enterprise subscriptions with custom host (e.g. mycompany.ghe.com) or with self-hosted GitHub instances

Changed files

  • docs/my-website/docs/providers/github_copilot.md (modified, +7/-0)
  • docs/my-website/docs/proxy/config_settings.md (modified, +5/-0)
  • litellm/llms/github_copilot/authenticator.py (modified, +24/-10)
  • litellm/llms/github_copilot/chat/transformation.py (modified, +8/-2)
  • litellm/llms/github_copilot/common_utils.py (modified, +2/-1)
  • litellm/llms/github_copilot/embedding/transformation.py (modified, +11/-5)
  • litellm/llms/github_copilot/responses/transformation.py (modified, +11/-11)
  • tests/test_litellm/llms/github_copilot/test_github_copilot_authenticator.py (modified, +62/-0)
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

Add the capability to override the standard GitHub Copilot authentication endpoints (https://api.githubcopilot.com, https://github.com/login/device/code and so on) to allow login against custom GitHub Enterprise hosts or self-hosted GitHub instances.

Motivation, pitch

I'm trying to use LiteLLM to authenticate with an existing Copilot subscription in a GitHub Enterprise account, which uses a custom endpoint (mycompany.ghe.com), and so requires a custom Copilot authentication endpoint, too.

Currently, LiteLLM uses hardcoded API endpoints for authentication, which makes impossible to authenticate on such subscription. This issue was partialy addressed by #12726, but it does not solve the initial authentication problem.

What part of LiteLLM is this about?

Proxy

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

extent analysis

TL;DR

To authenticate with a custom GitHub Enterprise host, override the standard GitHub Copilot authentication endpoints in LiteLLM.

Guidance

  • Identify the hardcoded API endpoints in LiteLLM's Proxy component that need to be overridden for custom authentication.
  • Determine the custom endpoint URLs required for the GitHub Enterprise host (e.g., mycompany.ghe.com).
  • Consider modifying the LiteLLM configuration or code to accept custom endpoint overrides, potentially building upon the partial solution in #12726.
  • Verify that the custom endpoints are correctly configured and functional before attempting authentication.

Example

No code snippet is provided due to lack of specific implementation details.

Notes

The solution may require modifications to LiteLLM's internal architecture or configuration, which could introduce compatibility issues or affect other features.

Recommendation

Apply a workaround by modifying LiteLLM's configuration or code to accept custom endpoint overrides, as a fixed version is not explicitly mentioned.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - ✅(Solved) Fix [Feature]: Add support for configurable GitHub Copilot endpoints [1 pull requests, 1 participants]