Add ai_settings table
What does this MR do and why?
- This is an alternative to using the application settings table but will be used for application-wide settings for Duo
- #473143 (closed)
Changelog: added
References
Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
Originally implemented as part of the application_settings table here: !166691 (closed) but decided it should be its own table.
Also related to larger AI Settings vision: https://gitlab.com/gitlab-org/gitlab/-/issues/426891#note_2199822564
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Confirmed locally that with the setting updated, Chat still work! (instructions below)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Set up Duo Chat in your GDK: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitlab_ai_gateway.md
- In rails console, set the Application Settings value to the URL of the local AI Gateway (below command uses default URL of locally hosted AI Gateway, but yours might be different if you've configured it to live elsewhere)
Ai::Setting.instance.update!(ai_gateway_url:"http://0.0.0.0:5052") - Test that Duo Chat still works by visiting a Duo-enabled group and selecting the Duo Chat button