Skip to content

Conversation

@aixgeek
Copy link

@aixgeek aixgeek commented Oct 28, 2025

Related GitHub Issue

Closes: #

Roo Code Task Context (Optional)

Description

Test Procedure

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

Additional Notes

Get in Touch


Important

Adds support for custom googleGeminiBaseUrl in GeminiHandler by updating countTokens method to use httpOptions.

  • Behavior:
    • Adds support for custom googleGeminiBaseUrl in GeminiHandler class.
    • Updates countTokens method to use httpOptions with baseUrl if googleGeminiBaseUrl is provided.
  • Functions:
    • Modifies countTokens in gemini.ts to include config with httpOptions for custom base URL.
  • Misc:
    • No changes to other methods or files.

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

@aixgeek aixgeek requested review from cte, jr and mrubens as code owners October 28, 2025 08:28
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Oct 28, 2025
@roomote
Copy link

roomote bot commented Oct 28, 2025

Review Summary

I've reviewed the changes in this PR. Here are the issues that need to be addressed:

  • Add test coverage for the countTokens method with custom base URL support

Follow Along on Roo Code Cloud

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 28, 2025
Comment on lines +264 to +268
config: {
httpOptions: this.options.googleGeminiBaseUrl
? { baseUrl: this.options.googleGeminiBaseUrl }
: undefined,
},
Copy link

Choose a reason for hiding this comment

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

This change adds support for custom base URL in countTokens, but there are no tests covering this method. The test file (gemini.spec.ts) has comprehensive tests for createMessage and completePrompt, but countTokens is not tested at all. Consider adding a test that verifies the httpOptions.baseUrl is properly passed when googleGeminiBaseUrl is set, similar to the existing test at line 122-124 in gemini.spec.ts for completePrompt.

@daniel-lxs
Copy link
Member

I'm not clear on what issue this change is fixing, so closing for now. Feel free to reopen or clarify if there's additional context.

@daniel-lxs daniel-lxs closed this Oct 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 29, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants