MCPcopy Create free account
hub / github.com/BerriAI/litellm / github_api_headers

Function github_api_headers

litellm/llms/github_copilot/authenticator.py:109–122  ·  view source on GitHub ↗
(
    access_token: str | None = None,
)

Source from the content-addressed store, hash-verified

107
108
109def github_api_headers(
110 access_token: str | None = None,
111) -> dict[str, str]: # mutable-ok: returned straight into httpx handlers whose headers params require dict
112 headers: Final = {
113 "accept": "application/json",
114 "editor-version": "vscode/1.85.1",
115 "editor-plugin-version": "copilot/1.155.0",
116 "user-agent": "GithubCopilot/1.155.0",
117 "accept-encoding": "gzip,deflate,br",
118 "content-type": "application/json",
119 }
120 if access_token:
121 headers["authorization"] = f"token {access_token}"
122 return headers
123
124
125class Authenticator:

Calls

no outgoing calls