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, or supply the JSON inline via the RATING_CONFIG_CONTENT environment variable (useful for containers where mounting a file is inconvenient — same pattern as MODELS_CONFIG_CONTENT). Load order: the file at RATING_CONFIG_PATH (or ./rating-config.json) wins if it exists; otherwise RATING_CONFIG_CONTENT is used; otherwise built-in defaults (empty allowlist, default algorithm).

Fields

The full schema is enforced by proxy-router/internal/rating/rating-config-schema.json.

Default algorithm weights

Weights must sum to 1.0.

Restricting to specific providers

To only allow the local default model:
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.