Skip to content

fix: resolve OpenAI Compatible embedder provider save validation issue #5843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

roomote[bot]
Copy link

@roomote roomote bot commented Jul 17, 2025

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

  • Fixed the validation data preparation logic to properly convert string inputs to numbers for the model dimension field
  • Ensured that validation errors are properly displayed to users when required fields are missing or invalid
  • The validation schema now correctly handles the required model dimension field for OpenAI Compatible provider

Testing

  • Verified that the Save button now works correctly for OpenAI Compatible provider
  • Confirmed that validation errors are properly displayed when required fields are missing
  • Ensured that other embedder providers (OpenAI, Ollama, Gemini) continue to work as expected

Fixes #5842


Important

Fixes save button issue for OpenAI Compatible provider in CodeIndexPopover.tsx by correcting validation logic and ensuring error display.

  • Behavior:
    • Fixes save button issue for OpenAI Compatible provider in CodeIndexPopover.tsx by correcting validation logic.
    • Converts codebaseIndexEmbedderModelDimension from string to number for validation.
    • Displays validation errors for missing or invalid fields.
  • Validation:
    • Updates validation schema in createValidationSchema() to handle codebaseIndexEmbedderModelDimension as a required number for OpenAI Compatible provider.
  • Testing:
    • Verified save functionality and error display for OpenAI Compatible provider.
    • Ensured other providers (OpenAI, Ollama, Gemini) function correctly.

This description was created by Ellipsis for a4907b6. You can customize this summary. It will automatically update as commits are pushed.

- Fix validation schema for OpenAI Compatible provider to properly handle model dimension field
- Improve validation data preparation to ensure numeric fields are properly converted
- Ensure validation errors are displayed to users when required fields are missing
- Resolves issue where Save button would not work for OpenAI Compatible provider

Fixes #5842
@roomote roomote bot requested review from mrubens, cte and jr as code owners July 17, 2025 20:57
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Jul 17, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 17, 2025
@daniel-lxs daniel-lxs moved this from Triage to Roomote/renovate BOT in Roo Code Roadmap Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Roomote/renovate BOT
Development

Successfully merging this pull request may close these issues.

Codebase Indexing: Cannot save when selecting "OpenAI Compatible" Embedder Provider
2 participants