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 |
|---|---|
![]() |
![]() |
No regressions on user-level model selection
| Web | IDE |
|---|---|
![]() |
![]() |
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.
- Open the command palette (Cmd+Shift+P) > type in
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



