Skip to content

Fix #878: Point gemini consult lane at gemini-3.1-pro-preview#879

Merged
waleedkadous merged 6 commits into
mainfrom
builder/bugfix-878
May 27, 2026
Merged

Fix #878: Point gemini consult lane at gemini-3.1-pro-preview#879
waleedkadous merged 6 commits into
mainfrom
builder/bugfix-878

Conversation

@waleedkadous

Copy link
Copy Markdown
Contributor

Summary

Google retired gemini-3-pro-preview on 2026-03-09, so every CMAP gemini-side fast-fails in ~1.8s with an opaque [object Object] error (the gemini-cli's misformatted ModelNotFoundError dump). This PR bumps the consult lane to gemini-3.1-pro-preview — the current actively-supported Gemini 3.x Pro identifier.

Fixes #878

Root Cause

packages/codev/src/commands/consult/index.ts:38 hardcoded gemini-3-pro-preview when that was the current preview alias (Feb 2026). Google has since shut it down, and gemini-3-pro is not the active GA identifier either — the current target is gemini-3.1-pro-preview (Gemini 3.1 Pro, released Feb 19, 2026).

Fix

  • consult/index.ts — bump --model arg to gemini-3.1-pro-preview.
  • usage-extractor.ts — add gemini-3.1-pro pricing tier ($2.00/$12.00 per 1M, cached at 25% of input). Placed before gemini-3-pro in the prefix-match table so the 3.1 variant resolves first.
  • CLAUDE.md / AGENTS.md — update the Multi-Agent Consultation reference.
  • metrics.test.ts — update the Pro pricing fixture to the new model and cost; add a focused regression test asserting that MODEL_CONFIGS.gemini.args points at gemini-3.1-pro-preview (the exact thing that regressed).
  • Export MODEL_CONFIGS as _MODEL_CONFIGS for the regression test, matching the existing _-prefixed test-export pattern in consult/index.ts.

Verification

  • Smoke-tested locally: gemini --model gemini-3.1-pro-preview --prompt "OK" returns OK in ~4s. consult -m gemini --prompt "OK" returns a real response.
  • npx tsc passes clean.
  • Full test suite: 3162 passed, 13 skipped, 0 failed (vitest run).

Test Plan

  • Regression test added (metrics.test.ts — guards against the model identifier silently regressing back to a retired model)
  • Build passes (npx tsc clean)
  • All tests pass (vitest run — 3162 passed)
  • Manual smoke: consult -m gemini --prompt "OK?" returns a real response, exit 0

Google retired gemini-3-pro-preview on 2026-03-09, causing every CMAP
gemini-side to fast-fail in ~1.8s with an opaque [object Object] error
(the gemini-cli's misformatted ModelNotFoundError dump). The current
actively-supported Pro identifier is gemini-3.1-pro-preview.

Changes:
- consult/index.ts: bump --model arg to gemini-3.1-pro-preview
- usage-extractor.ts: add gemini-3.1-pro pricing tier ($2.00 in / $12.00 out
  per 1M, cached at 25% of input). Placed before gemini-3-pro so the prefix
  match resolves the 3.1 variant first
- CLAUDE.md / AGENTS.md: update Multi-Agent Consultation reference
- metrics.test.ts: update Pro pricing fixture to new model + cost, add
  regression test asserting MODEL_CONFIGS.gemini.args points at a current
  identifier (the bug being guarded against)

Export MODEL_CONFIGS as _MODEL_CONFIGS for the regression test, matching
the existing _-prefixed test-export pattern.
@waleedkadous

Copy link
Copy Markdown
Contributor Author

Approved — the new identifier is forward-safe regardless of the rolling-deprecation wrinkle. CMAP unanimous including gemini end-to-end is the right confirmation. Please merge with --admin bypass.

@waleedkadous waleedkadous merged commit cb29674 into main May 27, 2026
6 checks passed
@waleedkadous waleedkadous deleted the builder/bugfix-878 branch May 27, 2026 06:34
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.

consult: gemini lane points at retired gemini-3-pro-preview model — every CMAP gemini-side fails fast with opaque error

1 participant