-
Notifications
You must be signed in to change notification settings - Fork 2.6k
create a new profile when being redirected from requesty #7416
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1425,7 +1425,9 @@ export class ClineProvider | |||||||||||||||||
| requestyModelId: apiConfiguration?.requestyModelId || requestyDefaultModelId, | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| await this.upsertProviderProfile(currentApiConfigName, newConfiguration) | ||||||||||||||||||
| // Create a new profile with a unique name to trigger settings refresh | ||||||||||||||||||
| const newProfileName = currentApiConfigName === "default" ? "requesty-oauth" : currentApiConfigName | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical Issue: This could cause a profile name collision. What happens if a profile named "requesty-oauth" already exists? Consider checking for existing profiles or generating a unique name:
Suggested change
|
||||||||||||||||||
| await this.upsertProviderProfile(newProfileName, newConfiguration) | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing error handling: Unlike the OpenRouter and Glama callbacks which have try-catch blocks for API calls, this method doesn't validate the code parameter or handle potential errors. Consider adding validation at the start of the method. |
||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| // Task history | ||||||||||||||||||
|
|
||||||||||||||||||
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.
Inconsistency with other OAuth providers: I notice that OpenRouter (line 1383) and Glama (line 1413) OAuth callbacks update the existing profile, while Requesty creates a new one. Is this intentional? This inconsistency could confuse users who expect similar behavior across providers. Could you explain why Requesty needs different behavior?