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
CLAUDE.md/AGENTS.md) 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-clivalue supplied by the caller (programmatic today —resolve_transport(config, cli_flag=…); no shipped CLI exposes the flag yet) - the
DABBLER_TRANSPORTenv var (api|copilot-cli) — the operator's standing preference transport.profileinrouter-config.yaml- 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 |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dabbler_ai_router-1.0.7.tar.gz.
File metadata
- Download URL: dabbler_ai_router-1.0.7.tar.gz
- Upload date:
- Size: 157.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c038d8734b16c9d65cf74ad9ab8333aa0358aa9fe2c4ea385684a8f1ecf52132
|
|
| MD5 |
80b255269e2fffcbe423a57d31118c34
|
|
| BLAKE2b-256 |
191a68712fb4ec6f6e1d55b5a88b8396f3c9218cf8fe831f0762f355fc5ffe53
|
Provenance
The following attestation bundles were made for dabbler_ai_router-1.0.7.tar.gz:
Publisher:
release.yml on darndestdabbler/dabbler-ai-orchestration
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dabbler_ai_router-1.0.7.tar.gz -
Subject digest:
c038d8734b16c9d65cf74ad9ab8333aa0358aa9fe2c4ea385684a8f1ecf52132 - Sigstore transparency entry: 2504261007
- Sigstore integration time:
-
Permalink:
darndestdabbler/dabbler-ai-orchestration@0a403beab2aa73528ccac31b69c517cdd1628351 -
Branch / Tag:
refs/tags/v1.0.7 - Owner: https://github.com/darndestdabbler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0a403beab2aa73528ccac31b69c517cdd1628351 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dabbler_ai_router-1.0.7-py3-none-any.whl.
File metadata
- Download URL: dabbler_ai_router-1.0.7-py3-none-any.whl
- Upload date:
- Size: 134.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d18d49d29c779fca109675d47c2fdd12b11011ad29ab44e5a3f140eaf622264
|
|
| MD5 |
6e26ac057eda3bd15a5a75475176cc19
|
|
| BLAKE2b-256 |
e369edbf4f8f5364c96fb65015824281e32457b6e3fcba9056b44d40d87fef8e
|
Provenance
The following attestation bundles were made for dabbler_ai_router-1.0.7-py3-none-any.whl:
Publisher:
release.yml on darndestdabbler/dabbler-ai-orchestration
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dabbler_ai_router-1.0.7-py3-none-any.whl -
Subject digest:
2d18d49d29c779fca109675d47c2fdd12b11011ad29ab44e5a3f140eaf622264 - Sigstore transparency entry: 2504261818
- Sigstore integration time:
-
Permalink:
darndestdabbler/dabbler-ai-orchestration@0a403beab2aa73528ccac31b69c517cdd1628351 -
Branch / Tag:
refs/tags/v1.0.7 - Owner: https://github.com/darndestdabbler
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0a403beab2aa73528ccac31b69c517cdd1628351 -
Trigger Event:
push
-
Statement type: