-
Notifications
You must be signed in to change notification settings - Fork 44
feat(ai-core): provider-aware model routing with health-safe execution #110
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
base: master
Are you sure you want to change the base?
feat(ai-core): provider-aware model routing with health-safe execution #110
Conversation
Summary of ChangesHello @ShashankSaga, 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 significantly enhances the AI core by introducing a provider-aware model routing system. It establishes a dedicated registry for AI models, allowing for their centralized definition and explicit selection, independent of the underlying provider. The 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
|
|
Hi @abhishek-nexgen-dev 👋 As discussed, I’ve consolidated the work into a single final PR on top of dev. This adds provider-aware model routing while keeping provider implementations untouched and preserving existing health checks. Please let me know if this direction looks good or if you’d like any adjustments before merge. Thanks! |
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
This pull request introduces a valuable provider-aware model routing mechanism, including a new AIModelRegistry and health-checking for providers. The overall architecture is a good step towards a more robust multi-model system. My review identifies a few key areas for improvement: a critical fix for the health-checking logic to prevent permanent provider failure, a high-priority correction to the new routing method's signature to avoid unexpected behavior, and a medium-priority suggestion to enhance the extensibility of the new AIModelRegistry.
|
@ShashankSaga instant of creating multiple pr create a single pr this is good for me because each time you create a pr for a single issue i need to verify the changes again and again 😔 and I already got lots of pr related to my project, lots of comments that's why create a single pr that some a single issue |
…PI, and make model registry extensible
|
Got it, thanks for clarifying @abhishek-nexgen-dev 🙏 I understand your concern — I’ll stick to one single PR per issue and avoid opening multiple PRs for the same feature. I’ll continue developing incrementally on the same branch locally and only open one final PR once the implementation is complete, stable, and ready for review. Appreciate your time and the guidance — I’ll follow this approach going forward. |
|
Hi @abhishek-nexgen-dev 👋 All requested changes are now addressed. |
Summary
This PR introduces provider-aware model routing on top of the existing AI provider abstraction, enabling explicit provider + model execution while preserving health checks and non-breaking behavior.
The goal is to make model selection a first-class concept without coupling it to individual provider implementations.
What’s included
AIModelRegistryto centrally define:AIProviderRegistrywithgenerateTextWithModelto:GeminiProvider), keeping the system extensible and backward-compatible.Why this matters
provider → model
Safety & compatibility
Please let me know if you’d like: