Skip to content
Snippets Groups Projects
Commit 2915bb71 authored by Shinya Maeda's avatar Shinya Maeda :two:
Browse files

Support AI Gateway in Rails CI

parent 7bbbc00b
No related branches found
No related tags found
2 merge requests!158455Backport Release Environments notification pipeline change to 16.11,!148508Support AI Gateway in Rails CI
......@@ -305,6 +305,22 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.8
alias: zoekt-ci-image
.ai-gateway-variables:
variables:
AIGW_AUTH__BYPASS_EXTERNAL: True
AIGW_VERTEX_TEXT_MODEL__PROJECT: $VERTEX_AI_PROJECT
AIGW_VERTEX_TEXT_MODEL__JSON_KEY: $VERTEX_AI_CREDENTIALS
AIGW_FASTAPI__DOCS_URL: "/docs"
AIGW_FASTAPI__OPENAPI_URL: "/openapi.json"
AIGW_FASTAPI__API_PORT: 5052
ANTHROPIC_API_KEY: $ANTHROPIC_API_KEY_FOR_SERVICE
# CI_DEBUG_SERVICES: "true" # Enable this variable when you debug ai-gateway boot failure.
.ai-gateway-services:
services:
- name: registry.gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/model-gateway:latest
alias: ai-gateway
.use-pg13:
extends:
- .pg-base-variables
......@@ -359,9 +375,11 @@
extends:
- .use-pg14
- .zoekt-variables
- .ai-gateway-variables
services:
- !reference [.db-services-with-auto-explain, services]
- !reference [.es7-services, services]
- !reference [.ai-gateway-services, services]
.use-pg15-es7-ee:
extends:
......
......@@ -653,6 +653,7 @@ rspec-ee:predictive:trigger:
- .rspec-ee-base-pg14
variables:
REAL_AI_REQUEST: "true"
AI_GATEWAY_URL: http://ai-gateway:5052
rspec-ee unit gitlab-duo-chat-zeroshot pg14:
extends:
......
......@@ -41,12 +41,6 @@
stub_default_url_options(host: "gitlab.com", protocol: "https")
stub_ee_application_setting(should_check_namespace_plan: true)
stub_licensed_features(ai_chat: true, epics: true)
# TODO: We can't run this QA spec with AI Gateway because the service is not available in test jobs.
# See https://gitlab.com/gitlab-org/gitlab/-/issues/434445 for more information.
stub_feature_flags(gitlab_duo_chat_requests_to_ai_gateway: false)
# TODO: Claude 3 only works with AI Gateway, which supports the Anthropic
# Messages API
stub_feature_flags(ai_claude_3_sonnet: false)
end
shared_examples 'the questions are correctly answered' do
......
......@@ -37,9 +37,6 @@
end
before do
# TODO: We can't run this QA spec with AI Gateway because the service is not available in test jobs.
# See https://gitlab.com/gitlab-org/gitlab/-/issues/434445 for more information.
stub_feature_flags(gitlab_duo_chat_requests_to_ai_gateway: false)
stub_licensed_features(ai_chat: true, epics: true)
stub_ee_application_setting(should_check_namespace_plan: true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment