Error fetching code completions in VS Code

I don’t know if this is the place to post this, but as I try to use the code completion feature from the GitLab extension for VS Code I get following error:

  AI Assist: Error fetching completions: Error: Fetching resource from https://gitlab.com/api/v4/code_suggestions/completions failed

Any ideas on how to debug this?

Might be a permission issue. Suggest trying the steps in the troubleshooting docs.

Even with these troubleshooting measures, I am getting this error: “AI Assist: Error fetching completions: Error: Fetching resource from https://gitlab.com/api/v4/code_suggestions/tokens failed”

Please share the output from https://gitlab.com/api/v4/ml/ai-assist and also the extension debug log entries, after following these steps.

Output from the link: “{“message”:“404 Not Found”}”

Extension debug logs:

2023-09-07T22:18:30:117 [debug]: Disabling code completion

2023-09-07T22:18:31:238 [debug]: Enabling code completion

2023-09-07T22:18:31:238 [debug]: AI Assist: Using server: https://codesuggestions.gitlab.com/v2/completions

2023-09-07T22:18:31:291 [debug]: Using non-expired account https://gitlab.com|3670180.

2023-09-07T22:18:31:831 [debug]: fetch: request to https://gitlab.com/api/v4/version returned HTTP 200 after 539 ms

2023-09-07T22:18:36:117 [debug]: Telemetry: Reject all opened suggestions

2023-09-07T22:18:36:619 [debug]: Telemetry: Received request to create a new suggestion

2023-09-07T22:18:36:619 [debug]: Telemetry: Reject all opened suggestions

2023-09-07T22:18:36:620 [debug]: Telemetry: Sending event for suggestion 9215f841-f942-48af-a05c-c947698bdbbb

2023-09-07T22:18:36:625 [debug]: Telemetry: New suggestion 9215f841-f942-48af-a05c-c947698bdbbb has been requested

2023-09-07T22:18:36:627 [debug]: AI Assist: fetching completions … (telemetry: )

2023-09-07T22:18:36:627 [debug]: AI Assist: fetching completions via monolith…

2023-09-07T22:18:36:628 [debug]: Using non-expired account https://gitlab.com|3670180.

2023-09-07T22:18:37:767 [debug]: fetch: request to https://gitlab.com/api/v4/code_suggestions/completions returned HTTP 403 after 1136 ms

2023-09-07T22:18:37:774 [debug]: Using non-expired account https://gitlab.com|3670180.

2023-09-07T22:18:38:137 [debug]: fetch: request to https://gitlab.com/api/v4/code_suggestions/tokens returned HTTP 403 after 361 ms

2023-09-07T22:18:38:145 [error]: AI Assist: Error fetching completions: Error: Fetching resource from https://gitlab.com/api/v4/code_suggestions/tokens failed

2023-09-07T22:18:38:146 [debug]: Telemetry: Transist 9215f841-f942-48af-a05c-c947698bdbbb to suggestion_error

2023-09-07T22:18:38:146 [debug]: Telemetry: Sending event for suggestion 9215f841-f942-48af-a05c-c947698bdbbb

2023-09-07T22:18:38:146 [debug]: Telemetry: 9215f841-f942-48af-a05c-c947698bdbbb transisted from suggestion_requested to suggestion_error

2023-09-07T22:18:43:310 [debug]: Using non-expired account https://gitlab.com|3670180.

2023-09-07T22:18:43:907 [debug]: fetch: request to https://gitlab.com/api/v4/version returned HTTP 200 after 595 ms

VS Code version: v1.81.1

Gitlab workflow extension version: v3.76.1