fix(zed): Fix broken 'auto' model selection in Zed integration#9769
Conversation
Summary of ChangesHello @skeshive, 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 a critical issue in the Zed integration where the 'auto' model selection for the Gemini Chat service was not being honored. The fix re-implements the necessary model routing logic directly within the integration path, ensuring that the system correctly determines whether to use the default Gemini model or fall back to the flash model based on the current configuration. This change restores the intended behavior for automatic model selection. 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 correctly addresses a bug in the Zed integration where the auto model selection was not working. The fix introduces a resolveModel helper function to handle this logic. My review includes suggestions to simplify this new function and its usage to remove redundant logic and improve maintainability by better separating concerns. The proposed changes make the code cleaner while preserving the correctness of the fix.
|
Size Change: +241 B (0%) Total Size: 17.4 MB ℹ️ View Unchanged
|
This PR fixes the Zed integration, which is broken when using the
automodel setting. The integration communicates directly with the Gemini Chat service, bypassing the internal model routing logic that normally handles theautoselection.This change re-implements the necessary model selection logic within the Zed integration path, ensuring it correctly falls back to the flash model when appropriate.