You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,13 @@ Release tags use the form `vX.Y.Z` and match `package.json`. GitHub Releases car
9
9
10
10
## [Unreleased]
11
11
12
+
## [0.5.7] - 2026-07-20
13
+
14
+
### Changed
15
+
16
+
- Routes now select Provider, then Model instead of exposing individual accounts. ReRouted tries all eligible accounts for that provider/model before advancing to the next fallback or round-robin member.
17
+
- Existing standard-provider route members migrate to provider/model destinations; custom OpenAI-compatible endpoints remain connection-specific.
18
+
12
19
## [0.5.6] - 2026-07-20
13
20
14
21
### Fixed
@@ -81,7 +88,8 @@ Release tags use the form `vX.Y.Z` and match `package.json`. GitHub Releases car
81
88
82
89
See [GitHub Releases](https://github.com/gitcommit90/rerouted/releases) for artifact digests and notes prior to the Keep a Changelog narrative. Notable themes in late 0.4.x included signed/notarized distribution, in-app updates, named routes, OAuth account pools, OpenAI chat completions and Responses routing, and launch hardening.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ Timeouts and retryable `408`, `429`, and `5xx` responses can advance the route.
89
89
-**API-key presets:** OpenRouter, NVIDIA NIM, Cloudflare, and GLM Coding.
90
90
-**Custom upstreams:** any service that exposes the OpenAI chat-completions shape ReRouted expects.
91
91
-**Local credential discovery:** supported credentials already stored in known files, or in the macOS Keychain where available, can be imported instead of re-entered.
92
-
-**Multiple accounts:** connect more than one account for the same provider and use shared or account-specific model routes.
92
+
-**Multiple accounts:** connect more than one account for the same provider. Routes select Provider then Model; ReRouted tries every eligible account for that provider/model before advancing to the next route member.
93
93
94
94
OAuth accounts and keyed providers can live in the same route. ReRouted handles request translation and normalizes supported upstream responses back into the shape your client expects.
95
95
@@ -192,7 +192,7 @@ ReRouted accepts both `/v1/messages` and `/v1/v1/messages`, so current Claude Co
192
192
193
193
-**Status:** gateway health, endpoint, latest route, and recent traffic.
194
194
-**Accounts:** OAuth sessions, imported credentials, API keys, and model availability.
195
-
-**Routes:** named fallback or round-robin model groups with explicit ordering controls.
195
+
-**Routes:** named fallback or round-robin provider/model groups with explicit ordering controls; same-provider accounts stay inside the member’s automatic fallback pool.
196
196
-**Activity:** requests, failures, token counts, route choices, and account usage.
197
197
-**Quota:** provider-specific subscription windows where supported.
198
198
-**Settings:** gateway keys, localhost or network binding, security controls, and platform-appropriate startup/update information.
Copy file name to clipboardExpand all lines: docs/architecture.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,23 +71,41 @@ Anthropic Messages requests are normalized into the same internal OpenAI chat-co
71
71
72
72
Provider model IDs are generated by `src/lib/providers/index.js`. Custom OpenAI-compatible connections use the readable form `<connection name>/custom/<upstream model>` while legacy hash-qualified IDs remain resolvable. A direct model resolves to one enabled provider/model pair.
73
73
74
-
A route is a persisted virtual model with members shaped like:
74
+
A route is a persisted virtual model. Standard providers are represented by a
75
+
provider/model destination, not by an individual credential:
75
76
76
77
```json
77
78
{
78
-
"providerId": "prov_...",
79
+
"providerType": "chatgpt",
79
80
"model": "upstream-model-id"
80
81
}
81
82
```
82
83
84
+
Custom OpenAI-compatible connections remain connection-specific because their
85
+
base URLs can represent different services, so those members retain a
86
+
`providerId`.
87
+
83
88
The router supports:
84
89
85
90
-`fallback`: members are attempted in their configured order.
86
91
-`round-robin`: each request rotates the starting member, then retains fallback behavior through the remaining members.
87
92
88
93
Named routes and OAuth account pools continue through every untried target until an upstream returns a usable `2xx` response. Any non-`2xx` status advances fallback regardless of error type. A `2xx` response that contains an immediate stream error, ends without usable output, exceeds the bounded pre-output inspection budget, has no response body, contains invalid JSON, or carries an explicit error payload also advances fallback. Failure classification controls account cooldown locks and diagnostics; it never stops routing. Capability failures do not create account cooldown locks. The per-member timeout defaults to 60 seconds. Caller cancellation stops immediately, and a stream cannot be transparently rerouted after output has already reached the client.
89
94
90
-
OAuth providers add an account-pool layer beneath model routing. Accounts receive monotonic, never-reused aliases (`oauth1`, `oauth2`, ...). Model discovery advertises one canonical pooled id such as `chatgpt/gpt-5.4`; account-qualified ids such as `chatgpt/oauth2/gpt-5.4` and legacy stored-account ids remain resolvable but are not advertised. Quota failures create an account-wide lock using provider reset hints when available; authentication and transient failures use shorter model-scoped cooldowns. Early streaming quota events are inspected before the client stream starts so fallback can still occur. Selection, failure, fallback, locked-account skips, and terminal exhaustion are written as structured logs.
95
+
Standard providers add an account-pool layer beneath model routing. The route
96
+
editor and terminal setup select Provider, then Model; individual OAuth or
97
+
API-key accounts are internal to that member. Every eligible account for the
98
+
selected provider/model is tried before routing advances to the next member.
99
+
Round robin rotates these outer members only, retaining the account-pool retry
100
+
inside each one. OAuth accounts receive monotonic, never-reused aliases
101
+
(`oauth1`, `oauth2`, ...). Model discovery advertises one canonical pooled id
102
+
such as `chatgpt/gpt-5.4`; account-qualified ids such as
103
+
`chatgpt/oauth2/gpt-5.4` and legacy stored-account ids remain resolvable but
104
+
are not advertised. Quota failures create an account-wide lock using provider
105
+
reset hints when available; authentication and transient failures use shorter
106
+
model-scoped cooldowns. Early streaming quota events are inspected before the
107
+
client stream starts so fallback can still occur. Selection, failure, fallback,
108
+
locked-account skips, and terminal exhaustion are written as structured logs.
0 commit comments