feat: make Gemma 4 the only local AI engine - #206
Conversation
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: π Files selected for processing (7)
π WalkthroughWalkthroughOllama is removed from local AI provider selections in both Changesllamacpp Promotion and Ollama Removal
Estimated code review effortπ― 2 (Simple) | β±οΈ ~10 minutes Poem
π₯ Pre-merge checks | β 4 | β 1β Failed checks (1 warning)
β Passed checks (4 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. β¨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
π€ Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/SetupWizard.tsx`:
- Around line 49-51: The SetupWizard component sets currentStep to 7 when
data.telegram_configured is true, but the wizard only renders steps 1β6, which
breaks the UI when completion fails. Change setCurrentStep(7) to
setCurrentStep(6) in the condition checking data.telegram_configured to keep the
current step within the valid range of rendered steps. This ensures the retry UI
at the specified line range (575-586) can display properly for step 6, and the
ProgressBar receives a valid aria-valuenow value not exceeding its maximum of 6.
- Around line 610-617: The AIModelsStep component has a hardcoded English title
"Set Up Local AI" that should be localized. Replace the hardcoded title
attribute with a call to the translation function t() using an appropriate
localization key (follow the naming pattern of the description key
"wizard.localAiDescription" to maintain consistency), ensuring the title uses
the translated strings that were added for Local AI in all locales.
πͺ Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
βΉοΈ Review info
βοΈ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: c5069182-ade6-4f0a-974a-055b541680b2
π Files selected for processing (5)
src/components/ProgressBar.tsxsrc/components/SettingsApp.tsxsrc/components/SetupWizard.tsxsrc/lib/translations.tssrc/tests/components/setup-wizard.test.tsx
| if (data.telegram_configured) { | ||
| setCurrentStep(6); | ||
| setCurrentStep(7); | ||
| beginCompletion(); |
There was a problem hiding this comment.
Keep the UI step within the six rendered steps.
Line 50 sets currentStep to 7, but the wizard only renders steps 1β6 and the retry UI at Line 575 only appears for step 6. If completion fails after resuming from telegram_configured, the overlay closes with no step or retry visible; ProgressBar also receives aria-valuenow=7 while its max is 6.
π Proposed fix
if (data.telegram_configured) {
- setCurrentStep(7);
+ setCurrentStep(6);
beginCompletion();
return;
}Also applies to: 575-586
π€ Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/SetupWizard.tsx` around lines 49 - 51, The SetupWizard
component sets currentStep to 7 when data.telegram_configured is true, but the
wizard only renders steps 1β6, which breaks the UI when completion fails. Change
setCurrentStep(7) to setCurrentStep(6) in the condition checking
data.telegram_configured to keep the current step within the valid range of
rendered steps. This ensures the retry UI at the specified line range (575-586)
can display properly for step 6, and the ProgressBar receives a valid
aria-valuenow value not exceeding its maximum of 6.
27e5f45 to
788a098
Compare
On Jetson, Gemma 4 (llama.cpp) runs at its full 131K context while the 3B Ollama models are RAM-capped at 32K β too tight for the agent's heavy system prompt β so Gemma is the only local engine that performs well. Make it the sole local option, folded into the existing AI Provider step (cloud-first, "go local from here") rather than a separate wizard step. - AI Provider step + Settings -> Local AI: Gemma is offered alongside the cloud providers; Ollama is hidden (its provider def, panel, hooks and routes are left intact, so re-enabling is a one-line revert). - Gemma is promoted up-front (PRIMARY_PROVIDER_IDS) and carries a "Fully local" badge instead of "Recommended" (which stays on ClawBox AI). - i18n: ai.fullyLocal across all 10 locales. Validated on a 2026.6.6 device: 55/55 affected tests green.
788a098 to
541434b
Compare
- cli: validate CLAWBOX_ROOT against the SAFE_PATH guard (force-update.sh / updater.ts) before `sudo bash install.sh` β blocks a compromised env from running an attacker-controlled script. - a11y: aria-label on the pairing-code input; type="button" on the desktop pairing-popup buttons. - copy: Local AI Settings no longer says 'choose a different local engine' (Gemma 4 is the only engine since #206). - docs: telegram-pairing spec now documents the desktop popup + its 20s ?poll=1 polling (the spec said 'no auto-poll'). Skipped: the chat-model.test fixture mode:"token" note β the route gates on models.providers.*.apiKey, not the profile mode, so the fixture shape is inert.
What
Make Gemma 4 (llama.cpp) the only local AI engine β hide Ollama from both local-AI surfaces, and offer Gemma as a step in first-run setup.
Why
On the Jetson, Gemma 4 (an e2b model) runs at its full 131K context, while the 3B-class Ollama models are RAM-capped at 32K β a 128K KV cache would need ~12.5 GB. 32K is too tight for the agent's ~20K-token system prompt + tool schemas, so Ollama responses are cramped/low-quality even after the reserve fix. Gemma is the one local engine that performs well on this hardware, so it should be the local default and the only exposed option for now.
Changes
["llamacpp", "ollama"]β["llamacpp"]. Ollama's provider def,OllamaModelPanel, hooks and configure route are left intact β this is a UI-level hide, reversible by re-adding"ollama"to the array.applyStatusDataresume logic, progress persistence and the completion gate for the 6-step flow.progress.localAi,wizard.helpLocalAiTitle/Body, andwizard.localAiDescriptionto all 10 locales (parity preserved).Validation (on a real OpenClaw 2026.6.6 device)
Ran the affected suites against an
origin/betaworktree with the box's own toolchain β 55/55 pass:translations.test.ts(40) β locale key-parity + placeholder checks hold with the new keys.setup-wizard.test.tsx(3) β 6-step resume/persistence (persisted step 5 β Local AI; configured local β Telegram).settings-app.test.tsx(3) +ai-models-step.test.tsx(9).Notes
Summary by CodeRabbit
New Features
Tests