fix: resolve OpenAI Compatible embedder provider save validation issue #5843
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.
This PR fixes the issue where the Save button would not work when configuring the OpenAI Compatible embedder provider in the Code Indexing settings.
Problem
Users reported that when trying to configure the "OpenAI Compatible" embedder provider, the Save button would not work. The user could fill in all required fields (Base URL, API Key, Model, Dimensions) but clicking Save would do nothing - no error message was shown and the settings were not saved.
Root Cause
The validation schema for the OpenAI Compatible provider required the
codebaseIndexEmbedderModelDimension
field to be a number ≥ 1, but the validation data preparation logic was not properly handling the conversion of string input values to numbers, causing validation to fail silently.Solution
Testing
Fixes #5842
Important
Fixes save button issue for OpenAI Compatible provider in
CodeIndexPopover.tsx
by correcting validation logic and ensuring error display.CodeIndexPopover.tsx
by correcting validation logic.codebaseIndexEmbedderModelDimension
from string to number for validation.createValidationSchema()
to handlecodebaseIndexEmbedderModelDimension
as a required number for OpenAI Compatible provider.This description was created by
for a4907b6. You can customize this summary. It will automatically update as commits are pushed.