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 --jsonand draws the JSON. It re-implements no logic.
How a session runs
python -m ai_router.session startregisters the session insession-state.jsonand seeds the spec's step plan intoactivity-log.json, once.- The orchestrating AI (Claude Code, Codex, Copilot, Gemini — any engine
that reads
AGENTS.mdor theCLAUDE.md/GEMINI.mdthat import it) does the work. python -m ai_router.verifyruns 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 disputerecords an evidence-backed rebuttal the next round must engage,verify adjudicateroutes recorded disputes to a third provider that neither orchestrated nor verified, andverify waive— interactive-only, operator-attested — closes the session as WAIVED (accepted unverified, on the record) once the machine path is exhausted.python -m ai_router.session closeruns 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: nullwithbilled_usage_unavailable: true, and seat spend is measured afterwards bypython -m ai_router.seat_costfrom 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):
- an explicit
--transport api|copilot-cliflag (python -m ai_router.verify --transport …; programmatically,resolve_transport(config, cli_flag=…)) - the
DABBLER_TRANSPORTenv var (api|copilot-cli) — the operator's standing preference transport.profilein the loaded config — the packagedrouter-config.yamlwith a project-locallocal-overrides.yamldeep-merged over it- default:
api
The overlay is a config source, not a precedence tier: it changes what
tier 3 says and nothing above it. It lives at the project root
(local-overrides.yaml), carries only the keys it changes, and is
never committed and never packaged — .gitignore reserves the name and
it is not package data. A key the schema does not declare is refused
at load, not dropped, because an override the router silently ignores
is the failure the file exists to prevent.
This is how a machine disagrees with the published default. The packaged
router-config.yaml keeps transport: profile: api, which is correct
for a fresh install holding provider API keys; a seat-only machine says
so once, in a file it does not publish:
# local-overrides.yaml — this machine has a Copilot seat and no API keys
transport:
profile: copilot-cli
Config is the only layer that is client-, model- and
transport-independent. The env var reaches only processes started after
it was written; --transport has to be repeated on every command; and
instruction files are read by some clients and not others.
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 |
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.
Metadata
Release files for dabbler-ai-router 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dabbler_ai_router-1.1.0.tar.gz | 193.4 kB | With provenance | Details for dabbler_ai_router-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dabbler_ai_router-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for dabbler_ai_router-1.1.0-py3-none-any.whl |
Total release size: 351.6 kB
Release files / dabbler_ai_router-1.1.0.tar.gz
| Download URL | dabbler_ai_router-1.1.0.tar.gz |
|---|---|
| Size | 193.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6d8ef34eb17d34e0b74819e4b9628775b73ecc46c797ce205fbb40754014c4e
|
|
BLAKE2b-256 checksum How to use checksums |
a67d6d52366066b0f2819a465c9dd1fb3940948652f1e1158be7398c240279b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.
Transparency logRelease files / dabbler_ai_router-1.1.0-py3-none-any.whl
| Download URL | dabbler_ai_router-1.1.0-py3-none-any.whl |
|---|---|
| Size | 158.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f1c51bcd575bce7cdade8cdda3620274cfc7e7918f3ff47828681e1e8480de1
|
|
BLAKE2b-256 checksum How to use checksums |
3ab58980a7e493df9c8df1c209f0db873debbde86817ff925ff811880187f1c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.
Transparency logSecurity for dabbler-ai-router 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dabbler_ai_router-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.