Skip to content

consult: allow specifying model version (e.g. gemini-2.5-pro vs gemini-3-pro-preview) #708

@amrmelsayed

Description

@amrmelsayed

Problem

consult -m <model> only accepts a model family (gemini, codex, claude, hermes). The specific version is hardcoded in the source, so callers cannot select a different version per invocation.

For example, gemini is pinned to gemini-3-pro-preview here:

// packages/codev/src/commands/consult/index.ts (compiled to dist/commands/consult/index.js:22)
gemini: { cli: 'gemini', args: ['--model', 'gemini-3-pro-preview'], envVar: 'GEMINI_SYSTEM_MD' },

There's no way to ask consult to run against gemini-2.5-pro (or any other version) without editing the source and rebuilding.

Use cases

  • Comparing review quality across model versions (e.g. 2.5 vs 3 pro) without rebuilding
  • Falling back to an older/cheaper version when the pinned preview is rate-limited or unavailable
  • Pinning a specific stable version for reproducible reviews while the default tracks preview

Proposed solution

Add a passthrough flag, e.g. --model-version <id>, that overrides the hardcoded --model arg in the per-family config:

consult -m gemini --model-version gemini-2.5-pro --type spec --issue 42
consult -m codex  --model-version gpt-5         --prompt "..."

Behavior:

  • When omitted, current pinned default is used (no change)
  • When provided, replaces the --model arg passed to the underlying CLI
  • Usage/cost extraction in usage-extractor.js already knows about multiple gemini versions (gemini-3-pro, gemini-2.5-pro), so metrics should keep working

Alternatives considered

  • Calling the underlying gemini / codex CLI directly — works but skips consult's review-type scaffolding, output handling, and metrics tracking.
  • Editing the pinned version in source and rebuilding — not viable per-invocation.

Acceptance criteria

  • consult -m gemini --model-version gemini-2.5-pro --prompt "..." invokes the gemini CLI with --model gemini-2.5-pro
  • Same flag works for codex and claude families where the underlying CLI supports it
  • Omitting the flag preserves current behavior exactly
  • Metrics in consult stats correctly attribute the invocation to the actual version used
  • consult -m gemini --help documents the new flag

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions