-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Mistral rewrite feat fix #1815
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
Mistral rewrite feat fix #1815
Conversation
This commit includes several major improvements: 1. Mistral API Integration: - Enhanced rate limit handling with detailed user messages - Improved error management with quota warnings - Added pattern detection and loop prevention - Optimized streaming performance 2. Mistral Model Updates: - Increased token limits to 32K for mistral-small-latest - Added support for mistral-saba-latest model - Enabled image support for mistral-small-latest 3. Git Workflow Enhancements: - Added comprehensive Git workflow guide - Created tidy-commits script for commit cleanup - Added npm run tidy-commits command 4. Code Quality: - Removed deprecated rateLimitSeconds concept - Added extensive rate limiting tests - Improved debugging tools for Mistral API
|
|
This pull request is quite large, with 13 files changed and over 1300 lines added. It might be beneficial to split it into smaller, more manageable pull requests if the changes are not closely related. Here are some suggestions on how the changes could be split:
Please consider splitting the pull request if these changes are not interdependent. This will make it easier to review and ensure each part is thoroughly tested. |
…ve UI elements, wrong merge. defaultModel removed
@cte i am not sure about the tests. you can take a look at the test to see if it fits. the format is taken from cline. |
| @@ -0,0 +1,8 @@ | |||
| /** | |||
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.
I think we've been using the delay npm package for this.
| /** | ||
| * Base class for API providers that implements common functionality | ||
| */ | ||
| import * as vscode from "vscode" |
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.
Is this import used?
| } | ||
| }, | ||
| { | ||
| "title": "Roo Code > Debug", |
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.
I'm not sure this is worth adding unless it's more generic.
|
Thanks for updating the Mistral stuff! I left a few comments. |
Over two months ago 🙀. Since it wasn't merged, I'm using a completely customized code outside of roo with Mistral. |
Context
The current Mistral API provider has an old MistralSDK implementation that can generate an endless prediction.
https://discord.com/channels/1332146336664915968/1351883070550315009/1351915996931293204
Implementation
SDK update: "@mistralai/mistralai": "^1.3.6" > ^1.5.2",
Mistral Model Updates:
Code Quality:
Screenshots
How to Test
Get a codestral API key, setup codestral as model for the provider. Enable Debug in the VS Code Settings UI.
Prompt:
Create a modern calculator using TypeScript with the following requirements:
codestral:
https://www.dropbox.com/scl/fi/hd22oj4sn9t9qpns1q5tx/Screen-Recording-2025-03-19-190140.mp4?rlkey=h67iuls81d99ur5vppbjb3q3s&st=6fgr9hwi&dl=0
mistral-small:
https://www.dropbox.com/scl/fi/tz03fz2hfkj3p7mr22gf0/RooCode-mistral-small.mp4?rlkey=npfkv28pxoaorz438y2fsuykq&st=rbiuwzsj&dl=0
Known-Issues:
Get in Touch
Important
Enhances Mistral API integration with improved rate limit handling, error management, and support for new models, alongside SDK updates and code quality improvements.
mistral.ts.mistral-saba-latestand increased token limits formistral-small-latest.^1.5.2inpackage.json.rateLimitSecondsconcept inbase-provider.ts.mistral.test.tsandCline.rateLimiting.test.ts.mistral.ts.delay()function inpromises.tsfor handling asynchronous delays.ApiOptions.tsxto include new Mistral settings.This description was created by
for 8d796c2. It will automatically update as commits are pushed.