Skip to content

[BUG FIX] Clear self_hosted_model_id on feature setting when disabling the feature

What does this MR do and why?

When a FeatureSetting is disabled, the :ai_self_hosted_model_id needs to be cleared from the record so that the self-hosted model that is potentially set before it is not associated any longer. Currently if a self_hosted_model_id is nil, then it is removed from the resolver params and not passed on to the update service, meaning the field doesn't get updated.

This MR ensures that the self-hosted model id is always passed to the update service even when it is nil, as this is intentional. This MR also syncs the naming of the backend and frontend arguments so it no longer needs to be renamed in the resolver to match the backend expectation and reducing the complexity.

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Julie Huang

Merge request reports

Loading