GitLab Duo - Help with git commands - Permission error - 400 Bad request AI features are not enabled or resource is not permitted to be sent
Checklist
-
I'm using the latest version of the extension (Run glab --version)- Extension version: Put your extension version here
-
Operating system and version: macos and ubuntu 22.04 -
Gitlab.com or self-managed instance? gitlab.com -
GitLab version (if self-managed) GitLab version here (Use the versionendpoint, like this: gitlab.my-company.com/api/v4/version) -
I have performed glab auth statusto check for authentication issues
❯ glab auth status
gitlab.com
✓ Logged in to gitlab.com as sylvain.senechal (/home/user/.config/glab-cli/config.yml)
✓ Git operations for gitlab.com configured to use https protocol.
✓ API calls for gitlab.com are made over https protocol
✓ REST API Endpoint: https://gitlab.com/api/v4/
✓ GraphQL Endpoint: https://gitlab.com/api/graphql/
✓ Token: **************************
! Invalid token provided
Other users experimenting the same issue with a valid token
Summary
- Getting the following error when asking for AI-generated suggestions
❯ glab ask git commits history command
Error: API is unreachable error=POST https://gitlab.com/api/v4/ai/llm/git_command: 400 {message: 400 Bad request - AI features are not enabled or resource is not permitted to be sent.}
Environment
- OS: MacOS or ubuntu 22.04
- SHELL: zsh
- TERM:
- GLAB: 1.40
Other:
Steps to reproduce
- Installed glab successfully
- Authenticated with GitLab successfully
❯ glab auth login
? What GitLab instance do you want to log into? gitlab.com
- Logging into gitlab.com
? You''re already logged into gitlab.com as REDACTED. Do you want to re-authenticate? Yes
? How would you like to sign in? Web
? Choose default git protocol HTTPS
? Authenticate Git with your GitLab credentials? Yes
- glab config set -h gitlab.com git_protocol https
✓ Configured git protocol
- glab config set -h gitlab.com api_protocol https
✓ Configured API protocol
✓ Logged in as REDACTED