Skip to content

Copilot Chat - "Unauthorized" Error #1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ThomasCode92 opened this issue Mar 24, 2025 · 8 comments
Closed

Copilot Chat - "Unauthorized" Error #1052

ThomasCode92 opened this issue Mar 24, 2025 · 8 comments
Labels
question Further information is requested

Comments

@ThomasCode92
Copy link

I'm trying to use Copilot Chat but keep getting the following error:

Failed to get response: {
  "error": {
    "code": "unauthorized",
    "message": "Your account type is not currently supported",
    "details": "Your account type is not currently supported"
  }
}

I have access to Copilot through my work organization, and Copilot Chat in the IDE is enabled.
Image
When using Copilot Chat in VS Code with the same credentials, it just works fine.

Has anyone encountered this issue before or know how to resolve it?

Screenshot from within Neovim
Image
Image

@deathbeam
Copy link
Collaborator

Are you using copilot.vim? And can you try logging out from it and then deleting json files in ~/.config/github-copilot?

@deathbeam deathbeam added the question Further information is requested label Mar 25, 2025
@ThomasCode92
Copy link
Author

I use LazyVim with the Copilot and Copilot Chat Extras,
I deleted the ~/.config/github-copilot folder and logged back in, but got the same error.

@deathbeam
Copy link
Collaborator

Can you show the output of :CopilotChatModels? and check if your selected model is not using github models provider maybe

@ThomasCode92
Copy link
Author

This is the output for :CopilotChagModels filtered by github_models.

Image

@deathbeam
Copy link
Collaborator

deathbeam commented Mar 25, 2025

Alright so you have gpt-4o selected on github_models, disable the github_models provider or use model that is for regular copilot. Example on how to disable github models: https://github.com/deathbeam/dotfiles/blob/master/nvim/.config/nvim/lua/config/copilot.lua#L146

Also make sure your plugin is up to date

@ThomasCode92
Copy link
Author

ThomasCode92 commented Mar 25, 2025

@deathbeam Switching to a non github_models model (gpt-4o) works!
What is the difference between copilot anb github_models, if I may ask?

@deathbeam
Copy link
Collaborator

@deathbeam Switching to a non github_models model (gpt-4o) works! What is the difference between just github anb github_models, if I may ask?

github_models is coming from marketplace, its just models hosted on azure with some limits. And they break when you try to use organization copilot subscription looks like, you arent first person this happened to. I will probably filter out gpt-4o from there as this name conflict is fairly annoying

deathbeam added a commit to deathbeam/CopilotChat.nvim that referenced this issue Mar 25, 2025
Update model selection logic to use model names with versioning instead
of just IDs. This improves user experience by showing more descriptive
model names in the selection UI and ensures the latest version of each
model is preferred when filtering available models.

Also updates the default model to the latest gpt-4o-2024-11-20 version.

Related CopilotC-Nvim#1052 (comment)
deathbeam added a commit that referenced this issue Mar 25, 2025
Update model selection logic to use model names with versioning instead
of just IDs. This improves user experience by showing more descriptive
model names in the selection UI and ensures the latest version of each
model is preferred when filtering available models.

Also updates the default model to the latest gpt-4o-2024-11-20 version.

Related #1052 (comment)
@deathbeam
Copy link
Collaborator

I switched the default model to latest gpt-4o one and also improved the listing by a bit so should be better in future hopefully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants