fix: resolve setup onboarding errors (macOS head -z, model selection, agent routing)#346
Conversation
… agent routing) - Replace GNU-only 'head -z' with macOS-compatible 'while read' in deploy-templates.sh - Route /onboarding command to Onboarding agent instead of Build+ - Auto-detect authenticated provider when launching onboarding to avoid insufficient_quota errors (prefers Anthropic > Google > fallback to OpenCode default)
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ 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 |
Summary of ChangesHello @marcusquinn, 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 initial user experience by addressing critical issues encountered during the setup and onboarding process. It improves cross-platform compatibility, intelligently selects AI models based on user authentication, and ensures correct agent routing, leading to a smoother and more reliable first interaction with the system. 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
|
🔍 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: Thu Feb 5 20:50:24 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
There was a problem hiding this comment.
Code Review
This pull request effectively resolves three distinct onboarding issues, enhancing portability and user experience. The fix for the macOS head -z error by using a while read loop is a good portability improvement. The logic to auto-detect an appropriate model in setup.sh is a thoughtful addition that prevents errors for users without OpenAI credits. The agent routing correction is a straightforward and necessary fix. The changes are clear and well-implemented. I have one suggestion to refactor a small part of setup.sh to improve maintainability by reducing code duplication.
| if [[ -n "$onboarding_model" ]]; then | ||
| opencode --agent Onboarding --prompt "/onboarding" --model "$onboarding_model" | ||
| else | ||
| opencode --agent Onboarding --prompt "/onboarding" | ||
| fi |
There was a problem hiding this comment.
To improve maintainability and avoid code duplication, you can refactor this block to build the opencode command arguments dynamically. This avoids repeating the base command opencode --agent Onboarding --prompt "/onboarding".
| if [[ -n "$onboarding_model" ]]; then | |
| opencode --agent Onboarding --prompt "/onboarding" --model "$onboarding_model" | |
| else | |
| opencode --agent Onboarding --prompt "/onboarding" | |
| fi | |
| local opencode_args=("--agent" "Onboarding" "--prompt" "/onboarding") | |
| if [[ -n "$onboarding_model" ]]; then | |
| opencode_args+=("--model" "$onboarding_model") | |
| fi | |
| opencode "${opencode_args[@]}" |
Address Gemini code review suggestion from PR #346 to reduce duplication by building opencode args dynamically.
Address Gemini code review suggestion from PR #346 to reduce duplication by building opencode args dynamically.



Summary
Fixes three issues encountered during the setup/onboarding process:
macOS
head -zerror:deploy-templates.shused GNU-onlyhead -zflag for null-delimited input, which fails on macOS withhead: invalid option -- z. Replaced with macOS-compatiblewhile read -rloop, matching the pattern already used insetup.sh.Wrong model for onboarding: When setup.sh launches OpenCode with the Onboarding agent, it used whatever model OpenCode defaults to (e.g.,
gpt-5.2-chat-latestfor OpenAI). If the user doesn't have OpenAI credits, this causesinsufficient_quotaerrors. Now auto-detects the user's authenticated providers fromauth.jsonand selects an appropriate model (Anthropic Claude > Google Gemini > fallback).Wrong agent routing: The
/onboardingcommand was configured withagent: Build+but there's a dedicatedOnboardingprimary agent. Updated to route to the correct agent.Changes
templates/deploy-templates.shhead -zwith macOS-compatiblewhile readloopsetup.sh--modelflag when launching onboarding.agent/scripts/generate-opencode-commands.sh/onboardingcommand agent fromBuild+toOnboarding