Fix error in FeatureSetting decorator when model_definitions is nil

What does this MR do and why?

aiChatAvailableModels query, which returns available models for user-level model selection, returns an Internal Server Error for offline licenses due to this line. FetchModelDefinitionsService returns nil for offline licenses, so the decorator's feature_data method calls model_definitions['unit_primitives'] on nil, raising a NoMethodError.

References

Resolves [IDE] aiChatAvailableModels query from LS retur... (#596569 - closed)

Screenshots or screen recordings

Offline license:

Before After
before after

No regressions on user-level model selection

Web IDE
Screenshot_2026-04-17_at_5.01.48_PM Screenshot_2026-04-17_at_5.03.13_PM

How to set up and validate locally

Prerequisites:

  • Offline license with DAP self-hosted add-on and an online license, you can use the ones here.
  • GitLab Workflow extension installed in your VSCode
  • Setup GitLab authentication with your instance:
    • Open the command palette (Cmd+Shift+P) > type in GitLab: Authenticate
    • Manually enter instance URL > Enter your instance URL
    • Select Create a token
    • Ensure the account you just authenticated with is selected.

Steps:

  • Run GDK on SM mode: GITLAB_SIMULATE_SAAS=0 gdk start
  • Clone a project and open in VSCode
  • Open agentic chat
  • Observe no error message returned

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Cindy Halim

Merge request reports

Loading