Skip to content

Conversation

@ross
Copy link
Contributor

@ross ross commented Apr 7, 2025

Context

Move rate-limit setting from being a global setting in the advanced section to a per-profile setting.

Implementation

Created a new component RateLimitSecondControl that lives below TemperatureControl and behaves the same as it.

A new migrations "system" for ProviderSettingsMananager is introduced and it's set up to move the global rate-limit value over to any profiles that do not have an existing value on update.

Translations were AI-generated so I obviously can't vouch for those.

Screenshots

before after
Screenshot 2025-04-07 at 6 50 23 AM Screenshot 2025-04-07 at 7 00 57 AM Screenshot 2025-04-07 at 7 01 33 AM

|

How to Test

Set a rate-limit in the advanced section before updating to this code. Update and see that the value you set is copied over to all of your profiles. You can then go into each profile and change the values to something that makes sense for the specific provider. Once saved the value should be tied to the provider.

If no value is set before you update, e.g. 0s, that 0s value will be copied to all the profiles as well.

Get in Touch

rwmcfa1

This replaces #1785 which appears to have stalled and in the meantime a lot of things changed out from under it making it difficult to use it as a starting point.

/cc Replaces #1785
/cc Fixes #2287 which requested this functionality


Important

Rate-limit setting updated to be per-profile with new UI component and migration system in ProviderSettingsManager.ts.

  • Behavior:
    • Rate-limit setting moved from global to per-profile in ProviderSettingsManager.ts.
    • New RateLimitSecondControl component added below TemperatureControl in ApiOptions.tsx.
    • Migration system added to ProviderSettingsManager.ts to transfer global rate-limit to profiles without existing values.
  • UI Components:
    • RateLimitSecondsControl added to ApiOptions.tsx.
    • Removed rate-limit slider from AdvancedSettings.tsx.
  • Tests:
    • Updated tests in ProviderSettingsManager.test.ts to cover migration logic.
    • Added tests for RateLimitSecondsControl in ApiOptions.test.tsx.
  • Translations:
    • Updated translation files for new rate-limit setting descriptions.
  • Misc:
    • Removed rate-limit related code from AdvancedSettings.tsx and SettingsView.tsx.

This description was created by Ellipsis for 425e5df. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2025

🦋 Changeset detected

Latest commit: 0f8b5f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
roo-cline Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 7, 2025
@ellipsis-dev
Copy link
Contributor

ellipsis-dev bot commented Apr 7, 2025

This pull request includes changes to both rate-limit settings and translations across multiple locales. To improve clarity and reviewability, it would be beneficial to split this into two separate pull requests:

  1. Rate-limit Functionality Changes: This would include all changes related to updating the rate-limit settings to be per-profile, including any associated tests and configuration updates.

  2. Translations: This would cover all the changes related to adding or updating translations across different locales.

By separating these concerns, it will be easier to review and test each set of changes independently. Thank you!

@dosubot dosubot bot added the enhancement New feature or request label Apr 7, 2025
apiConfigs: {
default: {
id: this.defaultConfigId,
rateLimitSeconds: 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary to add?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd have to ask gemini 😁. Actually I wasn't 100% sure when I saw it and forgot to come back to it by the time I'd gotten other things happy. Will remove it and make sure that things are cleanly dealing w/not having a value for rateLimitSeconds in the default.

Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question, looks and works great otherwise!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 7, 2025
@mrubens mrubens merged commit 260fc30 into RooCodeInc:main Apr 7, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Apr 7, 2025
Copy link
Contributor Author

@ross ross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other question I had here was more around cleanup. The existing global version has to stay around, at least for now, to have something to migrate from, but it's plumbed through a bunch of places. I may make an additional pass through seeing what parts of that can go.

apiConfigs: {
default: {
id: this.defaultConfigId,
rateLimitSeconds: 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd have to ask gemini 😁. Actually I wasn't 100% sure when I saw it and forgot to come back to it by the time I'd gotten other things happy. Will remove it and make sure that things are cleanly dealing w/not having a value for rateLimitSeconds in the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rate Limit seems to be global, not per config profile, but many models have different rate limits

2 participants