Roo-Code/packages
SannidhyaSah a80795b78d
feat: Add OpenAI Compatible embedder for codebase indexing (#4066)
* feat: Add OpenAI Compatible embedder for codebase indexing

- Implement OpenAiCompatibleEmbedder with batching and retry logic
- Add configuration support for base URL and API key
- Update UI with provider selection and input fields
- Add comprehensive test coverage
- Support for all OpenAI-compatible endpoints (LiteLLM, LMStudio, Ollama, etc.)
- Add internationalization for 17 languages

* fix: Update CodeIndexSettings tests for OpenAI Compatible provider

- Fix field count expectations (4 fields including Qdrant)
- Use specific test IDs for button selection
- Fix input handling with clear() before type()
- Use toHaveBeenLastCalledWith for better assertions
- Fix status text matching with regex pattern

* fix: resolve UI test failures and ESLint errors

- Remove unused waitFor import to fix ESLint error
- Fix test expectations to match actual component behavior for input fields
- Simplify provider selection test by removing complex mock interactions
- All CodeIndexSettings tests now pass (20/20)

* feat: add custom model infrastructure for OpenAI-compatible embedder

- Add manual model ID and embedding dimension configuration
- Enable custom model input via text field in settings UI
- Add modelDimension parameter to OpenAiCompatibleEmbedder
- Update configuration management to persist dimension setting
- Prioritize manual dimension over hardcoded model profiles
- Add comprehensive test coverage for new functionality

This allows users to specify any custom embedding model and its
dimension for OpenAI-compatible providers, removing dependency
on hardcoded model profiles.

* Add missing translations for OpenAI-compatible model dimension settings in all locales

* refactor: remove unused modelDimension parameter from OpenAiCompatibleEmbedder

- Remove modelDimension property and constructor parameter from OpenAiCompatibleEmbedder class
- Update ServiceFactory to not pass dimension to embedder constructor
- Update tests to match new constructor signature
- The dimension is still used for QdrantVectorStore configuration

* chore: bot suggestion

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* chore: bot suggestion

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* refactor: rename OpenAiCompatibleEmbedder to OpenAICompatibleEmbedder for consistency

* feat: add model dimension validation for OpenAI-compatible settings

* refactor: improve default model ID retrieval logic for embedding providers

* feat: add default model ID retrieval for openai-compatible provider

* refactor: update default model ID retrieval to use shared utility function

* fix: Remove unnecessary type assertion in OpenAICompatibleEmbedder

* feat: add model dimension input for openai-compatible provider

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-04 17:00:52 -04:00
..
build Fix Roo Code Nightly package.json generation (#4098) 2025-05-28 22:23:12 -07:00
cloud Cloud: add auth logs to the output channel (#4270) 2025-06-02 16:56:27 -07:00
config-eslint Upgrade to ESLint 9 + share eslint config across workspaces (#3815) 2025-05-21 21:30:21 -07:00
config-typescript Roo Code Cloud (#4069) 2025-05-28 20:43:30 -07:00
evals Move evals into pnpm workspace, switch from SQLite to Postgres (#4278) 2025-06-03 01:38:08 -07:00
ipc Move evals into pnpm workspace, switch from SQLite to Postgres (#4278) 2025-06-03 01:38:08 -07:00
telemetry Appease changests (#4126) 2025-05-29 15:27:01 -07:00
types feat: Add OpenAI Compatible embedder for codebase indexing (#4066) 2025-06-04 17:00:52 -04:00