feat: add support for copilot provider (#8577)

* feat: add support for copilot provider

* test: add tests for github copilot

* chore: clean up github copilot authenticator

* test: add test for github copilot authenticator

* test: add test for github copilot for sonnet 3.7 thought model

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
This commit is contained in:
Son H. Nguyen 2025-03-06 06:44:13 +07:00 committed by GitHub
parent 312286c588
commit 7ccccff39a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 801 additions and 4 deletions

View file

@ -79,6 +79,7 @@ LITELLM_CHAT_PROVIDERS = [
"hosted_vllm",
"lm_studio",
"galadriel",
"github_copilot", # GitHub Copilot Chat API
]
@ -138,7 +139,7 @@ openai_compatible_endpoints: List = [
"https://api.friendli.ai/serverless/v1",
"api.sambanova.ai/v1",
"api.x.ai/v1",
"api.galadriel.ai/v1",
"api.galadriel.ai/v1"
]
@ -168,6 +169,7 @@ openai_compatible_providers: List = [
"hosted_vllm",
"lm_studio",
"galadriel",
"github_copilot", # GitHub Copilot Chat API
]
openai_text_completion_compatible_providers: List = (
[ # providers that support `/v1/completions`