[Question / Potential bug] Inconsistent models listing with Microsoft Agent Framework (.NET) + Copilot SDK
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- api, authentication, developer-experience
Research direction
Start with the CopilotClientOptions setup, the Auth Device Flow, and the ListModelsAsync call described in the issue. Reproduce the result with the listed NuGet packages and compare the CLI builds 0.0.403 and 1.0.14. Done means determining whether the token or CLI version explains the model-list difference and documenting the expected behavior.
Written by the indexing model from the issue text.
Description
Hi,
I've added an integration with Microsoft Agent Framework (.NET) inside a WinForms application and I've experienced inconsistent listing of CopilotClient models using the ListModelsAsync function.
Context
I'm using a GH user that was invited to a GH organization which got assigned a Copilot seat. I have a suspicion that the models (1 model only: gpt-4.1) returned are from my regular GH user which has no Copilot seat/license assigned to it.
OS
Windows
NuGet Packages
- Microsoft.Agents.AI (1.0.0)
- Microsoft.Agents.AI.GitHub.Copilot (1.0.0-preview.260402.1)
- GitHub.Copilot.SDK (0.2.1)
How I achieve getting wrong list of models
- Start and complete the Auth Device Flow with GH using the GH Copilot public client ID to obtain a GH token
- Store the valid GH token
- Create a
CopilotClientwithCopilotClientOptions(GithubToken,UseLoggedInUser = false) and start it. - Obtain the list of models by calling
await client.ListModelsAsync() - Only
gpt-4.1is returned, expected the same models available through VS Code.
Questions
- Am I using the correct auth flow to get the proper GH token which has access to the Copilot seat assigned from my organization?
- Is there ways to call an HTTP endpoint in order to get the list of models instead of instanciating a CopilotClient. I have seen that VS Code codebase calls
https://api.github.com/copilot_internal/*endpoints which I've read would be against ToS to call.
Maybe a bug maybe not...
A colleague found an interesting route that could maybe explain the 1 model returned. When the CLI gets launched with --no-auto-update it picks up an old version in his C:/users/[username]/.copilot\pkg\win32-x64\0.0.403. When the parameter --no-auto-update isn't there it picks up this version C:\Users\[username]\.copilot\pkg\universal\1.0.14. He tested it manually by launching the CLI from the bundled copilot.exe inside our WinForm app with PowerShell and he was able to reproduce the same error which resulted in only getting 1 model (gpt-4.1) returned.
- Dominant language
- Java
- Stars
- 10.5k
- Forks
- 1.5k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 130
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/copilot-sdk
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2760 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2759 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/copilot-sdk#2709 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
github/copilot-sdk#2673 ·
All issues in github/copilot-sdk
Similar issues
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1152 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·