Walt

AI Dispatch Cascade

Quality-aware provider cascade -- cheap first, Claude Haiku review, escalate + Annie RAG inject.

AI Dispatch Cascade (v2026-09-30T110316Z-5e473105f4) 2026-09-30 | Quality-aware provider cascade -- cheap first, Claude Haiku review, escalate + Annie RAG inject. 1 - AI Dispatch - Dispatching AI requests User POST /api/ai/dispatch GET /api/ai/providers GET /api/ai/profile POST /api/ai/profile ai_dispatch_api.py _get_worker_token() call_with_retry _bus_publish _sync_grant_roles _role_has_authority jobs.db user_prefs table proxy_calls table Grant Service http://localhost:{_GRANT_PORT… Carousel Service http://localhost:{_daemon_por… Annie Service http://localhost:{_ANNIE_PORT} user request dispatch decis… job record role sync carousel reque… 1. User submits request 2. Dispatch API proces… 3. Syncs user roles 4. Calls carousel serv… 5. Gets quality review… 6. Checks quality thre… 7. Escalates if needed 8. Returns best respon… POST /api/ai/dispatch request payload {"prompt": "What is the meaning of life?", "provider": "ollama", "context": "", "role": "user", "quality_threshold": 6} GET /api/ai/profile response payload {"preferred_provider": "ollama", "quality_threshold": 6, "auto_escalate": true} Grant service integration has never succeeded due to incorrect path and service configuration. Legend actor = initiates work · process = code path · store = state on disk · bus = durable queue · dashed = separate process cyan = request flow · pink = state read/write · dashed green = pull / return path · red = refusal As of 2026-09-30 11:03 UTC, from commit 5e47310

Provenance

This drawing is generated, not drawn. It is rebuilt from the source files below, so when they change the picture changes — a diagram here cannot quietly describe a system that no longer works this way.

Owner
Walt
Slug
ai-dispatch-cascade
Rendered
2026-09-30T110316Z
From commit
5e473105f4
Updated
30 Sep 2026, 11:03 UTC
Sources at
5e47310
Watches
2 paths
  • daemon/src/ai_dispatch_api.py
  • daemon/src/ai_proxy_router.py