Skip to content

Commit 337c229

Browse files
authored
Merge pull request #164 from dotnet-presentations/copilot/fix-9d6d48ce-ec6b-4e82-aace-762786ecbe34
Update GitHub Models token guidance to use fine-grained tokens with read-only Models permission
2 parents 557c2a2 + 3fcc6f8 commit 337c229

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

Part 2 - Project Creation/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,14 @@ For GitHub Models to work, you need to set up a connection string with a GitHub
143143
> **Note:** This step requires a GitHub account. If you don't have one yet, please follow the instructions in [Part 1: Setup](../Part%201%20-%20Setup/README.md#step-2-create-a-github-account-if-needed) to create a GitHub account.
144144
145145
1. Create a GitHub token for accessing GitHub Models:
146-
- Go to [https://github.com/settings/tokens](https://github.com/settings/tokens)
147-
- Click "Generate new token (classic)"
148-
- Give the token a description like "AI Models Access"
149-
- Click "Generate token"
146+
- Go to [https://github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new)
147+
- Click "Generate new token" (fine-grained token)
148+
- Enter a name for the token, such as "AI Models Access"
149+
- Under **Permissions**, set **Models** to **Access: Read-only**
150+
- Click "Generate token" at the bottom of the page
150151
- Copy the generated token (you won't be able to see it again)
151152

152-
> **Note**: We're using classic tokens for simplicity. If you prefer fine-grained tokens, you'll need to specify the `models:read` scope. See the [GitHub Models announcement](https://github.blog/changelog/2025-05-15-modelsread-now-required-for-github-models-access/) for more details.
153+
> **Note**: For additional guidance on configuring GitHub Models access, see the [Microsoft documentation quickstart](https://learn.microsoft.com/en-us/dotnet/ai/quickstarts/ai-templates?tabs=dotnet-cli%2Cconfigure-visual-studio%2Cconfigure-visual-studio-aspire&pivots=github-models#configure-access-to-github-models).
153154
154155
1. In the Solution Explorer, right-click on the `GenAiLab.AppHost` project and select "Manage User Secrets"
155156

@@ -165,8 +166,6 @@ For GitHub Models to work, you need to set up a connection string with a GitHub
165166

166167
1. Save the `secrets.json` file.
167168

168-
> **Note:** GitHub Models now use the endpoint `models.github.ai`. While the previous endpoint `models.inference.ai.azure.com` is [still supported until October 2025](https://github.blog/changelog/2025-07-17-deprecation-of-azure-endpoint-for-github-models/), it's best to use the new endpoint now.
169-
170169
## Run the application
171170

172171
Now let's run the application and explore its features:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ cd ai-workshop
198198

199199
This script will prompt you for:
200200

201-
- **GitHub Token**: For GitHub Models access (classic token or fine-grained with `models:read` scope)
201+
- **GitHub Token**: For GitHub Models access (fine-grained token with **Models: Read-only** permission)
202202
- **Azure OpenAI Endpoint**: Your Azure OpenAI service endpoint URL
203203
- **Azure OpenAI Key**: Your Azure OpenAI service API key
204204

0 commit comments

Comments
 (0)