Skip to content

docs: document GitHub Copilot bring-your-own-token setup#51

Merged
yuanhao merged 1 commit into
mainfrom
docs/copilot-byo-token
Jul 1, 2026
Merged

docs: document GitHub Copilot bring-your-own-token setup#51
yuanhao merged 1 commit into
mainfrom
docs/copilot-byo-token

Conversation

@yuanhao

@yuanhao yuanhao commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Documents how to use GitHub Copilot models via the existing OpenAiCompatProvider. Copilot's chat endpoint is OpenAI Chat Completions–shaped, so it works with ModelConfig::openai_compat given the right base URL, integration headers, and a valid Copilot token as the API key.

Docs-only — no code changes. Added a "GitHub Copilot (bring-your-own-token)" section to docs/providers/openai-compat.md covering:

  • A prominent terms-of-service caveatapi.githubcopilot.com is intended for official Copilot editor integrations; third-party use is against GitHub's terms. yoagent deliberately does not ship a first-class Copilot preset.
  • The openai_compat config plus required Copilot-Integration-Id / Editor-Version headers.
  • A note that the API key is a short-lived (~25–30 min) exchanged Copilot token, and since yoagent has no built-in credential refresh, the caller must refresh it themselves for long runs.

Not added to the first-class provider lists in overview.md / model-presets.md, since it is explicitly unsupported.

Context

Follow-up to a review of whether yoagent can support Copilot models. Conclusion: technically feasible via bring-your-own-token, but not worth first-class support given the ToS exposure to users.

🤖 Generated with Claude Code

Copilot's chat endpoint is OpenAI-compatible, so it works with
OpenAiCompatProvider given the right base URL, integration headers, and a
valid Copilot token as the API key. Documented under the OpenAI-compat
provider with a prominent terms-of-service caveat and a note that the
short-lived Copilot token must be refreshed by the caller (no built-in
credential refresh). No code changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yuanhao yuanhao merged commit d1a1a11 into main Jul 1, 2026
1 check passed
@yuanhao yuanhao deleted the docs/copilot-byo-token branch July 1, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant