Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Aug 12, 2025

#6982 + translations fix


Important

Adds optional requestyBaseUrl to requestySchema and updates RequestyHandler to use it, with UI and translation updates for custom base URL input.

  • Behavior:
    • Adds requestyBaseUrl to requestySchema in provider-settings.ts as an optional string.
    • Updates RequestyHandler in requesty.ts to use requestyBaseUrl if provided, defaulting to "https://router.requesty.ai/v1".
    • Adds test in requesty.spec.ts to verify custom base URL usage.
  • UI:
    • Updates Requesty.tsx to include a checkbox and text field for custom base URL input.
    • Adds translations for new UI elements in multiple language files (settings.json).

This description was created by Ellipsis for c06c491. You can customize this summary. It will automatically update as commits are pushed.

requesty-JohnCosta27 and others added 6 commits August 12, 2025 11:59
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@mrubens mrubens requested review from cte and jr as code owners August 12, 2025 13:56
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. documentation Improvements or additions to documentation labels Aug 12, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! I've reviewed the changes and the implementation looks solid overall. The feature to add custom base URLs for the Requesty provider is well-implemented and follows existing patterns. I have a few suggestions that could improve the user experience and code robustness.

<VSCodeTextField
value={apiConfiguration?.requestyBaseUrl || ""}
type="text"
onInput={handleInputChange("requestyBaseUrl")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding URL validation for the custom base URL input. Currently, any string is accepted which could lead to runtime errors if an invalid URL is provided. You could add validation similar to other providers:

onChange={(e: any) => {
const isChecked = e.target.checked === true
if (!isChecked) {
setApiConfigurationField("requestyBaseUrl", undefined)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intentional that unchecking the checkbox immediately clears the base URL value? Users might accidentally uncheck it and lose their custom URL. Consider preserving the value and only clearing it when explicitly deleted by the user, or perhaps add a confirmation dialog?

"User-Agent": `RooCode/${Package.version}`,
},
})
})
Copy link
Contributor

Choose a reason for hiding this comment

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

While the test verifies that the custom base URL is passed to the OpenAI constructor, it would be valuable to add a test that actually makes an API call with the custom URL to ensure end-to-end functionality. This could help catch any issues with how the custom URL is used in practice.

value={apiConfiguration?.requestyBaseUrl || ""}
type="text"
onInput={handleInputChange("requestyBaseUrl")}
placeholder={t("settings:providers.getRequestyBaseUrl")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider showing the default URL as a placeholder to guide users. Instead of just the translation key, you could show:

This would help users understand the expected format.

<VSCodeTextField
value={apiConfiguration?.requestyBaseUrl || ""}
type="text"
onInput={handleInputChange("requestyBaseUrl")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding URL validation for the custom base URL input. Currently, any string is accepted which could lead to runtime errors if an invalid URL is provided. You could add validation similar to other providers to ensure the URL is valid before saving.

onChange={(e: any) => {
const isChecked = e.target.checked === true
if (!isChecked) {
setApiConfigurationField("requestyBaseUrl", undefined)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intentional that unchecking the checkbox immediately clears the base URL value? Users might accidentally uncheck it and lose their custom URL. Consider preserving the value and only clearing it when explicitly deleted by the user, or perhaps add a confirmation dialog?

"User-Agent": `RooCode/${Package.version}`,
},
})
})
Copy link
Contributor

Choose a reason for hiding this comment

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

While the test verifies that the custom base URL is passed to the OpenAI constructor, it would be valuable to add a test that actually makes an API call with the custom URL to ensure end-to-end functionality. This could help catch any issues with how the custom URL is used in practice.

value={apiConfiguration?.requestyBaseUrl || ""}
type="text"
onInput={handleInputChange("requestyBaseUrl")}
placeholder={t("settings:providers.getRequestyBaseUrl")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider showing the default URL as a placeholder to guide users. Instead of just the translation key, you could show the default URL (https://router.requesty.ai/v1) to help users understand the expected format.

@mrubens mrubens merged commit 3acb3ba into main Aug 12, 2025
18 checks passed
@mrubens mrubens deleted the adding-requesty-base-url branch August 12, 2025 14:04
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 12, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants