Skip to content

docs(architecture): Router Backends & Embedded Services ADR (#5603) - #5891

Merged
diegosouzapw merged 5 commits into
release/v3.8.43from
docs/router-backends-adr
Jul 2, 2026
Merged

diegosouzapw merged 5 commits into
release/v3.8.43from
docs/router-backends-adr

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator

What

Adds docs/architecture/ROUTER_BACKENDS.md — an ADR answering @KooshaPari's architecture question in #5603: how ts/bifrost/cliproxy/9router/vibeproxy relate as embedded services vs routing backends, and what the /api/services/* route contract is.

Why

#5603 asked for "a concrete ADR/implementation note on service-model separation + a stable route contract". The recurring confusion is that embedded service (a supervised local process) and routing backend (a relay dispatch engine) are treated as one list when they are two orthogonal axes. This ADR pins that down and anchors it on the typed registry proposed in #5868.

Contents

  • Two orthogonal axes, encoded in the registry's RouterBackendDefinition:
    • Lifecycle — in-process / supervised / external / disabled (how it runs).
    • Relay backend selection — ts / bifrost / auto (whether the relay dispatches to it).
  • The src/domain/routing/routerBackends.ts registry as the intended single source of truth (per-backend lifecycle/capabilities/service identity/port/health table) — the registry itself lands separately via [codex] Add router backend registry #5868, and the ADR now states explicitly that bootstrap.ts / routingBackend.ts still branch per engine id until the adoption work that follows it.
  • Axis A — ServiceSupervisor lifecycle + the /api/services/* status-code contract (409 start-not-installed / 200 idempotent stop / 404 unknown tool / 403 loopback guard / 500·503 errors) and why the codes differ.
  • Axis B — resolveRelayRoutingBackend env selection, auto/bifrost/ts behavior, per-baseUrl cooldown, and that only the relay path (not /api/v1/chat/completions) consults it.
  • Dashboard integration + the tracked UX gap (bare HTTP <status>).

Stacking / dependency

Originally stacked on #5868 (Add router backend registry) and carried its commits. To avoid the two PRs colliding, this PR was reduced to genuinely docs-only: the routerBackends.ts registry + its test were dropped from this branch so #5868 remains the sole owner of that code, and the ADR wording was softened to describe the registry as proposed/landing via #5868 rather than as current behavior. Retargeted to release/v3.8.43 and updated to its tip.

Docs-only change (plus the 3.8.43 CHANGELOG bullet) — check:docs-sync PASS, markdownlint clean.

Addresses #5603. Related: #5670, #5817, #5868, #5869, #5870.

KooshaPari and others added 2 commits July 1, 2026 19:41
Document the two orthogonal axes that #5603 asked to clarify: an engine's
lifecycle (in-process / supervised / external / disabled) vs the relay routing
backend selection (ts / bifrost / auto). Anchors the ADR on the typed
`src/domain/routing/routerBackends.ts` registry as the single source of truth,
and captures the /api/services/* status-code contract (409/200/404/403/500 +
the LOCAL_ONLY loopback guard) so dashboard errors are interpretable.

Stacked on the router-backend-registry work so it documents a real contract.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@diegosouzapw
diegosouzapw merged commit 0d3875a into release/v3.8.43 Jul 2, 2026
2 of 3 checks passed
@diegosouzapw
diegosouzapw deleted the docs/router-backends-adr branch July 2, 2026 06:33
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw diegosouzapw mentioned this pull request Jul 2, 2026
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…inference#5603) (cheaper-inference#5891)

* routing: add router backend registry

* docs(architecture): add Router Backends & Embedded Services ADR (cheaper-inference#5603)

Document the two orthogonal axes that cheaper-inference#5603 asked to clarify: an engine's
lifecycle (in-process / supervised / external / disabled) vs the relay routing
backend selection (ts / bifrost / auto). Anchors the ADR on the typed
`src/domain/routing/routerBackends.ts` registry as the single source of truth,
and captures the /api/services/* status-code contract (409/200/404/403/500 +
the LOCAL_ONLY loopback guard) so dashboard errors are interpretable.

Stacked on the router-backend-registry work so it documents a real contract.

* docs(architecture): reduce ADR PR to docs-only — registry lands via cheaper-inference#5868; describe adoption as tracked, not current

* docs(changelog): add 3.8.43 bullet for the Router Backends ADR (cheaper-inference#5891)

---------

Co-authored-by: KooshaPari <kooshapari@gmail.com>
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.

2 participants