Skip to main content

dabbler-ai-router

A framework for AI-led coding sessions. Work is organized into session sets — small, independently deployable units of work, each with a spec that plans its sessions step by step. A router dispatches model calls across providers with complexity-based selection, escalation, and cost accounting. Every session must pass cross-provider verification before it can close, and the verification record is machine-written: no code path accepts a hand-written verdict.

Components:

  • Python package ai_router — routing, session lifecycle, gates, verification, cost accounting. Everything that decides lives here.
  • VS Code extension "Dabbler AI Orchestration" — the Work Explorer tree. A pure renderer: it shells to python -m ai_router.progress --json and draws the JSON. It re-implements no logic.

How a session runs

  1. python -m ai_router.session start registers the session in session-state.json and seeds the spec's step plan into activity-log.json, once.
  2. The orchestrating AI (Claude Code, Codex, Copilot, Gemini — any engine that reads CLAUDE.md/AGENTS.md) does the work.
  3. python -m ai_router.verify runs the verification loop before commit: round 1 reviews the full working-tree diff; rounds ≥ 2 review only the fix delta. The verifier is always a different provider than the orchestrator. Rounds append to a machine-only ledger under .dabbler/runs/. A contested blocking finding has a sanctioned exit ladder instead of an impasse: verify dispute records an evidence-backed rebuttal the next round must engage, verify adjudicate routes recorded disputes to a third provider that neither orchestrated nor verified, and verify waive — interactive-only, operator-attested — closes the session as WAIVED (accepted unverified, on the record) once the machine path is exhausted.
  4. python -m ai_router.session close runs five gates — verification clean, working tree clean, pushed to remote, test run fresh, verdict vocabulary — then flips the state. The verification gate reads the ledger; there is no stamp, no override, no hand-writable record.

See docs/quick-start.md for the full walkthrough.

Install

pip install dabbler-ai-router

Requires Python 3.11+. Then install the VS Code extension from the VSIX (dabbler-ai-orchestration-*.vsix in a release, or built from tools/dabbler-ai-orchestration/):

code --install-extension dabbler-ai-orchestration-1.0.0.vsix

The per-set artifacts

Each session set lives at docs/session-sets/<NNN-slug>/ in the consumer project and carries exactly four artifacts:

Artifact Written by Purpose
spec.md decomposition session (human-reviewed) the plan: sessions and their steps
session-state.json ai_router only lifecycle state, schema v4 (v3 read-tolerated)
activity-log.json ai_router only per-step progress log
change-log.md ai_router (appends) human-readable summary blocks per session

Verification round records live outside the working tree at .dabbler/runs/<set>/s<N>/rounds.jsonl (gitignored, machine-written only), and routed-call metrics append to router-metrics.jsonl. Field by field detail: docs/schema-reference.md.

Transports

Both transports are first-class for every call type:

  • Direct API — Anthropic, OpenAI, and Google, over their HTTP APIs, with per-call cost accounting from the pricing registry.
  • GitHub Copilot CLI — dispatches through a Copilot seat. Models come from a probed catalog lockfile. Calls are real spend but cannot be priced per call; metrics rows carry cost_usd: null with billed_usage_unavailable: true, and seat spend is measured afterwards by python -m ai_router.seat_cost from the CLI's local usage store.

Verification may cross transports: an orchestrator on the direct API can be verified through the Copilot CLI on another provider's model, and vice versa. The provider-independence rule (verifier provider ≠ orchestrator provider) holds on both paths.

Transport preference

Resolved in this precedence (first set wins):

  1. an explicit --transport api|copilot-cli value supplied by the caller (programmatic today — resolve_transport(config, cli_flag=…); no shipped CLI exposes the flag yet)
  2. the DABBLER_TRANSPORT env var (api | copilot-cli) — the operator's standing preference
  3. transport.profile in router-config.yaml
  4. default: api

This selects the transport for routine dispatch; verifier selection may still use the other transport when provider independence requires it.

Credentials

API keys are resolved from environment variables only — never from config files, never logged:

Provider Env var
Anthropic DABBLER_ANTHROPIC_API_KEY
OpenAI DABBLER_OPENAI_API_KEY
Google DABBLER_GEMINI_API_KEY

A provider whose key does not resolve is simply not a candidate — the router selects among the providers that have keys (or the Copilot seat, on that transport). An empty-string value counts as absent.

Library use

from ai_router import route

result = route("Review this diff for correctness bugs", task_type="code-review")
print(result.model_name, result.cost_usd)

python -m ai_router.metrics prints the spend report (per model, per task type, per session set, Opus-equivalent savings). Unpriced seat calls are reported as unpriced, never as $0.00.

Layout

ai_router/              the Python package (routing, session, verify, gates)
ai_router/schemas/      JSON Schemas: session-state v4, rounds ledger
ai_router/prompt-templates/  system/task/verification prompts
tools/dabbler-ai-orchestration/  the VS Code extension
docs/                   quick-start and schema reference

Migrating a project from v1? See MIGRATION-FROM-V1.md — the short version is: nothing to migrate.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dabbler_ai_router-1.0.6.tar.gz (155.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dabbler_ai_router-1.0.6-py3-none-any.whl (132.7 kB view details)

Uploaded Python 3

File details

Details for the file dabbler_ai_router-1.0.6.tar.gz.

File metadata

  • Download URL: dabbler_ai_router-1.0.6.tar.gz
  • Upload date:
  • Size: 155.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dabbler_ai_router-1.0.6.tar.gz
Algorithm Hash digest
SHA256 11e9c64dca3f1ea19bd77a86562f7e096a29334b1948756856f88a03b6568c93
MD5 8a61828e0ce3451723f6aa23946da5d7
BLAKE2b-256 2c59b0913b5f79fc0d99afd1e5a7b1bbe6ecf22c868fd1ee71e8f51ad2eee05c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dabbler_ai_router-1.0.6.tar.gz:

Publisher: release.yml on darndestdabbler/dabbler-ai-orchestration

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dabbler_ai_router-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for dabbler_ai_router-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 cd22eb4fa4002f6360ee10394846fd08821d3f3d2daed3b3cd4c4b6acf2791c1
MD5 1e4371327a833f26b1db2c803cf1bb47
BLAKE2b-256 52954b62db77ab462fefb9473cb7fe81ce090240a754eab786e1e1269d45535d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dabbler_ai_router-1.0.6-py3-none-any.whl:

Publisher: release.yml on darndestdabbler/dabbler-ai-orchestration

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page