gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

feat(core): Plumbing for late resolution of model configs.

Open joshualitt opened this issue 2 months ago • 2 comments

This is just the plumbing, in the follow-up this new key will be used to handle retry logic(see GeminiChat on this branch for how this will look.)

joshualitt avatar Dec 05 '25 20:12 joshualitt

Summary of Changes

Hello @joshualitt, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request lays the groundwork for more advanced model configuration management by introducing the concept of 'late resolution' for model configs, particularly focusing on retry logic. It enables the system to apply different model parameters based on whether a request is a retry, and provides a flexible way for users to define custom overrides. These changes are foundational, with the explicit goal of supporting future retry mechanisms without altering core model invocation logic.

Highlights

  • New isRetry Flag for Model Configurations: Introduced an isRetry boolean property to ModelConfigKey and ModelConfigOverride.match interfaces, allowing model configurations to be specifically tailored for retry attempts. This enables different model parameters (e.g., higher temperature) to be applied when a request is being retried.
  • Support for Custom Model Overrides: Added a new customOverrides property to ModelConfigServiceConfig and the CLI's settingsSchema.ts. This provides a mechanism for users to define their own model configuration overrides, which are merged with and applied after the built-in overrides.
  • Enhanced Default Configuration Merging: The Config class now ensures that default model configuration overrides (DEFAULT_MODEL_CONFIGS.overrides) are properly merged into the active configuration, even if the user only specifies aliases. This mirrors the existing behavior for default aliases.
  • Retry-Specific Default Override Added: A new default override has been added for the chat-base model. When isRetry is true, this override sets the generateContentConfig.temperature to 1, providing a more exploratory response during retry scenarios.
  • New Golden File for Retry Configurations: A new golden file, resolved-aliases-retry.golden.json, along with a corresponding test, has been added. This ensures the stability and correctness of resolved model configurations when the isRetry flag is active.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot] avatar Dec 05 '25 20:12 gemini-code-assist[bot]

Size Change: +941 B (0%)

Total Size: 21.5 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 21.5 MB +941 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

github-actions[bot] avatar Dec 05 '25 20:12 github-actions[bot]