-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add Mistral embedding provider for codebase indexing #5933
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
Conversation
- Add Mistral as a new embedding provider option - Support for codestral-embed model with 1024 dimensions - OpenAI-compatible API integration at https://api.mistral.ai/v1 - Free tier availability for cost-effective embedding generation - Comprehensive test coverage for MistralEmbedder class - Configuration support in service factory and config manager Resolves #5932
- Add Mistral option to provider dropdown - Add Mistral API key configuration UI - Add Mistral model selection dropdown - Add validation schema for Mistral provider - Handle Mistral API key in secret management
- Add mistral to WebviewMessage type definition - Add mistral to codebase-index schema in types package - Fixes TypeScript compilation errors
- Add mistral to codebaseIndexModelsSchema - Add codebaseIndexMistralApiKey to codebaseIndexProviderSchema - Fixes TypeScript compilation errors in webview component
| const openAiCompatibleBaseUrl = codebaseIndexConfig.codebaseIndexOpenAiCompatibleBaseUrl ?? "" | ||
| const openAiCompatibleApiKey = this.contextProxy?.getSecret("codebaseIndexOpenAiCompatibleApiKey") ?? "" | ||
| const geminiApiKey = this.contextProxy?.getSecret("codebaseIndexGeminiApiKey") ?? "" | ||
| const mistralApiKey = this.contextProxy?.getSecret("mistralApiKey") ?? "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The secret key for the Mistral API is fetched using getSecret("mistralApiKey"), but elsewhere (e.g. in the zod schema and UI) the mistral key is referred to as codebaseIndexMistralApiKey. Consider aligning the secret key naming for consistency to avoid potential mismatches.
| const mistralApiKey = this.contextProxy?.getSecret("mistralApiKey") ?? "" | |
| const mistralApiKey = this.contextProxy?.getSecret("codebaseIndexMistralApiKey") ?? "" |
|
Please fix the dimension to 1536 @roomote-agent |
|
Hi @shariqriazz, I see your request to fix the dimension to 1536. I'm working on this change now and will update the PR shortly. |
|
Hi @shariqriazz, I've successfully updated the Mistral codestral-embed dimension from 1024 to 1536 as requested. Changes made:
All tests are passing and CI checks have completed successfully. The changes are ready for review. |
|
Mistral doesn't seem to be OpenAI compatible |
Implements Mistral codestral-embed model support with OpenAI-compatible API integration for improved performance and cost efficiency.
Changes
Features
Fixes #5932
Important
Adds Mistral as a new embedding provider for codebase indexing, including configuration, UI updates, and test coverage.
codebase-index.tsandconfig-manager.ts.MistralEmbedderclass inmistral.tswrappingOpenAICompatibleEmbedder.service-factory.tsandCodeIndexPopover.tsx.CodeIndexPopover.tsxto support Mistral provider selection.codebaseIndexConfigSchemaandcodebaseIndexProviderSchemaincodebase-index.tsto include Mistral.config-manager.ts.MistralEmbedderinmistral.spec.ts.MISTRAL_MAX_ITEM_TOKENSinconstants/index.ts.embeddingModels.tswithcodestral-embedmodel.This description was created by
for 3260857. You can customize this summary. It will automatically update as commits are pushed.