Sycophant.Auth.GithubCopilot
(sycophant v0.4.2)
Copy Markdown
Authentication strategy for GitHub Copilot.
Supports two credential modes:
Managed — caller supplies
:github_token(OAuth token or PAT). The strategy exchanges it for a short-lived Copilot token viaSycophant.Auth.GithubCopilot.TokenCacheand surfaces:base_urland:copilot_tokenback into the credential map.Escape hatch — caller supplies an already-exchanged
:copilot_token. No exchange happens; the base URL falls back to:base_urlfrom credentials, then to a hardcoded constant.
Editor identity headers (copilot-integration-id, editor-version,
editor-plugin-version, user-agent) gate which models Copilot exposes.
Defaults match the VS Code Copilot Chat extension. Override via the
credential map.