Skip to content

docs: scaffold subscription- and quota-aware routing engine spec - #35

Closed
OnlyTerp wants to merge 2 commits into
mainfrom
devin/routing-engine-spec
Closed

docs: scaffold subscription- and quota-aware routing engine spec#35
OnlyTerp wants to merge 2 commits into
mainfrom
devin/routing-engine-spec

Conversation

@OnlyTerp

@OnlyTerp OnlyTerp commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the design specification and implementation scaffold for a routing engine that extends the existing Auto Router with real account, subscription, and quota awareness.

What changed

  • New design doc: docs/ROUTING_ENGINE_SPEC.md covering:
    • provider & account ledger (fixed-window subscriptions, prepaid pools, local RTX 5090 compute)
    • cost/quota telemetry (TTFT, e2e latency, token spend, 429/cooldown tracking)
    • priority + failover policy (saturate local zero-marginal-cost capacity first, tier → cheapest capable provider)
    • Honcho sync contract and Life OS metrics API
    • security, idempotency, observability, testing, rollout, and open questions
  • New package: uc_routing/ with placeholder modules for ledger, telemetry, routing, providers, failover, honcho, life_os, config, and tests.
  • README.md: links the new spec in the docs table.

Why

The current Auto Router picks the cheapest capable backend per task, but it does not track real subscription windows, prepaid balances, or local GPU availability. The new engine will route local-first, fail over on quota exhaustion or errors, and keep Honcho/Life OS in sync so the user’s cost and quota state is consistent across sessions and dashboards.

Non-goals (this PR)

  • No proxy.py integration or provider adapters are wired yet.
  • No production behavior is enabled; the engine is disabled until UC_ROUTING_ENGINE=1 and a routing_engine config section are introduced in a follow-up PR.

Testing

  • python3 -m unittest discover -s uc_routing/tests -v passes.
  • python3 test_proxy.py still passes (existing proxy behavior unchanged).

Link to Devin session: https://app.devin.ai/sessions/d23f177b79f7436e87ad08ea73823332
Requested by: @OnlyTerp


Open in Devin Review

Add docs/ROUTING_ENGINE_SPEC.md covering provider/account ledger,
telemetry, failover, Honcho sync, and Life OS metrics.
Add uc_routing/ package with placeholder modules for ledger, telemetry,
routing, providers, failover, honcho, life_os, config, and tests.
Link the new spec from README.md. No production behavior implemented.

Co-Authored-By: Rob <onerobby@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

devin-ai-integration[bot]

This comment was marked as resolved.

…uit breaker

Co-Authored-By: Rob <onerobby@gmail.com>
@devin-ai-integration
devin-ai-integration Bot deleted the devin/routing-engine-spec branch August 22, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant