feat(zed-integration): Use default model routing for Zed integration#13398
Conversation
Summary of ChangesHello @benbrandt, 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 refactors the model selection mechanism within the Zed integration to align with the core CLI's approach. By adopting the 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 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 counter productive. 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. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the model selection logic within the Zed integration to align with the core CLI's behavior. By removing the custom resolveModel function and adopting the centralized getEffectiveModel from @google/gemini-cli-core, the change successfully eliminates code duplication. This is a great improvement for maintainability and ensures that Zed integration users can benefit from consistent model routing, including access to preview models. The implementation is clean, correct, and achieves its stated goal effectively.
|
@benbrandt Mind resolving the conflicts? |
|
will do! |
5ded1a0 to
f1feca9
Compare
|
@skeshive done |
Refactors the model selection to use the default `getEffectiveModel` instead of the custom function in the Zed integration. This has the benefit of allowing users to use Gemini 3 if they have enabled the preview features.
f1feca9 to
478c99c
Compare
| const model = getEffectiveModel( | ||
| this.config.isInFallbackMode(), | ||
| this.config.getModel(), | ||
| this.config.getPreviewFeatures(), |
There was a problem hiding this comment.
is there a way for users to set this via Zed integration (currently previewFeatures isnt exposed via cli flags, its exposed via /settings UI)
There was a problem hiding this comment.
Not currently. It relies on you having used Gemini CLI elsewhere and turning it on.
We could look into letting them set this another way if you prefer. But my hope for now would be at the very least whenever you update the logic to make Gemini 3 the default it would also work here for the users who don't do that
There was a problem hiding this comment.
Not currently. It relies on you having used Gemini CLI elsewhere and turning it on.
Could you explain this a bit more? Would the user have to edit the source code in order to flip this feature on?
If/when we flip the default model to Gemini 3, I believe the existing logic would enable usage of Gemini 3. I'm not strongly opposed to updating the logic but just want to understand the use case
There was a problem hiding this comment.
Sorry I just mean, I got it to work by running gemini cli in my terminal, turning on the preview feature, and then going back and running it in Zed
|
@skeshive do I need to fix something here? Or was it just a flaky CI job? |
…ing for Zed integration (google-gemini#13398)
…oogle-gemini#13398) Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
…13398) Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
…oogle-gemini#13398) Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
Summary
Refactors the model selection to use the default
getEffectiveModelinstead of the custom function in the Zed integration.
This has the benefit of allowing users to use Gemini 3 if they have
enabled the preview features.
Details
Previously @skeshive did some work to allow the Zed integration to utilize the fallback model routing.
This updates this implementation to use the same logic as the core CLI in terms of choosing between fallback models and preview models.
How to Validate
Run
npm run buildand put the following config in your Zed settings.json{ "agent_servers": { "jimandi": { "command": "/path/to/your/repo/gemini-cli/packages/cli/dist/index.js", "args": ["--experimental-acp"] } } }Pre-Merge Checklist