-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add multi-provider model tier support to runner and cron helpers (t132.7) #789
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
…s (t132.7) Add resolve_model_tier() to shared-constants.sh for tier name resolution (haiku/sonnet/opus/flash/pro/grok -> full provider/model strings). Used by runner-helper.sh, cron-helper.sh, and cron-dispatch.sh. - resolve_model_tier(): tries fallback-chain-helper.sh first, then static map - detect_ai_backends(): discovers available CLI backends (opencode, claude) - --provider flag on runner create/run and cron add for provider override - --model now accepts tier names in addition to full provider/model strings - cron-dispatch.sh now sources shared-constants.sh for tier resolution Fixes: t132.7 ref:GH#739
Summary of ChangesHello @alex-solovyev, 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 flexibility and user experience for specifying AI models within the Highlights
Changelog
Activity
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
|
|
Caution Review failedThe pull request is closed. WalkthroughThese changes extend the agent scripting framework to support model-tier name resolution and provider overrides. New functions in shared-constants.sh enable translation of tier names to full model strings, while cron-dispatch.sh, cron-helper.sh, and runner-helper.sh implement Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related issues
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Mon Feb 9 17:26:46 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
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 feature for flexible AI model selection by adding support for model tiers and provider overrides. The implementation is well-structured across the affected scripts. My review focuses on a couple of areas for improvement:
- Style Guide Adherence: There are a couple of minor violations of the repository's shell script style guide regarding variable declaration and assignment in
shared-constants.sh.
Addressing these points will make the new code even more robust and easier to maintain. Overall, this is a great addition to the framework.
| # Returns the resolved model string on stdout. | ||
| ####################################### | ||
| resolve_model_tier() { | ||
| local tier="${1:-coding}" |
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.
The repository style guide (line 11) requires declaring and assigning local variables on separate lines for safety under set -e. This line combines both operations.
| local tier="${1:-coding}" | |
| local tier | |
| tier="${1:-coding}" |
References
- Style guide rule 11 states to use
local var="$1"pattern in functions, declaring and assigning separately for exit code safety. (link)
| fi | ||
|
|
||
| # Try fallback-chain-helper.sh for availability-aware resolution | ||
| local chain_helper="${BASH_SOURCE[0]%/*}/fallback-chain-helper.sh" |
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.
To adhere to the repository style guide (line 11), please separate the declaration and assignment of this local variable.
| local chain_helper="${BASH_SOURCE[0]%/*}/fallback-chain-helper.sh" | |
| local chain_helper | |
| chain_helper="${BASH_SOURCE[0]%/*}/fallback-chain-helper.sh" |
References
- Style guide rule 11 states to use
local var="$1"pattern in functions, declaring and assigning separately for exit code safety. (link)
All 8 subtasks of t132 (Cross-Provider Model Routing) are now complete: - t132.1: Model-specific subagents (PR #758) - t132.2: Provider/model registry (PR #761) - t132.3: Model availability checker (PR #770) - t132.4: Fallback chain config (PR #781) - t132.5: Supervisor model resolution (PR #787) - t132.6: Quality gate with escalation (PR #788) - t132.7: Multi-provider runner/cron support (PR #789) - t132.8: Cross-model review workflow (PR #791) Also fixed stale git conflict markers in TODO.md.



Summary
resolve_model_tier()to shared-constants.sh as a shared utility for tier name -> model string resolution--modelflag--providerflag allows overriding the provider while keeping the model IDdetect_ai_backends()discovers available CLI backendsChanges
shared-constants.sh
resolve_model_tier(): Resolves tier names to fullprovider/modelstrings. Triesfallback-chain-helper.shfirst (availability-aware), falls back to static mapping. Passes through fullprovider/modelstrings unchanged.detect_ai_backends(): Returns list of available AI CLI backends (opencode, claude)runner-helper.sh
createandruncommands:--modelnow accepts tier names--providerflag overrides the provider portion of the model stringcron-helper.sh
addcommand:--modelnow accepts tier names--providerflag for provider overridecron-dispatch.sh
resolve_model_tier()Examples
Testing
bash -n: All 4 files pass syntax check-S error: Zero violationsFixes: t132.7 ref:GH#739
Summary by CodeRabbit
New Features
--provideroption to allow users to override the AI provider when creating or managing tasks.Chores