Rake task gitlab:duo:verify_self_hosted_setup returns 404 for endpoint URLs

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When running gitlab-rake gitlab:duo:verify_self_hosted_setup, the check returns 404 for request_flow tests.

It seems this is becuase we add an extra v1 to the endpoint URL: https://gitlab.com/gitlab-org/gitlab/-/blob/a713f6a070d839c4b00f7633766784d988cb0652/ee/lib/gitlab/duo/administration/verify_self_hosted_setup.rb#L363 .

Steps to reproduce

Configure Duo with self-hoted models and run gitlab:duo:verify_self_hosted_setup.

Example Project

NA

What is the current bug behavior?

Check targets wrong url and returns 404.

What is the expected correct behavior?

Check should target the correct URL.

Relevant logs and/or screenshots

"request_flow": {
    "status": "ERROR",
    "models_tested": 3,
    "model_tests": [
      {
        "model_id": 1,
        "model_name": "Codestral-22B-v0.1",
        "status": "WARNING",
        "endpoint": "http://x.x.x.x:8100/v1/v1/models",
        "http_code": 404,
        "response_time_ms": 25.89,
        "response_size": 22,
        "has_auth": false
      },
      {
        "model_id": 3,
        "model_name": "Llama-3.3-70B-Instruct-FP8-dynamic",
        "status": "WARNING",
        "endpoint": "http://x.x.x.x:8100/v1/v1/models",
        "http_code": 404,
        "response_time_ms": 24.62,
        "response_size": 22,
        "has_auth": false
      },
      {
        "model_id": 4,
        "model_name": "GPT-OSS-120b",
        "status": "WARNING",
        "endpoint": "http://x.x.x.x:8100/v1/v1/models",
        "http_code": 404,
        "response_time_ms": 24.85,
        "response_size": 22,
        "has_auth": false
      }

Output of checks

Happens with GitLab 18.5.2.

Results of GitLab environment info

Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Patch release information for backports

If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.

Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.

High-severity bug remediation

To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.

Edited by 🤖 GitLab Bot 🤖