Skip to content

consult: configurable per-lane models and per-review-type lane selection #1286

Description

@waleedkadous

Problem (owner-directed request from a production workspace, 2026-07-29)

Consult hardcodes the model per lane (commands/consult/index.ts — claude lane pinned to claude-opus-4-6, codex lane to gpt-5.4 with medium reasoning). Workspaces cannot run newer models (e.g. claude-opus-5 for spec/plan reviews, gpt-5.6 for the codex lane) without patching dist or shadow-forking protocol files.

Ask 1 — per-lane model config

Read per-lane model ids from .codev/config.json, e.g.:

{ "consult": { "models": { "claude": "claude-opus-5", "codex": "gpt-5.6" } } }

Fail fast on an unknown/invalid id (no silent fallback to the hardcoded default — per the fail-fast convention).

Ask 2 — per-review-type lane selection

Config-level porch.consultation.modelsByType (e.g. {spec:[...], plan:[...], impl:[...], pr:[...]}) so lane composition can differ by review type. The requesting workspace implemented this today by tier-2-shadowing spir/aspir/pir protocol.json copies — which works but recreates exactly the stale-shadow-copy rot class that bit this repo (17 drifted files, fixed in PR #1281). A sanctioned config mechanism removes the incentive to fork protocol files.

Evidence offer

The requesting workspace has lane-value data from production use (codex load-bearing at every review type; claude unique-finder at spec/plan; gemini ~zero unique findings and the only flaky lane) and is happy to share as input for defaults. Matches this repo's own experience (Codex caught the decisive defect in six consecutive review rounds on recent projects; the agy/gemini lane is #1032/#1033-degraded).

Note

Config > protocol precedence is already porch's documented model-list rule; this extends the same principle to consult lane models. PIR's CMAP-2 cost invariant (config can silently inflate lighter protocols) should be considered in the design — per-protocol scoping may need to ride along.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/consultArea: Consult CLI / consultation tooling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions