Repository navigation
Conversation
|
📊 PR Size: size/M
|
Summary of ChangesHello, I'm Gemini Code Assist1! 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 resolves an issue where complexity-based routing incorrectly overrode manually selected models. By improving the robustness of model classification and ensuring that explicit selections bypass the automatic routing strategy, the system now consistently respects user-defined model preferences. Highlights
Using Gemini Code AssistThe 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
Customization To customize the 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request normalizes model names in isAutoModel and adds a check for the auto- prefix to identify auto-routing models. It also introduces unit tests to ensure manual model selections bypass complexity-based routing. The reviewer pointed out that checking for the auto- prefix is too broad and could mistakenly match non-Gemini models (e.g., auto-gpt), suggesting to restrict the prefix check to auto-gemini- instead.
7f8bbde to
6df361f
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the isAutoModel utility in packages/core/src/config/models.ts to normalize the model string by trimming and lowercasing it, and adds support for model names starting with the 'auto-' prefix. Additionally, it introduces a new test suite in packages/core/src/routing/strategies/complexityRoutingManualSelection.test.ts to verify that manual model selections correctly bypass complexity-based routing. I have no feedback to provide.
…cted concrete models Enhances isAutoModel in models.ts to defensively trim and lowercase all model IDs. If a model ID (such as GCA's raw model ID configurations) does not exist in the dynamic model config service, it cleanly falls back to static checks. This ensures concrete models are not misclassified as auto models, allowing OverrideStrategy to correctly respect explicit manual selections and bypass backend complexity-based routing. Adds a new test suite to guarantee manual model selections are respected under active complexity routing conditions. Bug: b_556300139
40c2dc7 to
a44c09e
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the isAutoModel utility in packages/core to normalize model names by trimming and converting them to lowercase, and adds support for identifying any model prefixed with auto-gemini- as an auto model. Additionally, it introduces corresponding unit tests and a new test suite (complexityRoutingManualSelection.test.ts) to ensure that manual model selection successfully bypasses complexity-based routing. There are no review comments, so no feedback is provided.
Summary
This PR addresses issue b_556300139, where the GCA (Normal Mode) would override explicit manually selected concrete models (e.g.
chat-gemini-3-1-pro-preview-paid-tier) with Gemini 2.5 Flash whenCliComplexityBasedRouting__enabledis set totrue.Details
Model Classification Robustness (
packages/core/src/config/models.ts):isAutoModelto defensively normalize (trim and lowercase) the incoming model ID.auto-or matches auto aliases).falsefromisAutoModel, which forcesOverrideStrategyto bypass complexity-based routing and respect the user's manual selection.New Test Suite (
packages/core/src/routing/strategies/complexityRoutingManualSelection.test.ts):Related Issues
Fixes b_556300139
How to Validate
npm test -w @google/gemini-cli-core -- src/routing/strategies/complexityRoutingManualSelection.test.tsPre-Merge Checklist