Fix #878: Point gemini consult lane at gemini-3.1-pro-preview#879
Merged
Conversation
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.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Google retired
gemini-3-pro-previewon 2026-03-09, so every CMAP gemini-side fast-fails in ~1.8s with an opaque[object Object]error (the gemini-cli's misformattedModelNotFoundErrordump). This PR bumps the consult lane togemini-3.1-pro-preview— the current actively-supported Gemini 3.x Pro identifier.Fixes #878
Root Cause
packages/codev/src/commands/consult/index.ts:38hardcodedgemini-3-pro-previewwhen that was the current preview alias (Feb 2026). Google has since shut it down, andgemini-3-prois not the active GA identifier either — the current target isgemini-3.1-pro-preview(Gemini 3.1 Pro, released Feb 19, 2026).Fix
consult/index.ts— bump--modelarg togemini-3.1-pro-preview.usage-extractor.ts— addgemini-3.1-propricing tier ($2.00/$12.00 per 1M, cached at 25% of input). Placed beforegemini-3-proin 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 thatMODEL_CONFIGS.gemini.argspoints atgemini-3.1-pro-preview(the exact thing that regressed).MODEL_CONFIGSas_MODEL_CONFIGSfor the regression test, matching the existing_-prefixed test-export pattern inconsult/index.ts.Verification
gemini --model gemini-3.1-pro-preview --prompt "OK"returnsOKin ~4s.consult -m gemini --prompt "OK"returns a real response.npx tscpasses clean.Test Plan
metrics.test.ts— guards against the model identifier silently regressing back to a retired model)npx tscclean)vitest run— 3162 passed)consult -m gemini --prompt "OK?"returns a real response, exit 0