# GitHub Copilot

You can follow the steps given below to configure GitHub Copilot to enable yCrash AI features


# Step 1: Get a GitHub Token with Copilot Access

Create a GitHub token for the shared Copilot seat. Supported token types:

Token prefix Supported
gho_ (OAuth access token) Yes
ghu_ (user-to-server token) Yes
github_pat_ (fine-grained PAT with Copilot access) Yes - sent directly to the Copilot API (no session-token exchange)
ghp_ (classic PAT) No

Store the token in a secrets manager or restricted server directory. Treat it like a password - do not email it, commit it to Git, or share it in tickets.


# Step 2: Add the Copilot Settings

Paste the following JSON into ycbuddy-config.json and replace your-github-token-with-copilot with the token from Step 1:

{
  "llmProvider": "copilot",
  "llmApiKey": "your-github-token-with-copilot",
  "llmModelName": "gpt-4o",
  "llmEmbeddingModelName": "local-all-minilm-l6-v2-q",
  "llmMaxOutputTokens": 4096
}
1
2
3
4
5
6
7
Field Required Notes
llmProvider Yes Must be "copilot"
llmApiKey Yes GitHub token for the shared Copilot seat (gho_, ghu_, or fine-grained github_pat_ with Copilot access). You can also set LLM_API_KEY, COPILOT_GITHUB_TOKEN, or GH_TOKEN.
llmModelName Yes Copilot-hosted model id (e.g. gpt-4o, gpt-4.1). Availability depends on the Copilot plan.
llmEmbeddingModelName Yes Prefer local-all-minilm-l6-v2-q so RAG does not need a separate Gemini/OpenAI embedding key.
llmMaxOutputTokens No Soft cap on completion tokens (default 4096)
llmEndpoint No Optional Copilot API base override (defaults to https://api.githubcopilot.com, or the endpoint returned by token exchange).

Notes:

  • Copilot has no provider Files API. Chat attachments are stored locally (LOCAL_ONLY) and included in chat via existing context extraction.
  • Place the ycbuddy-config.json file and restart the yCrash Server as mentioned in Step#3

# Step 3: Place the File and Restart

Place ycbuddy-config.json in the yCrash upload directory (opens new window) and restart the yCrash server.

Note:

Note: To check whether LLM configuration took effect successfully, refer here.


# Troubleshooting

Symptom Likely cause
Log: Unsupported LLM provider Typo in llmProvider (must be exactly copilot)
Auth / token exchange failures Classic ghp_ PAT used (not supported); token missing Copilot access; or Copilot subscription inactive
403 from Copilot API Shared seat has no Copilot license, or the token scopes do not include Copilot

Also confirm:

  • llmProvider is "copilot" (lowercase)
  • Token is gho_, ghu_, or github_pat_ - not ghp_
  • Outbound HTTPS from the yCrash server to GitHub Copilot is allowed (api.githubcopilot.com)

If you LLM setup still fails, check the documentation here or reach our support team (opens new window).