Refactor model selection mapping logic and GraphQL queries
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Follow-up for MR !215509 (merged) (discussion: !215509 (comment 2947727012))
Summary: The MR adds cost indicators to models but does not add costIndicator to the defaultModel as done in other queries. This is currently non-blocking because values come from selectableModels during mapping, but it's an inconsistency with the other model selection queries and a potential future pitfall.
Proposed work:
- Investigate why defaultModel was not updated in ee/app/assets/javascripts/ai/graphql/get_ai_chat_available_models.query.graphql
- Align behavior with other queries by adding costIndicator to defaultModel if appropriate
- Make the mapping logic for model selection data more consistent across all the areas it is used in
Reference MR: !215509 (merged) Discussion note: !215509 (comment 2947727012)
Edited by Julie Huang