-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: add dynamic model loading for Roo Code Cloud provider #8728
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
Review SummaryI've completed my re-review of this PR. All previously identified issues have been successfully addressed, and no new issues were found in the latest changes. Issues Found
Latest Changes ReviewedThe latest commit (6a1c35e) improves response handling in the Roo models fetcher:
Positive Observations✅ Follows the same patterns as other dynamic providers (glama, unbound, requesty) |
PR Review Complete✅ No issues found This PR successfully implements dynamic model loading for the Roo Code Cloud provider. The implementation:
The code is ready to merge. |
src/api/providers/roo.ts
Outdated
| }) | ||
|
|
||
| // Clear models cache when logged out | ||
| this.mergedModels = {} |
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.
On logout, mergedModels are cleared but the memory cache isn’t flushed. Consider calling flushModels('roo') in the logged-out branch to avoid stale dynamic models.
src/api/providers/roo.ts
Outdated
| // Clear models cache when logged out | ||
| this.mergedModels = {} | ||
| this.modelsLoaded = false |
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 logout handler clears the instance's model cache but doesn't flush the shared model cache via flushModels("roo"), creating an asymmetry with the login handler (lines 65-72) which does flush the cache. This could allow stale authenticated models to persist in the shared cache after logout, potentially causing the next login to use outdated model data until the 5-minute TTL expires.
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.
Re-review completed. Found 1 new issue regarding cache management symmetry in the logout handler.
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.
Re-review complete. One issue remains unresolved (logout handler cache flush). Otherwise, the implementation follows established patterns and integrates well with the existing codebase.
cte
left a comment
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.
LGTM
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.
All previously identified issues have been successfully resolved. No new issues found in the latest changes.
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.
No issues found.
Summary
Enables the Roo Code extension to dynamically load available models from the Roo Code Cloud provider via the
/v1/modelsendpoint.Changes
getRooModels()function to fetch models from Roo Code Cloud/v1/modelsendpointRooModelIdtostring)Technical Details
Model Loading Strategy
Type Safety
RooModelIdtostringto support dynamic model IDsTesting
Related
This PR works in conjunction with Roo-Code-Cloud PR #1316 which adds the
/v1/modelsendpoint.Important
Adds dynamic model loading for Roo Code Cloud provider, integrating API fetching, caching, and UI updates for model selection.
getRooModels()infetchers/roo.tsto fetch models from/v1/modelsendpoint.provider-settings.tsandwebviewMessageHandler.ts.RooHandlerinroo.tsto support dynamic model IDs and caching.RooModelIdtostringinRooHandler.shared/api.tsandWebviewMessage.ts.Roocomponent inproviders/Roo.tsxfor model selection.ApiOptions.tsxandModelPicker.tsxto support dynamic model loading.webviewMessageHandler.spec.tsandvalidate.test.tsto cover new functionality.dynamicProvidersinprovider-settings.ts.ExtensionStateContext.tsxto refresh models.This description was created by
for 6a1c35e. You can customize this summary. It will automatically update as commits are pushed.