Skip to content

Switch polecat + crew default model to Gemini 3.8 Flash - #325

Merged
anuveyatsu merged 1 commit into
mainfrom
switch-agents-to-gemini-3.8-flash
Sep 14, 2026
Merged

anuveyatsu merged 1 commit into
mainfrom
switch-agents-to-gemini-3.8-flash

Conversation

@anuveyatsu

@anuveyatsu anuveyatsu commented Sep 14, 2026

Copy link
Copy Markdown
Member

Switches the default worker model from GLM 5.3 Flash to Gemini 3.8 Flash.

Why

GLM looped and no-op'd on real beads (the msf Africa-map bead cost $3.26 twice and landed nothing). Gemini 3.8 Flash is the capability call.

Billing — stays one bill (verified)

Reached through the same Cloudflare AI Gateway, so credentials and attribution are unchanged. Google AI Studio is enabled on the gateway and on Unified Billing, so Gemini draws the same prepaid Cloudflare balance GLM did — one bill, no BYOK Google key on the nodes. Confirmed on staging 2026-09-14:

  • workgraph-staging-oss: wholesale=true, byok_only=false, workers_ai_billing_mode=unified
  • google-ai-studio/gemini-3.8-flash routes HTTP 200 through the /compat endpoint with only the gateway token (no per-request provider key)

Changes

  • infra/ansible/roles/execution_cell/defaults/main.yml (the live default): wg_model_roles polecat + crew → google-ai-studio/gemini-3.8-flash; added its wg_model_limits entry (context 1000000, output 8192 — output cap required by OpenCode; context far above its ~19,900-token system prompt). Rationale comment rewritten.
  • internal/runner/plan.go: registered google-ai-studio/gemini-3.8-flash in GatewayModels so it's known to validation and the bake-off. The built-in DefaultModels fallback stays anthropic/claude-sonnet-5 on purpose — it pairs with the default claude runtime, and the live default comes from models.json (the ansible file), not the fallback.

Runtime stays opencode. Any run can override with -runtime claude -model anthropic/claude-sonnet-5.

Verification

go vet ./internal/runner/...   # clean
go test ./internal/runner/... ./cmd/runner/...   # ok

On merge, deploy.yml rewrites /etc/workgraph/models.json and restarts the dispatchers. Post-deploy, a dispatch should show model: google-ai-studio/gemini-3.8-flash in workgraph_bead, tagged in usage_records.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for Gemini 3.8 Flash in OpenCode runs.
    • Configured Gemini 3.8 Flash with a 1,000,000-token context limit and 8,192-token output limit.
  • Configuration

    • Updated default work-role model settings to use Gemini 3.8 Flash.
    • Retained support for the existing GLM model limits.

Replaces GLM 5.3 Flash as the default worker model. GLM looped and no-op'd on
real beads (the msf Africa-map bead cost $3.26 twice and landed nothing);
Gemini 3.8 Flash is the capability call.

Reached through the SAME Cloudflare AI Gateway, so credentials and attribution
are unchanged. google-ai-studio is enabled on the gateway and on UNIFIED
BILLING, so Gemini draws the same prepaid Cloudflare balance GLM did -- one
bill, no BYOK Google key on the nodes. Confirmed on staging 2026-09-14:
  - gateway workgraph-staging-oss: wholesale=true, byok_only=false,
    workers_ai_billing_mode=unified
  - google-ai-studio/gemini-3.8-flash routes HTTP 200 through the /compat
    endpoint with only the gateway token (no per-request provider key)

Changes:
- infra/ansible/roles/execution_cell/defaults/main.yml: wg_model_roles polecat
  and crew -> google-ai-studio/gemini-3.8-flash; add its wg_model_limits entry
  (context 1000000, output 8192 -- output cap required by OpenCode, context far
  above its ~19,900-token system prompt). Rationale comment rewritten.
- internal/runner/plan.go: register google-ai-studio/gemini-3.8-flash in
  GatewayModels so the model is known to validation and the bake-off. The
  built-in DefaultModels fallback stays anthropic/claude-sonnet-5 on purpose:
  it pairs with the default claude runtime, and the live default comes from
  models.json (this file) not the fallback.

Runtime stays opencode; any run can still override with
`-runtime claude -model anthropic/claude-sonnet-5`.

  go vet ./internal/runner/...   # clean
  go test ./internal/runner/...  # ok

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: dfe43c88-36c8-47eb-b7ab-afcf12d1736f

📥 Commits

Reviewing files that changed from the base of the PR and between 7a01a60 and dc9ff70.

📒 Files selected for processing (2)
  • infra/ansible/roles/execution_cell/defaults/main.yml
  • internal/runner/plan.go

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The default polecat and crew models now use Gemini 3.8 Flash. Ansible and runner model-limit tables define a 1,000,000-token context limit and an 8,192-token output limit.

Changes

Gemini model support

Layer / File(s) Summary
Model selection and runtime limits
infra/ansible/roles/execution_cell/defaults/main.yml, internal/runner/plan.go
The default polecat and crew models change to google-ai-studio/gemini-3.8-flash. The Ansible and runner limit tables add context 1000000 and output 8192 for this model. The existing GLM limit entry remains.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to dc9ff

The default model change and runtime limits are aligned across the configured layers; no current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: switching the default model for polecat and crew to Gemini 3.8 Flash.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch switch-agents-to-gemini-3.8-flash

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@anuveyatsu
anuveyatsu merged commit c3d0e4f into main Sep 14, 2026
6 of 7 checks passed
@anuveyatsu
anuveyatsu deleted the switch-agents-to-gemini-3.8-flash branch September 14, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant