rating-config.json configures the rating system the consumer proxy-router uses when picking which provider to route a session to. It lives in the project root by default; override path via RATING_CONFIG_PATH.

Fields

FieldNotes
providerAllowlistArray of provider addresses. Empty = allow all providers.
algorithmRating algorithm. default is the canonical built-in.
paramsAlgorithm-specific parameters. For default, the weights block (see below).
The full schema is enforced by proxy-router/internal/rating/rating-config-schema.json.

Default algorithm weights

{
  "$schema": "./internal/rating/rating-config-schema.json",
  "algorithm": "default",
  "providerAllowlist": [],
  "params": {
    "weights": {
      "tps": 0.24,
      "ttft": 0.08,
      "duration": 0.24,
      "success": 0.32,
      "stake": 0.12
    }
  }
}
WeightMeaning
tpsTokens per second
ttftTime to first token
durationSession duration / stability
successSuccessful completions over total
stakeProvider’s posted stake
Weights must sum to 1.0.

Restricting to specific providers

To only allow the local default model:
{
  "providerAllowlist": ["0x0000000000000000000000000000000000000000"]
}
To prefer a curated set, list their on-chain addresses (lower-case 0x...). An empty array allows all.

Practical patterns

Latency-first agent

Boost ttft and tps, lower stake.

Reliability-first prod

Boost success and duration, lower tps.

Cost-first batch jobs

Pair with a low pricePerSecond upper bound (currently outside rating-config; filter at session-open time).

TEE-only

Filter at the models layer to tee-tagged models; rating then operates over TEE providers only.