- Set up your local GitLab instance
- Configure self-hosted models
- Configure features to use AI vendor models
Setting up local development
Set up your local GitLab instance
- Configure GDK to set up Duo Features in the local environment
-
For GitLab Rails, enable
ai_custom_model
feature flag:Feature.enable(:ai_custom_model)
- For AI Gateway:
- Set
AIGW_CUSTOM_MODELS__ENABLED=True
- Set
AIGW_AUTH__BYPASS_EXTERNAL=False
orAIGW_GITLAB_URL=<your-gitlab-instance>
- Run
gitlab:duo:verify_self_hosted_setup
task to verify the setup
Configure self-hosted models
- Follow the instructions to configure self-hosted models
- Follow the instructions to configure features to use the models
AI-powered features are now powered by self-hosted models.
Configure features to use AI vendor models
After adding support for configuring features to either use self-hosted models for AI Vendor, setting CLOUD_CONNECTOR_SELF_SIGN_TOKENS
is no longer necessary for the customers. But it is harder for developers to configure the features to use AI vendored because we still want to send all requests to the local AI Gateway instead of Cloud Connector.
Setting CLOUD_CONNECTOR_BASE_URL
is not sufficient because we add /ai
suffix to it.
Currently, there are the following workarounds:
- Verify that
CLOUD_CONNECTOR_SELF_SIGN_TOKENS=1
- Remove
ai_feature_settings
record responsible to the configuration to fallback to usingAI_GATEWAY_URL
as Cloud Connector URL:
Ai::FeatureSetting.find_by(feature: :duo_chat).destroy!