-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: create new Requesty profile during OAuth #8699
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
fix: create new Requesty profile during OAuth #8699
Conversation
Review SummaryIssues Found: 0 Issues to Address:
Review completed by Roo Code PR Review |
| const newConfiguration: ProviderSettings = { | ||
| ...apiConfiguration, | ||
| apiProvider: "requesty", | ||
| requestyApiKey: code, | ||
| requestyModelId: apiConfiguration?.requestyModelId || requestyDefaultModelId, | ||
| requestyModelId: requestyDefaultModelId, | ||
| } |
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.
This implementation creates a Requesty profile without preserving base provider settings (like diffEnabled, fuzzyMatchThreshold, rateLimitSeconds, consecutiveMistakeLimit, etc.) that users may have customized. Unlike the OpenRouter (line 1414) and Glama (line 1447) handlers which spread apiConfiguration to preserve these settings, this creates a minimal configuration with only Requesty-specific fields. Consider preserving user preferences: { ...apiConfiguration, apiProvider: "requesty", requestyApiKey: code, requestyModelId: requestyDefaultModelId }
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.
@Thibault00 what do you think of this? Would it cause any issues to preserve the apiConfiguration like the others?
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.
Good catch! We leave the spread in place now
a97ecd9 to
5148255
Compare
src/core/webview/ClineProvider.ts
Outdated
| apiProvider: "requesty", | ||
| requestyApiKey: code, | ||
| requestyModelId: apiConfiguration?.requestyModelId || requestyDefaultModelId, | ||
| requestyModelId: requestyDefaultModelId, |
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 removal of the conditional fallback apiConfiguration?.requestyModelId || requestyDefaultModelId means users will lose their custom model selection when re-authenticating with Requesty. Both OpenRouter (line 1418) and Glama (line 1451) handlers preserve the existing model ID if set. Consider restoring: requestyModelId: apiConfiguration?.requestyModelId || requestyDefaultModelId to maintain consistency and preserve user preferences.
3d790d2 to
8ea094b
Compare
|
@mrubens I've made some changes to this PR but I have a question/observation I had whilst developing it: When
A work around for now is to save the custom base url first, and only then go through the OAuth flow, this works. But it makes me thing that maybe I'm missing a mechanism which updates the UI after an OAuth request. Something that updates the If not, what do you think would be a good approach for this problem? |
|
@mrubens, are you happy with the fix proposed here? |
8ea094b to
4c13700
Compare
4c13700 to
18762cb
Compare
|
@roomote can you translate from english to other languages? I didn't see your last change (or maybe i override it?) |
|
Thanks for the ping. Yes, I can translate the new English strings. I previously added translations across locales, but the latest commits may have overridden them. I will 1) re-scan the changed English keys in this PR, 2) propagate them to all supported locales (ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW), 3) run the i18n checks, and 4) push an update to this branch shortly. If you need additional locales, let me know which ones and I will include them. |
|
Translations added and verified. Summary:
Verification:
If you prefer alternative wording for any locale, specify the locale and desired phrase and I will adjust. |
|
@mrubens / @daniel-lxs, |
Fixing requesty oauth flow
Important
Fixes Requesty OAuth flow by creating a new profile with a fixed name and default model ID in
ClineProvider.ts.ClineProvider.ts,handleRequestyCallback()now creates a new Requesty profile with a fixed name "Requesty" and default model IDrequestyDefaultModelId.apiConfigurationandcurrentApiConfigNamefromgetState()inhandleRequestyCallback().This description was created by
for a97ecd9e887c257e3ed5560524bb5dfc4b3b87f3. You can customize this summary. It will automatically update as commits are pushed.