Downshift

Pipeline

From call site to cost diff

  1. 01ScanDownshift
    downshift scan

    Static analysis finds every OpenAI-compatible call site, its model and prompt.

  2. 02AuditBob
    Downshift Auditor mode

    Bob resolves hidden models, splits shared helpers into features, and adds purpose, output contract, difficulty and grading.

  3. 03Write evalsBob
    Eval Writer mode or downshift evalgen

    20 to 25 cases per call site, including edge cases, grounded in the refund policy.

  4. 04RunDownshift
    downshift run

    Every eval on the baseline and each cheaper model, with tokens and latency recorded.

  5. 05GradeDownshift
    downshift rescore

    Exact match, JSON fields, or an independent LLM judge for free text.

  6. 06Decide and reportDownshift
    downshift report

    Cheapest model that keeps quality wins, with a projected monthly cost.

  7. 07ApplyBob
    Agent mode

    Bob moves model names into config, applies the decisions and opens the PR with the report.

  8. 08Guard every PRDownshift
    downshift diff (GitHub Action)

    Comments the projected cost change on every pull request and can fail the check.

Data flow

your repo | v downshift scan ....... call sites found by static analysis | v Bob auditor .......... hidden models resolved, shared helpers split | v evals ................ Bob Eval Writer, or downshift evalgen with any model | v downshift run ........ baseline + cheaper models, graded by a judge | v downshift report ..... cheapest safe model and projected cost per call site | -> Bob applies the decisions and opens a PR v downshift diff ....... GitHub Action comments the cost change on every PR

Where Bob fits

Downshift is the toolkit, Bob is the brain

Bob does the parts that need real code understanding: auditing call sites, writing evals, applying the decisions and reviewing pull requests. Scanning, running, grading, costing and the CI diff are deterministic Python that runs without Bob.

TaskBob featureWhat it didBobcoins
Project setup/init, AGENTS.mdGenerated project rules for every mode0.95
Architecture docPlan modeWrote docs/architecture.md with a Mermaid diagram0.23
Audit SupportDeskCustom mode + skill7 ast sites to 8 logical call sites, all models resolved0.32
Write evalsCustom mode + skill, document understanding181 eval cases across 8 call sites0.92
Build the reportPlan mode, then Agent modereport.py, CLI command and snapshot tests from a spec8.34
Apply decisionsAgent mode, commit + PRmodels.yaml refactor, downgrades, opened PR #81.38
Apply mid tierAgent mode, commit + PRSwitched two call sites to the 3B model, opened PR #110.27
Review a bad PRAsk mode, context mentionsFound the hard-coded model and the max_tokens cost driver0.07
Build the demo appAgent mode, spec in contextScaffolded the Next.js app from web/SPEC.md5.68
Audit OrchestrAICustom mode + skill, context mentionsReal repo: 1 shared helper to 5 features, all models resolved0.46
Audit mem0Custom mode + skill, context mentions, steeringReal repo: 14 ast call sites to the 4 features that spend money3.32

Decision rule

How a model gets picked

threshold 95% · floor 80% · judge openai/gpt-oss-120b

Pricing

Illustrative prices

ModelTierInput / 1M tokensOutput / 1M tokens
qwen2.5:7bpremium$2.50$10.00
qwen2.5:3bstandard$0.40$1.60
qwen2.5:1.5bbudget$0.15$0.60
qwen2.5:0.5bnano$0.10$0.40

Tier prices that map the local models to realistic API costs. Replace them with your provider's prices in downshift.yaml.

Dollar figures are projections: measured token counts x illustrative per-model prices x an assumed call volume, all set in downshift.yaml. They are not a real bill.