-
Notifications
You must be signed in to change notification settings - Fork 495
fix: resolve model aliases in backlog plan explicit override #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When a user explicitly passes a model override (e.g., model: "sonnet"), the code was only fetching credentials without resolving the model alias. This caused API calls to fail because the Claude API expects full model strings like "claude-sonnet-4-20250514", not aliases like "sonnet". The other code branches (settings-based and fallback) correctly called resolvePhaseModel(), but the explicit override branch was missing this. This fix adds the resolvePhaseModel() call to ensure model aliases are properly resolved before being sent to the API.
Summary of ChangesHello @stefandevo, 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 addresses a critical bug in the backlog plan generation process where explicitly provided model aliases were not correctly resolved to their full model identifiers. By integrating the model resolution logic into the explicit override path, the change ensures that API calls using aliases now succeed, improving the robustness and flexibility of model selection. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
📝 WalkthroughWalkthroughThe change modifies the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
The pull request effectively resolves the model alias resolution bug in generateBacklogPlan() when an explicit model override is used. By introducing the resolvePhaseModel() call, the code now correctly handles model aliases and ensures that the full model IDs are used for API calls, aligning this branch with the logic in other model resolution paths. The change is well-explained and directly addresses the problem, improving the robustness of model selection.
Summary
generateBacklogPlan()when using explicit model overridesmodel: "sonnet"would fail because the API expects full model IDs likeclaude-sonnet-4-20250514Problem
In
apps/server/src/routes/backlog-plan/generate-plan.ts, when an explicit model override was provided, the code only fetched credentials:The other code branches correctly called
resolvePhaseModel():resolvePhaseModel(phaseResult.phaseModel)resolvePhaseModel(DEFAULT_PHASE_MODELS.backlogPlanningModel)But the explicit override branch was missing this, causing API calls to fail when using model aliases.
Solution
Added the missing
resolvePhaseModel()call to the explicit override branch:Test plan
model: "sonnet") and verify the plan generates successfullySummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.