lib/gitlab/qa/component/ai_gateway.rb



# frozen_string_literal: true

module Gitlab
  module QA
    module Component
      class AiGateway < Base
        DOCKER_IMAGE = 'registry.gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/model-gateway'
        DOCKER_IMAGE_TAG = 'latest'

        def name
          @name ||= 'ai-gateway'
        end

        def configure_environment(gitlab_hostname:)
          @environment = {
            'GITLAB_URL' => "http://#{gitlab_hostname}",
            'GITLAB_API_URL' => "http://#{gitlab_hostname}/api/v4",
            'CUSTOMER_PORTAL_BASE_URL' => Runtime::Env.customer_portal_url,
            'USE_FAKE_MODELS' => true,
            'USE_LOCAL_CACHE' => true
          }
        end
      end
    end
  end
end