mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
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:
parent
312286c588
commit
7ccccff39a
11 changed files with 801 additions and 4 deletions
38
litellm/llms/github_copilot/constants.py
Normal file
38
litellm/llms/github_copilot/constants.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
"""
|
||||
Constants for Copilot integration
|
||||
"""
|
||||
import os
|
||||
|
||||
# Copilot API endpoints
|
||||
GITHUB_COPILOT_API_BASE = "https://api.github.com/copilot/v1"
|
||||
CHAT_COMPLETION_ENDPOINT = "/chat/completions"
|
||||
|
||||
# Model names
|
||||
GITHUB_COPILOT_MODEL = "gpt-4o" # The model identifier for Copilot
|
||||
|
||||
# Request headers
|
||||
DEFAULT_HEADERS = {
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json",
|
||||
"User-Agent": "litellm",
|
||||
}
|
||||
|
||||
|
||||
class GetDeviceCodeError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class GetAccessTokenError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class APIKeyExpiredError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class RefreshAPIKeyError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class GetAPIKeyError(Exception):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue