Update default Gemini model and add model-not-found fallback#517
Conversation
- Update default model from gemini-3.1-pro-preview to gemini-3.1-pro - When Gemini CLI fails with a model-not-found error, retry without the -m flag to let the CLI use its own default model - Extract runGemini helper to avoid duplicating pipe/parse logic - Add tests for model fallback and isModelNotFoundError Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
Move stderr.String() after cmd.Wait(), which is the synchronization point guaranteeing all stderr writes have completed. Previously it was called between parseStreamJSON and Wait, racing with the goroutine that populates the stderr buffer. Add regression test with late stderr (emitted after stdout closes). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
- Revert model name back to gemini-3.1-pro-preview (still in preview) - Track whether model was set via WithModel (user config) vs built-in default; only auto-fallback for the built-in default so user config errors fail fast instead of silently switching models - Add test for explicit model failing fast on model-not-found Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
Address review findings: - Check a.Model == defaultGeminiModel instead of tracking modelExplicit bool, so direct field assignment of non-default models also fails fast - Remove modelExplicit field (no longer needed) - Add invocation-counting test that proves explicit models are invoked exactly once (no silent retry) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
Gemini CLI deprecated --allowed-tools in favor of the Policy Engine. Use --approval-mode plan (read-only) for reviews and --approval-mode yolo for agentic mode, dropping --allowed-tools and --yolo flags. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
|
Good enough here. Merging |
Summary
gemini-3.1-pro-previewtogemini-3.1-pronow that it's promoted out of preview-mflag to let the CLI use its own default model, making roborev resilient to Google renaming modelsrunGeminihelper to support the retry without duplicating pipe/parse logic🤖 Generated with Claude Code