Skip to content

Finer-grained control of Gemini modelsย #4519

@HahaBill

Description

@HahaBill

What specific problem does this solve?

This is the part of the large proposal #4483

This proposal aims to increase user control and cost management with using Gemini as an API provider.

Summary

We would improve Gemini support in Roo Code by adding:

  • topP and topK
  • maxOutputTokens -> if no progress is made
  • URL context
  • Grounding Research
  • Token control
  • contextLimit / maxContextWindow - still an ongoing disccusion

How should this be solved?

Missing Integrations and Parameters

#### Token-related issues

- Cannot strategically decrease context limits (input tokens): https://github.com/RooCodeInc/Roo-~~Code/discussions/2422, #3009, #3717
=> This PR (#4360) particularly solved the issue related to intelligent context condensing for Gemini. However, this is still under the discussion to whether make those changes. Other use case would be strategically setting artificial maximum context window limit for cost management.

How will we know it works? (Acceptance Criteria)

Acceptance Criteria

Case 1: Changing parameters and configurations

  1. Users click on the Roo Code's setting button
  2. Users create new profile and select Gemini as an API provider
  3. Users see several custom parameters and configurations such as topP, topK, maxOutputTokens, enable URL context, enable Grounding Research and context limit.
    But I cannot see new parameters or configurations :(

Case 2: Strategically setting context limit / max context window

  1. Users click on the Roo Code's setting button
  2. Users create new profile and select Gemini as an API provider
  3. Users change context limit / mac context window to aligned with their specific token usage
  4. When users do multiple requests and Roo Code intelligently condense the context to be below the set context limit / max context window. Optional: If it goes over the set context limit, it will want useres
    But I am losing a lot of money :(

Estimated effort and complexity

Size: Medium (1-2 week)
Reasoning: Adding parameters and tools to genai functions - should not be difficult, UI/UX should not be difficult since it will be in the configuration profile, setting context limit (currently max context window) is already in progress
Main Challenges: optimal UI/UX designs
Dependencies: No new dependencies

Technical considerations (optional but helpful)

No response

Trade-offs and risks (optional)

No response

Additional context (optional)

Note

This will be reviewed by Google Deepmind and further adjustment could be made. Furthermore, there are some duplicates but they seem to be inactive - those have to be verified.

Proposal checklist

  • I've searched existing Issues and Discussions for duplicates
  • This is a specific, actionable proposal with clear problem and solution
  • I've included concrete acceptance criteria
  • I understand this needs approval before implementation begins

Interested in implementing this?

  • Yes, I'd like to help implement this feature

Metadata

Metadata

Assignees

Labels

Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.enhancementNew feature or requestproposal

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions