Repository navigation
fix(gpui): keep a typed AI Core deployment mapping on save - #233
Merged
Merged
Conversation
A model-to-deployment mapping becomes part of the AI Core provider form only when its add button is clicked. A mapping typed into the add row and saved right away was dropped without notice, and the form closes on save, so the loss showed only when the provider was opened again. Saving now includes a fully typed add row (model ID and deployment ID) unless a mapping for that model already exists.
stippi
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the AI Core provider form, a model-to-deployment mapping is only added to the form once its add button is clicked. If you fill in the add row (model ID, deployment ID, API type) and press Save straight away, the mapping is silently dropped. The form closes on save, so you only notice when you open the provider again.
Change
AiCoreProviderForm::to_config_jsonnow also saves a fully filled add row (model ID and deployment ID, trimmed) with its selected API type, unless a mapping for that model already exists in the list.Tests
a_mapping_typed_but_not_added_is_saved: a filled add row ends up inmodelswith its deployment and API type.an_added_mapping_wins_over_the_add_row: a row for a model that is already mapped doesn't replace the existing mapping.