Solidway v0.1.0 is released under AGPL-3.0; source and releases are on GitHub. This documentation is being rewritten against the release — pages outside Quick start and Reference still describe planned behaviour. The current reference lives in docs/getting-started.md and docs/architecture.md in the repository.
Selection strategies
Round robin, uptime, latency and weighted selection — what each one optimises.
Selection decides which credential serves a request. It runs per request, on every credential in the route’s pool that is healthy at that moment.
Strategies
| Strategy | What it does |
|---|---|
| Round robin (default) | Cycles through healthy credentials in order. Predictable, and what the gateway did before strategies existed. |
| Uptime | Prefers credentials with the best observed success rate. Weight is dominated by the uptime signal. |
| Latency | Prefers the lowest observed first-byte latency. Weight is dominated by the latency signal. |
| Auto | Weighted mix of uptime, latency, price and throughput, with proportional random exploration. |
The strategy is set per route under Route → Selection.
Weights and thresholds
The weighted strategies expose four weights and four thresholds. They are editable per route and fall back to per-strategy defaults:
| Weight | Signal |
|---|---|
uptime |
Observed success rate |
latency |
Observed first-byte latency |
price |
Per-token price, when the credential declares one |
throughput |
Observed tokens per second |
| Threshold | Meaning |
|---|---|
uptime_penalty |
How hard a failing credential is penalised |
default_uptime |
Starting value before there are samples |
default_latency_ms |
Same, for latency |
exploration_rate |
The share of requests routed by random exploration |
If all weights resolve to zero, the data plane falls back to round robin.
Why not always pick the best
Selection is probabilistic, not greedy. A credential that has just recovered keeps a small share of traffic, which is how the gateway notices it is healthy again instead of skipping it forever. The exploration rate controls how much of that happens.
Affinity
Affinity keeps a conversation on the same credential for a configurable TTL (sliding). Health wins: a credential that is cooling down or retired is skipped even if affinity points at it, and the mapping is re-pointed at whatever served the request.
Console
The route page shows each credential’s configured priority, its live health state and the selection snapshot (uptime, latency, score). The selection snapshot is read from a cache that is refreshed on an interval, so selection adds no per-request computation on the hot path.
What selection never does
It does not inspect prompt content. Decisions are based on observed behaviour, declared weights and health state only.