Skip to content

v0.8.6 feat: /model auto — V4-Pro vs V4-Flash heuristic per turn #392

@Hmbown

Description

@Hmbown

Pitch

This was filed and deferred (#315). Re-opening as a v0.8.6 deliverable because it's specifically a DeepSeek-TUI superpower nobody else can claim — we know V4's two-tier shape better than any provider-neutral tool.

`/model auto` flips routing to a heuristic: each turn picks Pro or Flash based on signals:

  • Flash (cheap): tool-only turns (file reads, git inspection, small edits), follow-ups inside an established context, status / summary requests.
  • Pro (expensive): explicit reasoning requests ("think about"), debugging, architecture, security review, anything tagged with `/effort high` or `/effort max`.

Heuristic visible to the user: a small chip in the footer reads `auto · flash` or `auto · pro` so they can see what's being chosen and override at any time.

Implementation sketch

  • New `AutoModelRouter` in `crates/tui/src/core/auto_router.rs`.
  • Inputs: turn-N message text, recent tool history, current effort level, last few turns' usage.
  • Output: `ModelChoice::Pro | ModelChoice::Flash`.
  • Wire into engine's `request_model` instead of `session.model` when `auto` is on.
  • Per-turn override: `Ctrl+M` toggles between auto/pro/flash for the next send.

Acceptance

  • `/model auto` enables auto-routing; `/model deepseek-v4-pro` re-pins.
  • Footer chip shows the resolved model per turn.
  • `Ctrl+M` per-send override.
  • Heuristic test fixtures cover all six combinations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.8.6Targeting v0.8.6

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions